]> git.saurik.com Git - apple/libpthread.git/blame - xcodescripts/pthread.xcconfig
libpthread-454.100.8.tar.gz
[apple/libpthread.git] / xcodescripts / pthread.xcconfig
CommitLineData
f1a1da6c 1#include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
f1a1da6c 2
964d3577
A
3SDKROOT = macosx.internal
4SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
a0619f9c
A
5BUILD_VARIANTS = normal debug
6
c6e5f90c
A
7SDK_INSTALL_VARIANT = $(SDK_INSTALL_VARIANT_$(DRIVERKIT))
8SDK_INSTALL_VARIANT_1 = driverkit
9SDK_INSTALL_VARIANT_ = default
10SDK_INSTALL_ROOT = $(SDK_INSTALL_ROOT_$(SDK_INSTALL_VARIANT))
11SDK_INSTALL_ROOT_driverkit = $(DRIVERKITROOT)
12SDK_INSTALL_HEADERS_ROOT = $(SDK_INSTALL_HEADERS_ROOT_$(SDK_INSTALL_VARIANT))
13SDK_INSTALL_HEADERS_ROOT_driverkit = $(SDK_INSTALL_ROOT)/$(SDK_RUNTIME_HEADERS_PREFIX)
14SDK_RUNTIME_HEADERS_PREFIX = Runtime
15
16INSTALL_PATH = $(SDK_INSTALL_ROOT)/usr/lib/system
a0619f9c
A
17EXECUTABLE_PREFIX = lib
18PRODUCT_NAME = system_pthread
c6e5f90c
A
19PUBLIC_HEADERS_FOLDER_PATH = $(SDK_INSTALL_HEADERS_ROOT)/usr/include/pthread
20PRIVATE_HEADERS_FOLDER_PATH = $(SDK_INSTALL_HEADERS_ROOT)/usr/local/include/pthread
a0619f9c 21
c1f56ec9
A
22COPY_HEADERS_RUN_UNIFDEF = YES
23COPY_HEADERS_UNIFDEF_FLAGS = -U__PTHREAD_BUILDING_PTHREAD__
24
25SRCROOT_SEARCH_PATHS = $(SRCROOT)/src/resolver $(SRCROOT)/private $(SRCROOT)/include $(SRCROOT)
c6e5f90c
A
26SYSTEM_FRAMEWORK_HEADERS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
27HEADER_SEARCH_PATHS = $($(PRODUCT_NAME)_SEARCH_PATHS) $(SRCROOT_SEARCH_PATHS) $(inherited)
28SYSTEM_HEADER_SEARCH_PATHS = $(SYSTEM_FRAMEWORK_HEADERS) $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/usr/local/include $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/usr/include
29SYSTEM_FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/$(SDK_INSTALL_HEADERS_ROOT)/System/Library/Frameworks
a0619f9c 30INSTALLHDRS_SCRIPT_PHASE = YES
f1a1da6c
A
31ALWAYS_SEARCH_USER_PATHS = YES
32USE_HEADERMAP = NO
f1a1da6c
A
33
34GCC_OPTIMIZATION_LEVEL = s
a0619f9c
A
35GCC_C_LANGUAGE_STANDARD = gnu11
36GCC_ENABLE_OBJC_EXCEPTIONS = NO
37GCC_NO_COMMON_BLOCKS = YES
f1a1da6c 38GCC_SYMBOLS_PRIVATE_EXTERN = NO
a0619f9c 39CLANG_LINK_OBJC_RUNTIME = NO
f1a1da6c 40
f1a1da6c 41GCC_WARN_64_TO_32_BIT_CONVERSION = YES
a0619f9c
A
42GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
43GCC_WARN_ABOUT_MISSING_NEWLINE = YES
c1f56ec9 44GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
f1a1da6c 45GCC_WARN_ABOUT_RETURN_TYPE = YES
a0619f9c
A
46GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
47GCC_WARN_SIGN_COMPARE = YES
48GCC_WARN_SHADOW = YES
49GCC_WARN_UNKNOWN_PRAGMAS = YES
50GCC_WARN_UNUSED_FUNCTION = YES
51GCC_WARN_UNUSED_LABEL = YES
52// GCC_WARN_UNUSED_PARAMETER = YES
53GCC_WARN_UNUSED_VALUE = YES
f1a1da6c 54GCC_WARN_UNUSED_VARIABLE = YES
a0619f9c
A
55GCC_WARN_UNINITIALIZED_AUTOS = YES
56CLANG_WARN_ASSIGN_ENUM = YES
57CLANG_WARN_BOOL_CONVERSION = YES
58CLANG_WARN_CONSTANT_CONVERSION = YES
59CLANG_WARN_DOCUMENTATION_COMMENTS = YES
60CLANG_WARN_EMPTY_BODY = YES
61CLANG_WARN_ENUM_CONVERSION = YES
62//CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
63CLANG_WARN_INFINITE_RECURSION = YES
64// CLANG_WARN_INT_CONVERSION = YES
65CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
66CLANG_WARN_SUSPICIOUS_MOVE = YES
67CLANG_WARN_UNREACHABLE_CODE = YES
68CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
f1a1da6c 69
c1f56ec9
A
70DISABLED_WARNING_CFLAGS = -Wno-int-conversion -Wno-sign-compare -Wno-sign-conversion -Wno-unused-parameter
71WARNING_CFLAGS = -Wall -Wextra -Wmost -Warray-bounds-pointer-arithmetic -Wcomma -Wconditional-uninitialized -Wcovered-switch-default -Wdate-time -Wdeprecated -Wdouble-promotion -Wduplicate-enum -Wfloat-equal -Widiomatic-parentheses -Wignored-qualifiers -Wimplicit-fallthrough -Wmissing-noreturn -Wnullable-to-nonnull-conversion -Wover-aligned -Wpointer-arith -Wstatic-in-inline -Wtautological-compare -Wunguarded-availability -Wunused -Watomic-implicit-seq-cst $(NO_WARNING_CFLAGS) $(DISABLED_WARNING_CFLAGS)
72NO_WARNING_CFLAGS = -Wno-pedantic -Wno-bad-function-cast -Wno-c++98-compat-pedantic -Wno-cast-align -Wno-cast-qual -Wno-disabled-macro-expansion -Wno-documentation-unknown-command -Wno-format-nonliteral -Wno-packed -Wno-padded -Wno-reserved-id-macro -Wno-switch-enum -Wno-undef -Wno-unreachable-code-aggressive -Wno-unused-macros -Wno-used-but-marked-unused
f1a1da6c 73
c1f56ec9 74BASE_PREPROCESSOR_MACROS = __LIBC__ __POSIX_LIB__ __DARWIN_UNIX03=1 __DARWIN_64_BIT_INO_T=1 __DARWIN_NON_CANCELABLE=1 __DARWIN_VERS_1050=1 _FORTIFY_SOURCE=0 __PTHREAD_BUILDING_PTHREAD__=1 $(SIM_PREPROCESSOR_MACROS) __PTHREAD_EXPOSE_INTERNALS__ OS_ATOMIC_CONFIG_MEMORY_ORDER_DEPENDENCY=1
a0619f9c 75GCC_PREPROCESSOR_DEFINITIONS = $(BASE_PREPROCESSOR_MACROS) $(PLATFORM_PREPROCESSOR_DEFINITIONS)
2546420a 76
a0619f9c 77// TODO: Remove -fstack-protector on _debug when it is moved to libplatform
c6e5f90c 78OTHER_CFLAGS = -fno-stack-protector -fno-stack-check -fno-builtin $(PLATFORM_CFLAGS) $($(PRODUCT_NAME)_CFLAGS)
a0619f9c
A
79OTHER_CFLAGS_normal = -momit-leaf-frame-pointer
80OTHER_CFLAGS_debug = -fno-inline -O0 -DDEBUG=1
f1a1da6c 81
a0619f9c
A
82LINK_WITH_STANDARD_LIBRARIES = NO
83DYLIB_CURRENT_VERSION = $(RC_ProjectSourceVersion)
84DYLIB_COMPATIBILITY_VERSION = 1
214d78a2 85DIRTY_LDFLAGS = -Wl,-dirty_data_list,$(SRCROOT)/xcodescripts/pthread.dirty
4d915364
A
86// i386 Simulator shared-cache cannot handle __data_dirty
87DIRTY_LDFLAGS[sdk=macos*][arch=i386] =
c1f56ec9
A
88
89LEGACY_ALIAS_LDFLAGS =
90LEGACY_ALIAS_LDFLAGS[sdk=macos*][arch=i386*] = -Wl,-alias_list,$(SRCROOT)/xcodescripts/pthread-i386.aliases
91ALIAS_LDFLAGS = -Wl,-alias_list,$(SRCROOT)/xcodescripts/pthread.aliases $(LEGACY_ALIAS_LDFLAGS)
92
93// rdar://problem/46882983&54282933
94// On macOS, to support the i386 watchOS Simulator, we will continue building
95// libpthread with an i386 slice for the foreseeable future, even though the
96// rest of the OS has dropped i386. (This also applies to libplatform and
97// libsyscall). Normally, dylibs with any dependency on another dylib need
98// to link libdyld for lazy stub binding. libdyld has many dependencies, so
99// that would create a dependency cycle that leads to the whole libSystem
100// umbrella keeping an i386 slice. Instead, ld64 has changed so that the
101// i386 simulator_support slice of libpthread doesn't use lazy binding and so
102// doesn't need -ldyld.
103// So, to break the dependency cycle, macOS libpthread will not link libdyld.
104// All other platforms (including DriverKit on macOS) will continue to link
105// libdyld.
106MACOS_NO_LIBDYLD_LDFLAGS = -ldyld
107MACOS_NO_LIBDYLD_LDFLAGS[sdk=macos*] =
108
109DYLIB_LDFLAGS = -Wl,-umbrella,System -L$(SDK_INSTALL_ROOT)/usr/lib/system -lsystem_kernel -lsystem_platform $(MACOS_NO_LIBDYLD_LDFLAGS) // Don't add compiler_rt or libdyld
110OTHER_LDFLAGS = $(ALIAS_LDFLAGS) $(DYLIB_LDFLAGS) $(DIRTY_LDFLAGS) $(CR_LDFLAGS) $(PLATFORM_LDFLAGS) $(SIMULATOR_LDFLAGS)
c6e5f90c
A
111
112SIMULATOR_LDFLAGS =
113SIMULATOR_LDFLAGS[sdk=macosx*] = -Wl,-simulator_support
114IS_ZIPPERED = YES
115
f1a1da6c
A
116
117// Simulator build rules
964d3577 118EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = *.c *.s
f1a1da6c
A
119SKIP_INSTALL[sdk=iphonesimulator*] = YES
120OTHER_LDFLAGS[sdk=iphonesimulator*] =