]>
Commit | Line | Data |
---|---|---|
ada7c492 A |
1 | #include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig" |
2 | ||
3 | VERSIONING_SYSTEM = "" | |
4 | ||
5 | // Standard settings | |
6 | SDKROOT = macosx.internal | |
7 | SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator | |
8 | BUILD_VARIANTS = normal debug dyld static | |
9 | ||
10 | EXECUTABLE_PREFIX = lib | |
89154bfb A |
11 | |
12 | // Pick the right install locations depending on whether building for DriverKit SDK or not | |
13 | SDK_INSTALL_VARIANT = $(SDK_INSTALL_VARIANT_$(DRIVERKIT)) | |
14 | SDK_INSTALL_VARIANT_1 = driverkit | |
15 | SDK_INSTALL_VARIANT_ = default | |
16 | SDK_INSTALL_ROOT = $(SDK_INSTALL_ROOT_$(SDK_INSTALL_VARIANT)) | |
17 | SDK_INSTALL_ROOT_driverkit = $(DRIVERKITROOT) | |
18 | SDK_INSTALL_HEADERS_ROOT = $(SDK_INSTALL_HEADERS_ROOT_$(SDK_INSTALL_VARIANT)) | |
19 | SDK_INSTALL_HEADERS_ROOT_driverkit = $(SDK_INSTALL_ROOT)/$(SDK_RUNTIME_HEADERS_PREFIX) | |
20 | SDK_RUNTIME_HEADERS_PREFIX = Runtime | |
21 | ||
22 | INSTALL_PATH = $(SDK_INSTALL_ROOT)/usr/lib/system | |
23 | PUBLIC_HEADERS_FOLDER_PATH=$(SDK_INSTALL_HEADERS_ROOT)/usr/include | |
24 | PRIVATE_HEADERS_FOLDER_PATH=$(SDK_INSTALL_HEADERS_ROOT)/usr/local/include | |
ada7c492 A |
25 | |
26 | USE_HEADERMAP = NO | |
27 | SKIP_INSTALL = YES | |
28 | INSTALLHDRS_SCRIPT_PHASE = YES | |
29 | ||
30 | GCC_OPTIMIZATION_LEVEL = s | |
31 | ||
32 | // TODO: Remove -fno-stack-protector once it has been moved down (after libproc is moved down) | |
89154bfb | 33 | OTHER_CFLAGS = -fno-stack-protector -fdollars-in-identifiers -fno-common -fverbose-asm $(COMPILER_CFLAGS) $(PLATFORM_CFLAGS) |
ada7c492 A |
34 | OTHER_CFLAGS_normal = -momit-leaf-frame-pointer |
35 | OTHER_CFLAGS_debug = -fno-inline -O0 | |
36 | ||
e45b4692 | 37 | GCC_PREPROCESSOR_DEFINITIONS = _FORTIFY_SOURCE=0 $(OSATOMIC_PREPROCESSOR_DEFINITIONS) $(PLATFORM_PREPROCESSOR_DEFINITIONS) $(GCC_PREPROCESSOR_DEFINITIONS_$(CURRENT_VARIANT)) |
ada7c492 A |
38 | GCC_PREPROCESSOR_DEFINITIONS_dyld = VARIANT_DYLD=1 VARIANT_NO_RESOLVERS=1 VARIANT_STATIC=1 |
39 | GCC_PREPROCESSOR_DEFINITIONS_static = VARIANT_NO_RESOLVERS=1 VARIANT_STATIC=1 | |
40 | GCC_PREPROCESSOR_DEFINITIONS_debug = DEBUG=1 | |
41 | ||
e45b4692 | 42 | OSATOMIC_PREPROCESSOR_DEFINITIONS = OSATOMIC_USE_INLINED=0 OSATOMIC_DEPRECATED=0 OSSPINLOCK_USE_INLINED=1 OS_UNFAIR_LOCK_INLINE=0 |
ada7c492 A |
43 | |
44 | STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT)) | |
45 | STRIP_INSTALLED_PRODUCT_normal = YES | |
46 | STRIP_INSTALLED_PRODUCT_dyld = NO | |
47 | STRIP_INSTALLED_PRODUCT_static = NO | |
48 | STRIP_INSTALLED_PRODUCT_debug = YES | |
49 | ||
50 | SRCROOT_SEARCH_PATHS = $(SRCROOT)/private $(SRCROOT)/include $(SRCROOT)/internal | |
89154bfb A |
51 | HEADER_SEARCH_PATHS = $(SRCROOT_SEARCH_PATHS) $(inherited) |
52 | 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 | |
53 | SYSTEM_FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks | |
ada7c492 A |
54 | |
55 | DEAD_CODE_STRIPPING = NO | |
56 | ||
57 | LINK_WITH_STANDARD_LIBRARIES = NO | |
58 | DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION) | |
59 | ||
60 | PLATFORM_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libsimple_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libatomics_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libcachecontrol_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libos_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libsetjmp_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libstring_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libucontext_$(CURRENT_VARIANT).a | |
61 | ATOMICS_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libatomics_i386_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libatomics_x86_64_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libatomics_arm_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libatomics_arm64_$(CURRENT_VARIANT).a $(EXTRA_ATOMICS_LIBRARIES) | |
62 | CACHECONTROL_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libcachecontrol_i386_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libcachecontrol_x86_64_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libcachecontrol_arm_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libcachecontrol_arm64_$(CURRENT_VARIANT).a $(EXTRA_CACHECONTROL_LIBRARIES) | |
63 | SETJMP_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libsetjmp_i386_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libsetjmp_x86_64_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libsetjmp_arm_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libsetjmp_arm64_$(CURRENT_VARIANT).a $(EXTRA_SETJMP_LIBRARIES) | |
64 | STRING_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libstring_i386_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libstring_x86_64_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libstring_arm_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libstring_arm64_$(CURRENT_VARIANT).a $(EXTRA_STRING_LIBRARIES) | |
442fbc9d | 65 | UCONTEXT_LIBRARIES = $(CONFIGURATION_BUILD_DIR)/libucontext_i386_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libucontext_x86_64_$(CURRENT_VARIANT).a $(CONFIGURATION_BUILD_DIR)/libucontext_arm64_$(CURRENT_VARIANT).a |
ada7c492 | 66 | |
89154bfb A |
67 | IS_ZIPPERED = YES |
68 | ||
69 | SIMULATOR_LDFLAGS = | |
70 | SIMULATOR_LDFLAGS[sdk=macosx*] = -Wl,-simulator_support | |
71 | ||
ada7c492 | 72 | OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(TARGET_NAME)) $(CR_LDFLAGS) |
442fbc9d | 73 | OTHER_LDFLAGS_libsystem_platform = -all_load $(PLATFORM_LIBRARIES) -umbrella System -L$(SDK_INSTALL_ROOT)/usr/lib/system $(ldyld) $(lsystem_kernel) -Wl,-alias_list,$(SRCROOT)/xcodeconfig/libplatform.aliases,$(DIRTY_DATA_LDFLAGS) $(SIMULATOR_LDFLAGS) |
ada7c492 A |
74 | |
75 | OTHER_LIBTOOLFLAGS = $(OTHER_LIBTOOLFLAGS_$(TARGET_NAME)) | |
76 | OTHER_LIBTOOLFLAGS_libplatform_simple_dyld = $(CONFIGURATION_BUILD_DIR)/libsimple_$(CURRENT_VARIANT).a | |
77 | OTHER_LIBTOOLFLAGS_libplatform_string_dyld = $(CONFIGURATION_BUILD_DIR)/libstring_$(CURRENT_VARIANT).a | |
78 | OTHER_LIBTOOLFLAGS_libplatform_os_dyld = | |
79 | OTHER_LIBTOOLFLAGS_libplatform_dyld = $(PLATFORM_LIBRARIES) | |
80 | OTHER_LIBTOOLFLAGS_libplatform_static = $(PLATFORM_LIBRARIES) | |
81 | OTHER_LIBTOOLFLAGS_libatomics = $(ATOMICS_LIBRARIES) | |
82 | OTHER_LIBTOOLFLAGS_libcachecontrol = $(CACHECONTROL_LIBRARIES) | |
e45b4692 | 83 | OTHER_LIBTOOLFLAGS_libos = $(OS_LIBRARIES_$(CURRENT_VARIANT)) |
ada7c492 A |
84 | OTHER_LIBTOOLFLAGS_libsetjmp = $(SETJMP_LIBRARIES) |
85 | OTHER_LIBTOOLFLAGS_libstring = $(STRING_LIBRARIES) | |
86 | OTHER_LIBTOOLFLAGS_libucontext = $(UCONTEXT_LIBRARIES) | |
87 | ||
88 | lsystem_kernel = -lsystem_kernel | |
89 | lsystem_kernel[sdk=iphonesimulator*] = -lsystem_sim_kernel | |
442fbc9d A |
90 | |
91 | // rdar://problem/46882983&54282933 | |
92 | // On macOS, to support the i386 watchOS Simulator, we will continue building | |
93 | // libplatform with an i386 slice for the foreseeable future, even though the | |
94 | // rest of the OS has dropped i386. (This also applies to libpthread and | |
95 | // libsyscall). Normally, dylibs with any dependency on another dylib need | |
96 | // to link libdyld for lazy stub binding. libdyld has many dependencies, so | |
97 | // that would create a dependency cycle that leads to the whole libSystem | |
98 | // umbrella keeping an i386 slice. Instead, ld64 has changed so that the | |
99 | // i386 simulator_support slice of libplatform doesn't use lazy binding and so | |
100 | // doesn't need -ldyld. | |
101 | // So, to break the dependency cycle, macOS libplatform will not link libdyld. | |
102 | // All other platforms (including DriverKit on macOS) will continue to link | |
103 | // libdyld. | |
104 | ldyld = -ldyld | |
105 | ldyld[sdk=macos*] = | |
ada7c492 | 106 |