diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2017-12-27 12:42:12 -0500 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2018-01-09 11:10:04 -0500 |
commit | c2bc565426e3173ddac015c91194d74da4a1671a (patch) | |
tree | b9b2d3118816014db305a545d9d20dddd3e3bd1c /etc/scons | |
parent | d001b9fe00eafc2ed8b6349fb074c2617447adca (diff) | |
download | mongo-c2bc565426e3173ddac015c91194d74da4a1671a.tar.gz |
SERVER-32409 Android variable file to configure to build with Android NDK standalone toolchain.
Diffstat (limited to 'etc/scons')
-rw-r--r-- | etc/scons/android_ndk.vars | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/etc/scons/android_ndk.vars b/etc/scons/android_ndk.vars new file mode 100644 index 00000000000..ccbeaf376ba --- /dev/null +++ b/etc/scons/android_ndk.vars @@ -0,0 +1,24 @@ +# Configures the build to use the Android NDK toolchain if supplied on the command line + +import os +import platform +import subprocess +import SCons + +compiler_suffix = "" +if platform.system() == "Windows": + compiler_suffix = ".cmd" + +toolchain_path = SCons.Script.Main.GetOption('android-toolchain-path') + +if not toolchain_path: + print("Path to Android standalone toolchain must be set with --android-toolchain-path when using android_ndk.vars") + SCons.Script.Exit(1) + +CC=os.path.join(toolchain_path, "bin", "clang" + compiler_suffix) +CXX=os.path.join(toolchain_path, "bin", "clang++" + compiler_suffix) +AR=subprocess.check_output([CXX, '-print-prog-name=ar']).strip() + +TARGET_OS="linux" +TOOLS="gcc g++ gnulink ar gas" +PROGSUFFIX = ""
\ No newline at end of file |