]> git.saurik.com Git - apple/libsystem.git/blob - Libsystem.xcconfig
Libsystem-1281.100.1.tar.gz
[apple/libsystem.git] / Libsystem.xcconfig
1 #include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
2
3 // NO means only libSystem.B_asan.dylib will be ASanified.
4 // YES means even the normal variant, libSystem.B.dylib, will be ASanified.
5 //
6 // XBS sets RC_SUPPORT_ADDRESS_SANITIZATION=1 to trigger the ASanified normal variant.
7 ASAN_IN_NORMAL_VARIANT_DK_ = YES
8 ASAN_IN_NORMAL_VARIANT_DK_1 = NO
9 ASAN_IN_NORMAL_VARIANT_RC_1 = $(ASAN_IN_NORMAL_VARIANT_DK_$(DRIVERKIT))
10 ASAN_IN_NORMAL_VARIANT_RC_ = NO
11 ASAN_IN_NORMAL_VARIANT = $(ASAN_IN_NORMAL_VARIANT_RC_$(RC_SUPPORT_ADDRESS_SANITIZATION))
12
13 ASAN_CFLAGS_ =
14 ASAN_CFLAGS_YES = -DCURRENT_VARIANT_asan=1
15 ASAN_LDFLAGS_ =
16 SHARED_ASAN_LDFLAGS = -L $(SDKROOT)/usr/local/lib/sanitizers -Xlinker -not_for_dyld_shared_cache -rpath /usr/local/lib/sanitizers/
17 ASAN_LDFLAGS_YES[sdk=macosx*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_osx_dynamic
18 ASAN_LDFLAGS_YES[sdk=iphoneos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_ios_dynamic
19 ASAN_LDFLAGS_YES[sdk=watchos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_watchos_dynamic
20 ASAN_LDFLAGS_YES[sdk=appletvos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_tvos_dynamic
21 ASAN_LDFLAGS_YES[sdk=bridgeos*] = $(SHARED_ASAN_LDFLAGS) -Xlinker -upward-lclang_rt.asan_bridgeos_dynamic
22 ASAN_IN_NORMAL_VARIANT_CFLAGS = $(ASAN_CFLAGS_$(ASAN_IN_NORMAL_VARIANT))
23 ASAN_IN_NORMAL_VARIANT_LDFLAGS = $(ASAN_LDFLAGS_$(ASAN_IN_NORMAL_VARIANT))
24
25 SDK_INSTALL_VARIANT = $(SDK_INSTALL_VARIANT_$(DRIVERKIT))
26 SDK_INSTALL_VARIANT_1 = driverkit
27 SDK_INSTALL_VARIANT_ = default
28 SDK_INSTALL_ROOT = $(SDK_INSTALL_ROOT_$(SDK_INSTALL_VARIANT))
29 SDK_INSTALL_ROOT_driverkit = $(DRIVERKITROOT)
30 SDK_INSTALL_HEADERS_ROOT = $(SDK_INSTALL_HEADERS_ROOT_$(SDK_INSTALL_VARIANT))
31 SDK_INSTALL_HEADERS_ROOT_driverkit = $(SDK_INSTALL_ROOT)/$(SDK_RUNTIME_HEADERS_PREFIX)
32 SDK_RUNTIME_HEADERS_PREFIX = Runtime
33
34 BUILD_VARIANTS = $(BUILD_VARIANTS_$(SDK_INSTALL_VARIANT))
35 BUILD_VARIANTS_default = normal debug asan
36 BUILD_VARIANTS_driverkit = normal debug
37 SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
38 INSTALL_PATH = $(SDK_INSTALL_ROOT)/usr/lib
39 INSTALL_PATH_PREFIX = $(SDK_INSTALL_ROOT)
40 INSTALL_PATH_FRAMEWORK_PREFIX = $(SDK_INSTALL_HEADERS_ROOT)
41 DYLIB_CURRENT_VERSION = $(CURRENT_VERSION_STRING_$(RC_XBS))
42 // used in PRODUCT_NAME of dylib target
43 DYLIB_NAME_VERSION_SUFFIX = .B
44 DYLIB_NAME_VERSION_SUFFIX[sdk=driverkit*] =
45 ORDER_FILE = $(SDKROOT)/$(APPLE_INTERNAL_DIR)/OrderFiles/libSystem.order
46 ORDER_FILE[sdk=iphonesimulator*] =
47 ORDER_FILE[sdk=driverkit*] =
48 SYSTEM_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
49 SYSTEM_FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/PrivateFrameworks $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks
50 OTHER_CFLAGS = -include $(BUILT_PRODUCTS_DIR)/config.$(CURRENT_ARCH).$(CURRENT_VARIANT).h -DCURRENT_VARIANT_$(CURRENT_VARIANT)=1 $(ASAN_IN_NORMAL_VARIANT_CFLAGS)
51 OTHER_LDFLAGS = -Wl,-search_paths_first -nodefaultlibs @$(BUILT_PRODUCTS_DIR)/linker_arguments.$(CURRENT_ARCH).$(CURRENT_VARIANT).txt $(ASAN_IN_NORMAL_VARIANT_LDFLAGS) $(DRIVERKIT_LDFLAGS)
52 OTHER_LDFLAGS_asan = $(ASAN_LDFLAGS_YES)
53 // whitelist of libraries in DriverKit SDK allowed to link directly against libSystem.dylib (outside of the umbrella)
54 DRIVERKIT_LDFLAGS[sdk=driverkit*] = -Wl,-allowable_client,c++ -Wl,-allowable_client,c++abi -Wl,-allowable_client,DriverKit
55 LD_GENERATE_MAP_FILE = YES
56 EXECUTABLE_PREFIX = lib
57 PRIVATE_HEADERS_FOLDER_PATH = $(SDK_INSTALL_HEADERS_ROOT)/usr/local/include/os
58 LIBRARY_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_ROOT)/usr/lib/system $(SDKROOT)/$(SDK_INSTALL_ROOT)/usr/local/lib/system
59 GCC_NO_COMMON_BLOCKS = YES
60 GCC_WARN_64_TO_32_BIT_CONVERSION = YES
61 GCC_WARN_ABOUT_RETURN_TYPE = YES
62 GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
63 GCC_TREAT_WARNINGS_AS_ERRORS = YES
64 GCC_WARN_UNUSED_VARIABLE = YES
65 CURRENT_VERSION_STRING_ = 159
66 CURRENT_VERSION_STRING_YES = $(CURRENT_PROJECT_VERSION)
67 INFOPLIST_INSTALL_PATH = Versions/B/Resources
68 INFOPLIST_INSTALL_PATH[sdk=iphoneos*] =
69 INFOPLIST_INSTALL_PATH[sdk=*simulator*] =
70 INFOPLIST_INSTALL_PATH[sdk=watchos*] =
71 INFOPLIST_OUTPUT_FORMAT = binary
72 INFOPLIST_OUTPUT_FORMAT[sdk=macosx*] = xml
73 APPLY_RULES_IN_COPY_FILES = YES
74 PLIST_FILE_OUTPUT_FORMAT = binary
75 PLIST_FILE_OUTPUT_FORMAT[sdk=macosx*] = xml
76 EXCLUDED_SOURCE_FILE_NAMES[sdk=driverkit*] = Info.plist
77
78 // override presence of $(EXECUTABLE_VARIANT_SUFFIX) in the default EXECUTABLE_NAME rdar://26234727
79 DYLIB_INSTALL_NAME_EXECUTABLE_NAME = $(EXECUTABLE_PREFIX)$(PRODUCT_NAME)$(EXECUTABLE_SUFFIX)
80 DYLIB_INSTALL_NAME_EXECUTABLE_PATH = $(DYLIB_INSTALL_NAME_EXECUTABLE_NAME)
81 LD_DYLIB_INSTALL_NAME = $(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(DYLIB_INSTALL_NAME_EXECUTABLE_PATH)
82
83 IS_ZIPPERED = YES