summaryrefslogtreecommitdiff
path: root/external/nss
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-04-19 15:18:49 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-04-20 05:19:03 +0200
commit128de1949ff120ac925dbb06e398fa992fb295ba (patch)
treebb8add7d7a0da7d1ef222149d9b98e8a1e23ca32 /external/nss
parent258fd217a35444ed245528ccbabdef62869c0419 (diff)
android: Use property instead of ANDROID_NDK_HOME env var
Write an `ndk.dir` property with the directory path to `android/source/local.properties` instead, similar to how it's done for `sdk.dir`. Also, rename the `ANDROID_NDK_HOME` variable that's assigned in configure.ac that holds the corresponding value to `ANDROID_NDK_DIR`, because the gradle warning still shows up if that environment variable is set in addition to having an `ndk.dir` property in `local.properties`. This makes the following gradle warning disappear: > > Task :stripStrippedUIDebugDebugSymbols > WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead. > Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead. Note however, that with this approach of using the `ndk.dir` property instead of the suggested `android.ndkVersion` (with the latter having the stricter requirement that the `ndk` dir would have to be a subdir of the SDK dir), doing the actual upgrade to a newer Gradle (plugin) version in follow-up commit Change-Id Ia982d72d877e229c3006c6d528b830d16c88481f "android: Update Android Gradle Plugin to 7.1.3" revealed that the use of the `ndk.dir` property is deprecated in newer Gradle (plugin) versions as well, resulting in this warning. > > Task :stripStrippedUIDebugDebugSymbols > [CXX5106] NDK was located by using ndk.dir property. This method is > deprecated and will be removed in a future release. Please delete > ndk.dir from local.properties and set android.ndkVersion to > [20.0.5594570] in all native modules in the project. > https://developer.android.com/r/studio-ui/ndk-dir It might make sense to address that in a follow-up step, but for now, it's an improvement and keeps it working after the upgrade without potentially causing any incompatibility problems with existing autogen configurations, while support for the `ANDROID_NDK_HOME` env var that was used so far seems to have been dropped, resulting in > > Task :stripStrippedUIDebugDebugSymbols > Unable to strip the following libraries, packaging them as they are: > libc++_shared.so, libfreebl3.so, liblo-native-code.so, libnspr4.so, > libnss3.so, libnssckbi.so, libnssdbm3.so, libnssutil3.so, > libplc4.so, libplds4.so, libsmime3.so, libsoftokn3.so, > libsqlite3.so, libssl3.so. instead if upgrading gradle without switching to the use of the property. Change-Id: I4a090e8736dac80777f69b0e12819b9c056f582b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133177 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'external/nss')
-rw-r--r--external/nss/ExternalProject_nss.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 4297be931e69..ee3c7839fcb6 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -76,7 +76,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): \
COMMA=$(COMMA) \
CC="$(CC)$(if $(filter iOS,$(OS)), -DNSS_STATIC_SOFTOKEN=1 -DNSS_STATIC_FREEBL=1 -DNSS_STATIC_PKCS11=1)$(if $(filter ANDROID,$(OS)), -D_PR_NO_LARGE_FILES=1 -DSQLITE_DISABLE_LFS=1)" CCC="$(CXX)" \
$(if $(CROSS_COMPILING),NSINSTALL="$(if $(filter MACOSX,$(OS_FOR_BUILD)),xcrun python3,$(call gb_ExternalExecutable_get_command,python)) $(SRCDIR)/external/nss/nsinstall.py") \
- $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=16 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_HOME) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(ANDROID_NDK_HOME)/sysroot ANDROID_TOOLCHAIN=$(ANDROID_BINUTILS_PREBUILT_ROOT)) \
+ $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=16 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_DIR) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(ANDROID_NDK_DIR)/sysroot ANDROID_TOOLCHAIN=$(ANDROID_BINUTILS_PREBUILT_ROOT)) \
NSS_DISABLE_GTESTS=1 \
nss_build_all \
&& rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \