]> git.saurik.com Git - apple/libsystem.git/blame - Libsystem.xcconfig
Libsystem-1292.100.5.tar.gz
[apple/libsystem.git] / Libsystem.xcconfig
CommitLineData
afef526e 1#include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
2fbbb8fa 2
c06d156a
A
3// NO means only libSystem.B_asan.dylib will be ASanified.
4// YES means even the normal variant, libSystem.B.dylib, will be ASanified.
421cd580
A
5//
6// XBS sets RC_SUPPORT_ADDRESS_SANITIZATION=1 to trigger the ASanified normal variant.
b8ce8438
A
7ASAN_IN_NORMAL_VARIANT_DK_ = YES
8ASAN_IN_NORMAL_VARIANT_DK_1 = NO
9ASAN_IN_NORMAL_VARIANT_RC_1 = $(ASAN_IN_NORMAL_VARIANT_DK_$(DRIVERKIT))
10ASAN_IN_NORMAL_VARIANT_RC_ = NO
11ASAN_IN_NORMAL_VARIANT = $(ASAN_IN_NORMAL_VARIANT_RC_$(RC_SUPPORT_ADDRESS_SANITIZATION))
c06d156a 12
3186893e
A
13// Apple Internal Sanitizer dylib path
14SANITIZER_DYLIB_DIR = /usr/appleinternal/lib/sanitizers
15
a08f8358
A
16ASAN_CFLAGS_NO =
17ASAN_CFLAGS_YES = -DSUPPORT_ASAN=1
18ASAN_LDFLAGS_NO =
3186893e 19SHARED_ASAN_LDFLAGS = -L $(SDKROOT)$(SANITIZER_DYLIB_DIR) -Xlinker -not_for_dyld_shared_cache -rpath $(SANITIZER_DYLIB_DIR)/
c06d156a
A
20ASAN_LDFLAGS_YES[sdk=macosx*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_osx_dynamic
21ASAN_LDFLAGS_YES[sdk=iphoneos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_ios_dynamic
22ASAN_LDFLAGS_YES[sdk=watchos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_watchos_dynamic
23ASAN_LDFLAGS_YES[sdk=appletvos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_tvos_dynamic
24ASAN_LDFLAGS_YES[sdk=bridgeos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_bridgeos_dynamic
a08f8358
A
25
26// "no_asan" variant
27//
28// The "no_asan" variant is only built when ASAN_IN_NORMAL_VARIANT=YES.
29// The variant exists to provide a way to opt-out processes from the
30// "Whole OS ASan" mode. It should be identical to the "normal" variant
31// except it does **not** upward link the ASan runtime. Despite the name,
32// this does not enforce that ASan is not used. This is because an ASan
33// instrumented binary could also cause the ASan runtime to be loaded.
34NOASAN_CFLAGS_YES = $(ASAN_CFLAGS_YES)
35NOASAN_LDFLAGS_YES =
36EXTRA_BUILD_VARIANTS_ASAN_IN_NORMAL_VARIANT_NO =
37EXTRA_BUILD_VARIANTS_ASAN_IN_NORMAL_VARIANT_YES = no_asan
38EXTRA_BUILD_VARIANTS_ASAN_IN_NORMAL_VARIANT = $(EXTRA_BUILD_VARIANTS_ASAN_IN_NORMAL_VARIANT_$(ASAN_IN_NORMAL_VARIANT))
c06d156a 39
b8ce8438
A
40SDK_INSTALL_VARIANT = $(SDK_INSTALL_VARIANT_$(DRIVERKIT))
41SDK_INSTALL_VARIANT_1 = driverkit
42SDK_INSTALL_VARIANT_ = default
43SDK_INSTALL_ROOT = $(SDK_INSTALL_ROOT_$(SDK_INSTALL_VARIANT))
44SDK_INSTALL_ROOT_driverkit = $(DRIVERKITROOT)
45SDK_INSTALL_HEADERS_ROOT = $(SDK_INSTALL_HEADERS_ROOT_$(SDK_INSTALL_VARIANT))
46SDK_INSTALL_HEADERS_ROOT_driverkit = $(SDK_INSTALL_ROOT)/$(SDK_RUNTIME_HEADERS_PREFIX)
47SDK_RUNTIME_HEADERS_PREFIX = Runtime
48
49BUILD_VARIANTS = $(BUILD_VARIANTS_$(SDK_INSTALL_VARIANT))
a08f8358 50BUILD_VARIANTS_default = normal debug asan $(EXTRA_BUILD_VARIANTS_ASAN_IN_NORMAL_VARIANT)
b8ce8438 51BUILD_VARIANTS_driverkit = normal debug
9acf5127 52SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
b8ce8438
A
53INSTALL_PATH = $(SDK_INSTALL_ROOT)/usr/lib
54INSTALL_PATH_PREFIX = $(SDK_INSTALL_ROOT)
55INSTALL_PATH_FRAMEWORK_PREFIX = $(SDK_INSTALL_HEADERS_ROOT)
afef526e 56DYLIB_CURRENT_VERSION = $(CURRENT_VERSION_STRING_$(RC_XBS))
b8ce8438
A
57// used in PRODUCT_NAME of dylib target
58DYLIB_NAME_VERSION_SUFFIX = .B
59DYLIB_NAME_VERSION_SUFFIX[sdk=driverkit*] =
afef526e
A
60ORDER_FILE = $(SDKROOT)/$(APPLE_INTERNAL_DIR)/OrderFiles/libSystem.order
61ORDER_FILE[sdk=iphonesimulator*] =
b8ce8438
A
62ORDER_FILE[sdk=driverkit*] =
63SYSTEM_HEADER_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/usr/local/include $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/usr/include
64SYSTEM_FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/PrivateFrameworks $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks
a08f8358
A
65
66OTHER_CFLAGS = -include $(BUILT_PRODUCTS_DIR)/config.$(CURRENT_ARCH).$(CURRENT_VARIANT).h -DCURRENT_VARIANT_$(CURRENT_VARIANT)=1
67OTHER_CFLAGS_normal = $(ASAN_CFLAGS_$(ASAN_IN_NORMAL_VARIANT:default=NO))
68// Preserve existing behaviour of modifying debug variant.
69OTHER_CFLAGS_debug = $(ASAN_CFLAGS_$(ASAN_IN_NORMAL_VARIANT:default=NO))
70OTHER_CFLAGS_asan = $(ASAN_CFLAGS_YES)
71OTHER_CFLAGS_no_asan = $(NOASAN_CFLAGS_YES)
72
73OTHER_LDFLAGS = -Wl,-search_paths_first -nodefaultlibs @$(BUILT_PRODUCTS_DIR)/linker_arguments.$(CURRENT_ARCH).$(CURRENT_VARIANT).txt $(DRIVERKIT_LDFLAGS)
74OTHER_LDFLAGS_normal = $(ASAN_LDFLAGS_$(ASAN_IN_NORMAL_VARIANT:default=NO))
75// Preserve existing behaviour of modifying debug variant.
76OTHER_LDFLAGS_debug = $(ASAN_LDFLAGS_$(ASAN_IN_NORMAL_VARIANT:default=NO))
c06d156a 77OTHER_LDFLAGS_asan = $(ASAN_LDFLAGS_YES)
a08f8358
A
78OTHER_LDFLAGS_no_asan = $(NOASAN_LDFLAGS_YES)
79
80
b8ce8438
A
81// whitelist of libraries in DriverKit SDK allowed to link directly against libSystem.dylib (outside of the umbrella)
82DRIVERKIT_LDFLAGS[sdk=driverkit*] = -Wl,-allowable_client,c++ -Wl,-allowable_client,c++abi -Wl,-allowable_client,DriverKit
afef526e
A
83LD_GENERATE_MAP_FILE = YES
84EXECUTABLE_PREFIX = lib
b8ce8438
A
85PRIVATE_HEADERS_FOLDER_PATH = $(SDK_INSTALL_HEADERS_ROOT)/usr/local/include/os
86LIBRARY_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_ROOT)/usr/lib/system $(SDKROOT)/$(SDK_INSTALL_ROOT)/usr/local/lib/system
afef526e
A
87GCC_NO_COMMON_BLOCKS = YES
88GCC_WARN_64_TO_32_BIT_CONVERSION = YES
89GCC_WARN_ABOUT_RETURN_TYPE = YES
90GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
91GCC_TREAT_WARNINGS_AS_ERRORS = YES
92GCC_WARN_UNUSED_VARIABLE = YES
93CURRENT_VERSION_STRING_ = 159
94CURRENT_VERSION_STRING_YES = $(CURRENT_PROJECT_VERSION)
9acf5127
A
95INFOPLIST_INSTALL_PATH = Versions/B/Resources
96INFOPLIST_INSTALL_PATH[sdk=iphoneos*] =
97INFOPLIST_INSTALL_PATH[sdk=*simulator*] =
98INFOPLIST_INSTALL_PATH[sdk=watchos*] =
a8f6861e
A
99INFOPLIST_OUTPUT_FORMAT = binary
100INFOPLIST_OUTPUT_FORMAT[sdk=macosx*] = xml
101APPLY_RULES_IN_COPY_FILES = YES
102PLIST_FILE_OUTPUT_FORMAT = binary
103PLIST_FILE_OUTPUT_FORMAT[sdk=macosx*] = xml
b8ce8438 104EXCLUDED_SOURCE_FILE_NAMES[sdk=driverkit*] = Info.plist
a8f6861e 105
3186893e
A
106EXCLUDED_SOURCE_FILE_NAMES = $(inherited) i386.c
107INCLUDED_SOURCE_FILE_NAMES[sdk=macos*][arch=i386] = $(inherited) i386.c
108EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*][arch=i386] = $(inherited) init.c CompatibilityHacks.c
109
a8f6861e
A
110// override presence of $(EXECUTABLE_VARIANT_SUFFIX) in the default EXECUTABLE_NAME rdar://26234727
111DYLIB_INSTALL_NAME_EXECUTABLE_NAME = $(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)
112DYLIB_INSTALL_NAME_EXECUTABLE_PATH = $(DYLIB_INSTALL_NAME_EXECUTABLE_NAME)
113LD_DYLIB_INSTALL_NAME = $(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(DYLIB_INSTALL_NAME_EXECUTABLE_PATH)
a85a94cf
A
114
115IS_ZIPPERED = YES