Commit c80a24aa authored by Max Lv's avatar Max Lv

Use thin LTO

parent 4afd71f8
...@@ -57,14 +57,14 @@ cargo { ...@@ -57,14 +57,14 @@ cargo {
module = 'src/main/rust/shadowsocks-rust' module = 'src/main/rust/shadowsocks-rust'
libname = 'sslocal' libname = 'sslocal'
targets = ['arm', 'arm64', 'x86', 'x86_64'] targets = ['arm', 'arm64', 'x86', 'x86_64']
profile = 'debug' profile = 'release'
targetIncludes = ["lib${libname}.so"] targetIncludes = ["lib${libname}.so"]
extraCargoBuildArguments = ['--bin', 'sslocal'] extraCargoBuildArguments = ['--bin', 'sslocal']
features { features {
noDefaultBut "sodium", "android", "rc4", "aes-cfb", "aes-ctr", "camellia-cfb", "openssl-vendored" noDefaultBut "sodium", "android", "rc4", "aes-cfb", "aes-ctr", "camellia-cfb", "openssl-vendored"
} }
exec { spec, toolchain -> exec { spec, toolchain ->
spec.environment("RUSTFLAGS", "-C link-arg=-o -C link-arg=target/${toolchain.target}/$profile/lib${libname}.so") spec.environment("RUSTFLAGS", "-C lto=thin -C link-arg=-o -C link-arg=target/${toolchain.target}/$profile/lib${libname}.so")
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment