]> git.saurik.com Git - apple/libplatform.git/blame - xcodeconfig/libplatform.xcconfig
libplatform-254.40.4.tar.gz
[apple/libplatform.git] / xcodeconfig / libplatform.xcconfig
CommitLineData
ada7c492
A
1#include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
2
3VERSIONING_SYSTEM = ""
4
5// Standard settings
6SDKROOT = macosx.internal
7SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
8BUILD_VARIANTS = normal debug dyld static
9
10EXECUTABLE_PREFIX = lib
89154bfb
A
11
12// Pick the right install locations depending on whether building for DriverKit SDK or not
13SDK_INSTALL_VARIANT = $(SDK_INSTALL_VARIANT_$(DRIVERKIT))
14SDK_INSTALL_VARIANT_1 = driverkit
15SDK_INSTALL_VARIANT_ = default
16SDK_INSTALL_ROOT = $(SDK_INSTALL_ROOT_$(SDK_INSTALL_VARIANT))
17SDK_INSTALL_ROOT_driverkit = $(DRIVERKITROOT)
18SDK_INSTALL_HEADERS_ROOT = $(SDK_INSTALL_HEADERS_ROOT_$(SDK_INSTALL_VARIANT))
19SDK_INSTALL_HEADERS_ROOT_driverkit = $(SDK_INSTALL_ROOT)/$(SDK_RUNTIME_HEADERS_PREFIX)
20SDK_RUNTIME_HEADERS_PREFIX = Runtime
21
22INSTALL_PATH = $(SDK_INSTALL_ROOT)/usr/lib/system
23PUBLIC_HEADERS_FOLDER_PATH=$(SDK_INSTALL_HEADERS_ROOT)/usr/include
24PRIVATE_HEADERS_FOLDER_PATH=$(SDK_INSTALL_HEADERS_ROOT)/usr/local/include
ada7c492
A
25
26USE_HEADERMAP = NO
27SKIP_INSTALL = YES
28INSTALLHDRS_SCRIPT_PHASE = YES
29
30GCC_OPTIMIZATION_LEVEL = s
31
32// TODO: Remove -fno-stack-protector once it has been moved down (after libproc is moved down)
89154bfb 33OTHER_CFLAGS = -fno-stack-protector -fdollars-in-identifiers -fno-common -fverbose-asm $(COMPILER_CFLAGS) $(PLATFORM_CFLAGS)
ada7c492
A
34OTHER_CFLAGS_normal = -momit-leaf-frame-pointer
35OTHER_CFLAGS_debug = -fno-inline -O0
36
e45b4692 37GCC_PREPROCESSOR_DEFINITIONS = _FORTIFY_SOURCE=0 $(OSATOMIC_PREPROCESSOR_DEFINITIONS) $(PLATFORM_PREPROCESSOR_DEFINITIONS) $(GCC_PREPROCESSOR_DEFINITIONS_$(CURRENT_VARIANT))
ada7c492
A
38GCC_PREPROCESSOR_DEFINITIONS_dyld = VARIANT_DYLD=1 VARIANT_NO_RESOLVERS=1 VARIANT_STATIC=1
39GCC_PREPROCESSOR_DEFINITIONS_static = VARIANT_NO_RESOLVERS=1 VARIANT_STATIC=1
40GCC_PREPROCESSOR_DEFINITIONS_debug = DEBUG=1
41
e45b4692 42OSATOMIC_PREPROCESSOR_DEFINITIONS = OSATOMIC_USE_INLINED=0 OSATOMIC_DEPRECATED=0 OSSPINLOCK_USE_INLINED=1 OS_UNFAIR_LOCK_INLINE=0
ada7c492
A
43
44STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT))
45STRIP_INSTALLED_PRODUCT_normal = YES
46STRIP_INSTALLED_PRODUCT_dyld = NO
47STRIP_INSTALLED_PRODUCT_static = NO
48STRIP_INSTALLED_PRODUCT_debug = YES
49
50SRCROOT_SEARCH_PATHS = $(SRCROOT)/private $(SRCROOT)/include $(SRCROOT)/internal
89154bfb
A
51HEADER_SEARCH_PATHS = $(SRCROOT_SEARCH_PATHS) $(inherited)
52SYSTEM_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
53SYSTEM_FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks
ada7c492
A
54
55DEAD_CODE_STRIPPING = NO
56
57LINK_WITH_STANDARD_LIBRARIES = NO
58DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION)
59
60PLATFORM_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
61ATOMICS_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)
62CACHECONTROL_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)
63SETJMP_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)
64STRING_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 65UCONTEXT_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
67IS_ZIPPERED = YES
68
69SIMULATOR_LDFLAGS =
70SIMULATOR_LDFLAGS[sdk=macosx*] = -Wl,-simulator_support
71
ada7c492 72OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(TARGET_NAME)) $(CR_LDFLAGS)
442fbc9d 73OTHER_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
75OTHER_LIBTOOLFLAGS = $(OTHER_LIBTOOLFLAGS_$(TARGET_NAME))
76OTHER_LIBTOOLFLAGS_libplatform_simple_dyld = $(CONFIGURATION_BUILD_DIR)/libsimple_$(CURRENT_VARIANT).a
77OTHER_LIBTOOLFLAGS_libplatform_string_dyld = $(CONFIGURATION_BUILD_DIR)/libstring_$(CURRENT_VARIANT).a
78OTHER_LIBTOOLFLAGS_libplatform_os_dyld =
79OTHER_LIBTOOLFLAGS_libplatform_dyld = $(PLATFORM_LIBRARIES)
80OTHER_LIBTOOLFLAGS_libplatform_static = $(PLATFORM_LIBRARIES)
81OTHER_LIBTOOLFLAGS_libatomics = $(ATOMICS_LIBRARIES)
82OTHER_LIBTOOLFLAGS_libcachecontrol = $(CACHECONTROL_LIBRARIES)
e45b4692 83OTHER_LIBTOOLFLAGS_libos = $(OS_LIBRARIES_$(CURRENT_VARIANT))
ada7c492
A
84OTHER_LIBTOOLFLAGS_libsetjmp = $(SETJMP_LIBRARIES)
85OTHER_LIBTOOLFLAGS_libstring = $(STRING_LIBRARIES)
86OTHER_LIBTOOLFLAGS_libucontext = $(UCONTEXT_LIBRARIES)
87
88lsystem_kernel = -lsystem_kernel
89lsystem_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.
104ldyld = -ldyld
105ldyld[sdk=macos*] =
ada7c492 106