diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-01-25 13:44:59 -0500 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-02-15 10:44:29 -0500 |
commit | b778690717b7aab1b0cb5274ce562d373c1bee4c (patch) | |
tree | 226b24d2b1ce1ba180d52a99bd78329138442e46 /SConstruct | |
parent | dd1441218307fa6b1a141da4d1327de9f42dd8a9 (diff) | |
download | mongo-b778690717b7aab1b0cb5274ce562d373c1bee4c.tar.gz |
SERVER-32373 building android targets as TARGET_OS=android
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index e77d17f4dfe..a231a57bf1a 100644 --- a/SConstruct +++ b/SConstruct @@ -1061,6 +1061,7 @@ os_macros = { # the above declarations since we will never target them with anything other than XCode 8. "macOS": "defined(__APPLE__) && (TARGET_OS_OSX || (TARGET_OS_MAC && !TARGET_OS_IPHONE))", "linux": "defined(__linux__)", + "android": "defined(__ANDROID__)", } def CheckForOS(context, which_os): @@ -1180,8 +1181,10 @@ env['TARGET_OS_FAMILY'] = 'posix' if env.TargetOSIs('posix') else env.GetTargetO # options for some strange reason in SCons. Instead, we store this # option as a new variable in the environment. if get_option('allocator') == "auto": + # using an allocator besides system on android would require either fixing or disabling + # gperftools on android if env.TargetOSIs('windows') or \ - env.TargetOSIs('linux'): + env.TargetOSIs('linux') and not env.TargetOSIs('android'): env['MONGO_ALLOCATOR'] = "tcmalloc" else: env['MONGO_ALLOCATOR'] = "system" @@ -1450,7 +1453,9 @@ else: env.AppendUnique( CPPDEFINES=[ 'NDEBUG' ] ) if env.TargetOSIs('linux'): - env.Append( LIBS=['m',"resolv"] ) + env.Append( LIBS=["m"] ) + if not env.TargetOSIs('android'): + env.Append( LIBS=["resolv"] ) elif env.TargetOSIs('solaris'): env.Append( LIBS=["socket","resolv","lgrp"] ) |