summaryrefslogtreecommitdiffstats
path: root/system_cmds/xcconfigs
diff options
context:
space:
mode:
Diffstat (limited to 'system_cmds/xcconfigs')
-rw-r--r--system_cmds/xcconfigs/base.xcconfig88
-rw-r--r--system_cmds/xcconfigs/development.xcconfig29
-rw-r--r--system_cmds/xcconfigs/executable.xcconfig45
-rw-r--r--system_cmds/xcconfigs/wait4path.xcconfig16
4 files changed, 178 insertions, 0 deletions
diff --git a/system_cmds/xcconfigs/base.xcconfig b/system_cmds/xcconfigs/base.xcconfig
new file mode 100644
index 0000000..c01bea8
--- /dev/null
+++ b/system_cmds/xcconfigs/base.xcconfig
@@ -0,0 +1,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
diff --git a/system_cmds/xcconfigs/development.xcconfig b/system_cmds/xcconfigs/development.xcconfig
new file mode 100644
index 0000000..16edd7b
--- /dev/null
+++ b/system_cmds/xcconfigs/development.xcconfig
@@ -0,0 +1,29 @@
+// This is the configuration file for building XPC's executables' development
+// support bundle, which houses code that we want to be able to use internally
+// in certain tools, but we don't want to ship externally.
+#include "executable.xcconfig"
+
+SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
+VALID_ARCHS[sdk=macosx*] = i386 x86_64
+
+XPC_SUPPORT_INSTALL_PATH = /usr/local/lib/xpc
+
+OTHER_CFLAGS = $(XPC_EXECUTABLE_OTHER_CFLAGS) -D__XPC_BUILDING_XPCDEVELOPMENT__=1
+HEADER_SEARCH_PATHS = $(XPC_BUILD_HEADER_SEARCH_PATHS) $(PROJECT_DIR)/development
+
+// This is a bundle, which is not stamped by our version-stamping script, so we
+// expand the build variables in the Info.plist.
+INFOPLIST_EXPAND_BUILD_SETTINGS = YES
+INFOPLIST_FILE = development/Info.plist
+
+GCC_ENABLE_OBJC_GC = unsupported
+// <rdar://problem/16129315>
+GCC_ENABLE_OBJC_GC[sdk=macosx*] = supported
+
+// Deployment and linking.
+MACH_O_TYPE = mh_bundle
+PRODUCT_NAME = development
+WRAPPER_EXTENSION = bundle
+INSTALL_PATH_ACTUAL = $(XPC_SUPPORT_INSTALL_PATH)
+OTHER_LDFLAGS = $(XPC_EXECUTABLE_OTHER_LDFLAGS)
+STRIP_STYLE = non-global
diff --git a/system_cmds/xcconfigs/executable.xcconfig b/system_cmds/xcconfigs/executable.xcconfig
new file mode 100644
index 0000000..57a600a
--- /dev/null
+++ b/system_cmds/xcconfigs/executable.xcconfig
@@ -0,0 +1,45 @@
+// This configuration file contains common build settings for all of libxpc's
+// executable targets.
+#include "base.xcconfig"
+
+XPC_EXECUTABLE_OTHER_CFLAGS = $(XPC_BUILD_OTHER_CFLAGS) $(XPC_BUILD_EXPORT_DEFAULTS) -DXPC_BUILD_TARGET_EXECUTABLE=1
+XPC_EXECUTABLE_OTHER_LDFLAGS = $(XPC_CRASHREPORTCLIENT_LDFLAGS)
+XPC_EXECUTABLE_WORKAROUND_14483011 = -lSystem -lobjc
+
+// Building.
+VALID_ARCHS[sdk=macosx*] = x86_64
+GCC_ENABLE_OBJC_EXCEPTIONS = YES
+INFOPLIST_FILE =
+SUPPORTED_PLATFORMS = macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator
+OTHER_CFLAGS = $(XPC_EXECUTABLE_OTHER_CFLAGS)
+
+// Work around asinine default tools behavior of adding entitlements to every
+// generated binary.
+//
+// <rdar://problem/15995721>
+// <rdar://problem/16477165>
+WANTS_GET_TASK_ALLOW = NO
+
+// Deployment linking.
+MACH_O_TYPE = mh_execute
+PRODUCT_NAME = xpc_executables
+EXECUTABLE_PREFIX =
+FRAMEWORK_SEARCH_PATHS = $(SDKROOT)/System/Library/PrivateFrameworks $(inherited)
+STRIP_STYLE = all
+XPC_EXECUTABLE_OTHER_LDFLAGS = $(XPC_EXECUTABLE_WORKAROUND_14483011) $(XPC_CRASHREPORTCLIENT_LDFLAGS)
+CREATE_INFOPLIST_SECTION_IN_BINARY = YES
+
+// Output our launchd plist as binary on iOS.
+APPLY_RULES_IN_COPY_FILES[sdk=iphoneos*] = YES
+PLIST_FILE_OUTPUT_FORMAT[sdk=iphoneos*] = binary
+
+// For building variants
+DARWIN_VARIANT_LOWER_RELEASE = release
+DARWIN_VARIANT_SUFFIX_RELEASE =
+DARWIN_VARIANT_LOWER_DEVELOPMENT = development
+DARWIN_VARIANT_SUFFIX_DEVELOPMENT = .development
+DARWIN_VARIANT_LOWER_DEBUG = debug
+DARWIN_VARIANT_SUFFIX_DEBUG = .debug
+
+DARWIN_VARIANT_LOWER = $(DARWIN_VARIANT_LOWER_$(DARWIN_VARIANT))
+DARWIN_VARIANT_SUFFIX = $(DARWIN_VARIANT_SUFFIX_$(DARWIN_VARIANT))
diff --git a/system_cmds/xcconfigs/wait4path.xcconfig b/system_cmds/xcconfigs/wait4path.xcconfig
new file mode 100644
index 0000000..81909c4
--- /dev/null
+++ b/system_cmds/xcconfigs/wait4path.xcconfig
@@ -0,0 +1,16 @@
+#include "executable.xcconfig"
+
+SUPPORTED_PLATFORMS = macosx
+
+DARWIN_VARIANT = RELEASE
+#include "../wait4path/wait4path.version"
+
+HEADER_SEARCH_PATHS = $(XPC_BUILD_HEADER_SEARCH_PATHS) $(PROJECT_DIR)/wait4path
+OTHER_CFLAGS = $(XPC_EXECUTABLE_OTHER_CFLAGS) $(XPC_BUILD_EXPORT_DEFAULTS) -D__XPC_BUILDING_WAIT4PATH__=1
+OTHER_LDFLAGS = $(XPC_EXECUTABLE_OTHER_LDFLAGS)
+
+# wait4path doesn't actually need -lCrashReporterClient
+XPC_CRASHREPORTCLIENT_LDFLAGS = ""
+
+INSTALL_PATH = /bin
+PRODUCT_NAME = wait4path