diff options
author | Andrew Morrow <acm@mongodb.com> | 2017-02-09 18:18:04 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2017-02-15 18:40:45 -0500 |
commit | 38c0eb538d0fd390c6cb9ce9ae9894153f6e8ef5 (patch) | |
tree | de472ad7aa7163f977b861525af5a852cf33f6f2 /src/mongo/SConscript | |
parent | 34c00f16a8890775c71c63c860e2086c6bb603aa (diff) | |
download | mongo-38c0eb538d0fd390c6cb9ce9ae9894153f6e8ef5.tar.gz |
SERVER-28004 Add build system support for iOS-related Darwin variants
Use a SCons invocation like the following to attach to the correct SDK
and targeting options.
// macOS native build:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk macosx --show-sdk-path` -mmacosx-version-min=10.10" CC=`xcrun -f --sdk macosx clang` CXX=`xcrun -f --sdk macosx clang++`all
// iOS Cross:
> python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk iphoneos --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphoneos clang` CXX=`xcrun -f --sdk iphoneos clang++` TARGET_OS=iOS TARGET_ARCH=aarch64 all
// iOS Simulator Cross:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk iphonesimulator --show-sdk-path` -miphoneos-version-min=10.2" CC=`xcrun -f --sdk iphonesimulator clang` CXX=`xcrun -f --sdk iphonesimulator clang++` TARGET_OS=iOS-sim all
// tvOS Cross:
> python buildscripts/scons.py CCFLAGS="-arch arm64 -isysroot `xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-arch arm64 -Wl,-syslibroot,`xcrun --sdk appletvos --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvos clang` CXX=`xcrun -f --sdk appletvos clang++` TARGET_OS=tvOS TARGET_ARCH=aarch64 all
// tvOS Simulator Cross:
> python buildscripts/scons.py CCFLAGS="-isysroot `xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" LINKFLAGS="-Wl,-syslibroot,`xcrun --sdk appletvsimulator --show-sdk-path` -mtvos-version-min=10.1" CC=`xcrun -f --sdk appletvsimulator clang` CXX=`xcrun -f --sdk appletvsimulator clang++` TARGET_OS=tvOS-sim
To run the resulting binaries under the simulator, boot a particular
target machine with 'xcrun simctl':
> xcrun simctl boot 'Apple TV 1080p'
Find the ID of the instance that was booted:
> xcrun simctl list | grep 'Apple TV 1080p'
And then spawn the intended binary inside the simulator with that ID:
> xcrun simctl spawn CEEC6346-6D21-4092-A091-E5A3862A357F build/opt/mongo/mongod --dbpath=tmp
Diffstat (limited to 'src/mongo/SConscript')
-rw-r--r-- | src/mongo/SConscript | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/SConscript b/src/mongo/SConscript index 3d37701d1bf..245ae719803 100644 --- a/src/mongo/SConscript +++ b/src/mongo/SConscript @@ -458,7 +458,7 @@ def installBinary( e, name ): else: debug_sym_cmd = '${OBJCOPY} --only-keep-debug ${SOURCE} ${TARGET}' debug_sym_name += '.debug' - elif e.TargetOSIs('osx'): + elif e.TargetOSIs('darwin'): debug_sym_name += '.dSYM' debug_sym_cmd = 'dsymutil -o ${TARGET} ${SOURCE}' elif e.ToolchainIs('msvc'): @@ -549,7 +549,7 @@ if not len(module_banner_filenames) == len(env['MODULE_BANNERS']): module_banner_dirs = set([Dir('#').rel_path(f.get_dir()) for f in env['MODULE_BANNERS']]) module_banner_transforms = ["--transform %s=$SERVER_DIST_BASENAME" % d for d in module_banner_dirs] -# Allow modules to map original file name directories to subdirectories +# Allow modules to map original file name directories to subdirectories # within the archive (e.g. { "src/mongo/db/modules/enterprise/docs": "snmp"}) archive_addition_transforms = [] for full_dir, archive_dir in env["ARCHIVE_ADDITION_DIR_MAP"].items(): |