aboutsummaryrefslogtreecommitdiffstats
path: root/system_cmds/xcconfigs/base.xcconfig
blob: c01bea857468b8538bf48fc72b590eda73e8cfb8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include "<DEVELOPER_DIR>/Makefiles/CoreOS/Xcode/BSD.xcconfig"
#include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/PlatformSupport.xcconfig"

XPC_BUILD_FILES_DIR = $(PROJECT_DIR)/xcfiles
XPC_BUILD_XCSCRIPTS_DIR = $(PROJECT_DIR)/xcscripts
XPC_BUILD_XCCONFIG_DIR = $(PROJECT_DIR)/xcconfig

XPC_BUILD_HEADER_SEARCH_PATHS = $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(PROJECT_DIR)/src $(PROJECT_DIR)/interface $(PROJECT_DIR)/launch $(PROJECT_DIR)/support $(PROJECT_DIR)/development $(PROJECT_DIR)

XPC_ALL_THE_DEBUGS2 =
XPC_ALL_THE_DEBUGS2_yes = -O0 -g -fno-inline -fno-limit-debug-info

XPC_COMPATIBILITY_DEFINES_currentmajor = -DHAVE_KDEBUG_TRACE=1 -DCONFIG_EMULATE_XNU_INITPROC_SELECTION=0 -DHAVE_GALARCH_AVAILABILITY=1
XPC_COMPATIBILITY_DEFINES_lastmajor = -DHAVE_KDEBUG_TRACE=0 -DCONFIG_EMULATE_XNU_INITPROC_SELECTION=1 -DHAVE_GALARCH_AVAILABILITY=0
XPC_BUILD_HOST = currentmajor

XPC_BUILD_EXPORT_DEFAULTS = -DXPC_PROJECT_EXPORT=XPC_EXPORT -DXPC_DEBUGEXPORT=XPC_NOEXPORT -DXPC_TESTEXPORT=XPC_NOEXPORT
XPC_BUILD_OTHER_CFLAGS = $(XPC_ALL_THE_DEBUGS2_$(XPC_ALL_THE_DEBUGS)) $(XPC_COMPATIBILITY_DEFINES_$(XPC_BUILD_HOST)) -D__XPC_PROJECT_BUILD__=1

XPC_CRASHREPORTCLIENT_LDFLAGS = -lCrashReporterClient

XPC_NOSTRIP = no
XPC_NOSTRIP2_no = YES
XPC_NOSTRIP2_yes = NO

// Building.
ARCHS = $(ARCHS_STANDARD)
ONLY_ACTIVE_ARCH = NO
GCC_C_LANGUAGE_STANDARD = gnu99
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
GCC_SYMBOLS_PRIVATE_EXTERN = YES
GCC_ENABLE_OBJC_GC = unsupported
GCC_ENABLE_BUILTIN_FUNCTIONS = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNUSED_VARIABLE = YES

CLANG_WARN_CONSTANT_CONVERSION = YES
CLANG_WARN_INT_CONVERSION = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym

OTHER_CFLAGS = $(XPC_BUILD_OTHER_CFLAGS)

// We pretty much want to avoid anything having to do with Xcode's default
// header search behavior.
ALWAYS_SEARCH_USER_PATHS = NO
USE_HEADERMAP = NO
HEADER_SEARCH_PATHS = $(XPC_BUILD_HEADER_SEARCH_PATHS)

// Deployment and linking.
// By default, clang will link any binary using Objective-C against Foundation.
// We need to opt out of this to avoid a layering inversion.
//
// <rdar://problem/11075809>
CLANG_LINK_OBJC_RUNTIME = NO
CLANG_MODULES_AUTOLINK = NO

DYLIB_CURRENT_VERSION = $(RC_ProjectSourceVersion)
DYLIB_COMPATIBILITY_VERSION = 1
DEPLOYMENT_LOCATION = YES

// Preprocessing the Info.plist sends it through the C preprocessor. You cannot
// use both of these options together, since they emit different files to
// different places. I'm putting them here mostly just so I don't forget what
// they're called in case we do want to start using them in the future.
INFOPLIST_PREPROCESS = NO
INFOPLIST_EXPAND_BUILD_SETTINGS = NO

// SEPARATE_STRIP will tell the linker to not strip the emitted binary. Instead,
// the strip will happen as a separate invocation of the strip(1) tool, leaving
// the binaries in our OBJROOT untouched but stripping the ones that go into the
// DSTROOT and SYMROOT. INSTALLED_PRODUCT_ASIDES makes it so that the stuff in
// the SYMROOT is not just symlinked into the DSTROOT, which lets us preserve
// the symbols for the stuff in there.
STRIP_INSTALLED_PRODUCT = $(XPC_NOSTRIP2_$(XPC_NOSTRIP))

// STRIP_INSTALLED_PRODUCT does not appear to be respected on a per-variant
// basis, so this does nothing.
STRIP_INSTALLED_PRODUCT_debug = NO
INSTALLED_PRODUCT_ASIDES = YES
SEPARATE_STRIP = YES