Skip to content

Commit

Permalink
Use thin LTO
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye authored and Mygod committed Mar 1, 2020
1 parent 2e2d9d4 commit 1bd347a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ cargo {
module = 'src/main/rust/shadowsocks-rust'
libname = 'sslocal'
targets = ['arm', 'arm64', 'x86', 'x86_64']
profile = 'debug'
profile = 'release'
targetIncludes = ["lib${libname}.so"]
extraCargoBuildArguments = ['--bin', 'sslocal']
features {
noDefaultBut "sodium", "android", "rc4", "aes-cfb", "aes-ctr", "camellia-cfb", "openssl-vendored"
}
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")
}
}

Expand Down

0 comments on commit 1bd347a

Please sign in to comment.