20 lines
1.2 KiB
Plaintext
20 lines
1.2 KiB
Plaintext
# Configures the build to use XCode targeting macOS
|
|
|
|
import subprocess
|
|
import SCons
|
|
|
|
CC = subprocess.check_output(['xcrun', '-f', '--sdk', 'macosx', 'clang']).decode('utf-8').strip()
|
|
CXX = subprocess.check_output(['xcrun', '-f', '--sdk', 'macosx', 'clang++']).decode('utf-8').strip()
|
|
DSYMUTIL = subprocess.check_output(['xcrun', '-f', '--sdk', 'macosx', 'dsymutil']).decode('utf-8').strip()
|
|
STRIP = subprocess.check_output(['xcrun', '-f', '--sdk', 'macosx', 'strip']).decode('utf-8').strip()
|
|
|
|
visibility_support = SCons.Script.Main.GetOption('visibility-support')
|
|
if visibility_support != "off" and SCons.Script.Main.GetOption('link-model').startswith('dynamic'):
|
|
TAPI = subprocess.check_output(['xcrun', '-f', '--sdk', 'macosx', 'tapi']).decode('utf-8').strip()
|
|
|
|
sdk_path = subprocess.check_output(['xcrun', '--sdk', 'macosx', '--show-sdk-path']).decode('utf-8').strip()
|
|
|
|
CCFLAGS = "-isysroot {} -mmacosx-version-min=10.14 -target darwin18.0.0 -arch x86_64".format(sdk_path)
|
|
ASFLAGS = "-isysroot {} -mmacosx-version-min=10.14 -target darwin18.0.0 -arch x86_64".format(sdk_path)
|
|
LINKFLAGS = "-Wl,-syslibroot,{} -mmacosx-version-min=10.14 -target darwin18.0.0 -arch x86_64".format(sdk_path)
|