blob: d54b004433bdc4b40257956f644695a54afe82cb (
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
27
28
29
|
# 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()
OBJCOPY=subprocess.check_output([CXX, '-print-prog-name=objcopy']).strip()
LINKFLAGS='-static-libstdc++ -fuse-ld=gold'
CPPDEFINES='__ANDROID_API__=21 ASIO_DISABLE_STD_STRING_VIEW'
TARGET_OS="android"
TOOLS="gcc g++ gnulink ar gas"
PROGSUFFIX = ""
|