summaryrefslogtreecommitdiffstats
path: root/make/lib/gluegen-cpptasks-android-aarch64.xml
diff options
context:
space:
mode:
Diffstat (limited to 'make/lib/gluegen-cpptasks-android-aarch64.xml')
-rw-r--r--make/lib/gluegen-cpptasks-android-aarch64.xml100
1 files changed, 54 insertions, 46 deletions
diff --git a/make/lib/gluegen-cpptasks-android-aarch64.xml b/make/lib/gluegen-cpptasks-android-aarch64.xml
index 1daa201..4b6401b 100644
--- a/make/lib/gluegen-cpptasks-android-aarch64.xml
+++ b/make/lib/gluegen-cpptasks-android-aarch64.xml
@@ -23,7 +23,7 @@
<property name="isAndroidARM64" value="true" />
<property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
<property name="isCrosscompilation" value="true" />
- <property name="android.abi" value="arm64-v8a" />
+ <property name="android.abi" value="${env.ANDROID_ABI}" /> <!-- arm64-v8a -->
<property name="isAbiEabiGnuArmel" value="true" />
<echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-android-aarch64' done"/>
</target>
@@ -32,24 +32,27 @@
<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir,declare.linux.android">
<echo message="Custom forced compiler Android NDK, linker.cfg.android" />
- <compiler id="compiler.cfg.android" name="gcc">
- <compilerarg value="--sysroot=${TARGET_PLATFORM_SYSROOT}" />
- <!-- The default search dirs for 'gcc from $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin will not find
- subprograms properly (see gcc -print-search-dirs). Not sure if this is a bug in the NDK
- or not. Need to explicitly indicate where subprograms are with -B.
- NOTE: This is not necessary if using '$TARGET_TRIPLE-gcc' from $NDK_TOOLCHAIN_ROOT/bin. -->
- <compilerarg value="-B${env.NDK_TOOLCHAIN_ROOT}/libexec/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}" />
+ <compiler id="compiler.cfg.android" name="clang">
+ <compilerarg value="--sysroot=${env.ANDROID_TOOLCHAIN_SYSROOT}" />
+
+ <!-- compilerarg value="-v" / -->
<compilerarg value="-fpic" />
<!-- compilerarg value="-fPIE" / --> <!-- not for shared libs, won't produce symbols -->
<!-- compilerarg value="-pie" / --> <!-- not for shared libs, won't produce symbols -->
+
+ <!-- from sdk cmake start -->
+ <compilerarg value="-fdata-sections" />
<compilerarg value="-ffunction-sections" />
<compilerarg value="-funwind-tables" />
- <compilerarg value="-fstack-protector" />
+ <compilerarg value="-fstack-protector-strong" />
<!-- compilerarg value="-no-canonical-prefixes" / --> <!-- will disallow creating shared library -->
- <compilerarg value="-Wa,--noexecstack" />
+ <!-- from sdk cmake end -->
+ <compilerarg value="-Wa,--noexecstack" />
+ <compilerarg value="-target" />
+ <compilerarg value="${env.ANDROID_LLVM_TRIPLE}" /> <!-- aarch64-none-linux-android -->
<!-- compilerarg value="-mabi=lp64" />
<compilerarg value="-mlittle-endian" />
<compilerarg value="-march=armv8-a" / -->
@@ -60,15 +63,15 @@
<!-- compilerarg value="-g" unless="c.compiler.use-debug" / -->
<compilerarg value="-fomit-frame-pointer" unless="c.compiler.use-debug"/>
<compilerarg value="-fstrict-aliasing" unless="c.compiler.use-debug"/>
- <compilerarg value="-funswitch-loops" unless="c.compiler.use-debug"/>
- <compilerarg value="-finline-limit=300" unless="c.compiler.use-debug"/>
+ <!-- compilerarg value="-funswitch-loops" unless="c.compiler.use-debug"/ not supported -->
+ <!-- compilerarg value="-finline-limit=300" unless="c.compiler.use-debug"/ not supported -->
<compilerarg value="-O0" if="c.compiler.use-debug" />
<compilerarg value="-g" if="c.compiler.use-debug" />
<compilerarg value="-fno-omit-frame-pointer" if="c.compiler.use-debug" />
<compilerarg value="-fno-strict-aliasing" if="c.compiler.use-debug" />
- <includepath path="${env.NDK_TOOLCHAIN_ROOT}/lib/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}/include" /> <!-- for stdarg.h -->
+ <!-- includepath path="${env.ANDROID_TOOLCHAIN_SYSROOT_INC}" / -->
<defineset>
<define name="__unix__" />
<!-- define name="__ARM_ARCH_5__" />
@@ -85,39 +88,44 @@
</defineset>
</compiler>
- <linker id="linker.cfg.android" name="gcc">
- <linkerarg value="--sysroot=${TARGET_PLATFORM_SYSROOT}" />
-
- <linkerarg value="-fpic" />
- <!-- linkerarg value="-fPIE" / --> <!-- not for shared libs, won't produce symbols -->
- <!-- linkerarg value="-pie" / --> <!-- not for shared libs, won't produce symbols -->
- <!-- linkerarg value="-no-canonical-prefixes" / --> <!-- will disallow creating shared library -->
-
- <linkerarg value="-fno-use-linker-plugin" />
-
- <!-- linkerarg value="-mabi=lp64" />
- <linkerarg value="-mlittle-endian" />
- <linkerarg value="-march=armv8-a" / -->
- <!-- linkerarg value="-mfloat-abi=softfp" / -->
-
- <linkerarg value="-nostdlib" />
- <linkerarg value="-Bdynamic" />
- <linkerarg value="-Wl,-dynamic-linker,/system/bin/linker" />
- <linkerarg value="-Wl,-z,nocopyreloc" />
-
- <linkerarg value="--demangle" />
- <linkerarg value="--gc-sections" />
- <linkerarg value="--no-undefined" />
- <linkerarg value="-static-libgcc" if="isGCC"/>
- <linkerarg value="-static-libstdc++" if="isGCC"/>
- <!-- The gcc from $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin needs to be told
- where to find libgcc as the default location (gcc -print-search-dirs)
- is not correct. Not sure if this is a bug in the NDK or not. We also
- enforce that libgcc is linked after source files but before other shared
- libraries. -->
- <libset dir="${env.NDK_TOOLCHAIN_ROOT}/lib/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}" libs="gcc" />
- <!-- libset libs="c,m,dl,log" / -->
- <libset libs="c,m,dl" />
+ <linker id="linker.cfg.android" name="clang">
+ <linkerarg value="--sysroot=${env.ANDROID_TOOLCHAIN_SYSROOT}" />
+ <!-- linkerarg value="-Wl,-L,${env.ANDROID_TOOLCHAIN_SYSROOT_LIB_0}" / -->
+ <linkerarg value="-Wl,-L,${env.ANDROID_TOOLCHAIN_SYSROOT_LIB_1}" />
+
+ <!-- linkerarg value="-v" / -->
+
+ <linkerarg value="-fpic" />
+ <!-- linkerarg value="-fPIE" / --> <!-- not for shared libs, won't produce symbols -->
+ <!-- linkerarg value="-pie" / --> <!-- not for shared libs, won't produce symbols -->
+ <!-- linkerarg value="-no-canonical-prefixes" / --> <!-- will disallow creating shared library -->
+
+ <!-- from sdk cmake start -->
+ <linkerarg value="-Wl,--build-id" />
+ <linkerarg value="-Wl,--warn-shared-textrel" />
+ <!-- linkerarg value="-Wl,- -fatal-warnings" / -->
+ <!-- from sdk cmake end -->
+
+ <linkerarg value="-fno-use-linker-plugin" />
+
+ <!-- linkerarg value="-mabi=lp64" />
+ <linkerarg value="-mlittle-endian" />
+ <linkerarg value="-march=armv8-a" / -->
+ <!-- linkerarg value="-mfloat-abi=softfp" / -->
+
+ <linkerarg value="-nostdlib" />
+ <linkerarg value="-Bdynamic" />
+ <linkerarg value="-Wl,-dynamic-linker,/system/bin/linker" />
+ <linkerarg value="-Wl,-z,nocopyreloc" />
+
+ <linkerarg value="--demangle" />
+ <linkerarg value="--gc-sections" />
+ <linkerarg value="--no-undefined" />
+ <linkerarg value="-static-libgcc" if="isGCC"/>
+ <linkerarg value="-static-libstdc++" if="isGCC"/>
+
+ <!-- libset libs="c,m,dl,log" / -->
+ <libset libs="c,m,dl" />
</linker>
</target>