blob: 10212a90ebd734f5da2be8f4488b592cff6a7d71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# 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_toolchain.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()
LINKFLAGS='-static-libstdc++'
TARGET_OS="android"
TOOLS="gcc g++ gnulink ar gas"
PROGSUFFIX = ""
|