File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ plugins {
1414}
1515
1616val minSdkVersion = 24
17- val appVersionName = " 2.5.3 "
18- val appVersionCode = 77
17+ val appVersionName = " 2.5.5-beta2 "
18+ val appVersionCode = 79
1919val cargoProfile = (findProperty(" CARGO_PROFILE" ) as String? ) ? : run {
2020 val isRelease = gradle.startParameter.taskNames.any { it.contains(" Release" , ignoreCase = true ) }
2121 if (isRelease) " release" else " debug"
@@ -361,6 +361,12 @@ cargo {
361361 // Pass config encryption key to Rust build.rs for obfuscation
362362 spec.environment(" CONFIG_ENCRYPTION_KEY" , configEncryptionKey)
363363
364+ // Remap the build-machine home directory out of Rust panic strings.
365+ // CARGO_ENCODED_RUSTFLAGS is appended to rustflags in .cargo/config.toml
366+ // so the link-arg flags there are preserved.
367+ val homeDir = System .getProperty(" user.home" )
368+ spec.environment(" CARGO_ENCODED_RUSTFLAGS" , " --remap-path-prefix=${homeDir} =~" )
369+
364370 val toolchainPrebuilt = android.ndkDirectory
365371 .resolve(" toolchains/llvm/prebuilt" )
366372 .listFiles()
Original file line number Diff line number Diff line change @@ -80,16 +80,25 @@ build_openssl() {
8080
8181 make clean 2> /dev/null || true
8282
83+ # Use neutral --prefix/--openssldir/--libdir so the build-machine path is
84+ # not baked into OPENSSLDIR/ENGINESDIR/MODULESDIR in the compiled binary.
85+ # Install via DESTDIR then copy the needed headers and static libs to $OUTPUT.
8386 ./Configure " $TARGET " \
8487 -D__ANDROID_API__=$ANDROID_API \
85- --prefix=" $OUTPUT " \
86- --openssldir=" $OUTPUT " \
88+ --prefix=/usr/local \
89+ --openssldir=/etc/ssl \
90+ --libdir=lib \
8791 no-shared \
8892 no-tests \
8993 no-ui-console
9094
9195 make -j$( nproc 2> /dev/null || sysctl -n hw.ncpu 2> /dev/null || echo 4)
92- make install_sw
96+ local DESTDIR_TMP=" $OUTPUT /destdir"
97+ make install_sw DESTDIR=" $DESTDIR_TMP "
98+ mkdir -p " $OUTPUT /lib" " $OUTPUT /include"
99+ cp -rp " $DESTDIR_TMP /usr/local/include/." " $OUTPUT /include/"
100+ find " $DESTDIR_TMP /usr/local/lib" -name " *.a" -exec cp {} " $OUTPUT /lib/" \;
101+ rm -rf " $DESTDIR_TMP "
93102
94103 echo " OpenSSL for $ABI installed to $OUTPUT "
95104}
You can’t perform that action at this time.
0 commit comments