Skip to content

Commit 294f504

Browse files
committed
Add xcconfigs for Tritium, rationalize build settings
1 parent b8029bd commit 294f504

File tree

4 files changed

+151
-159
lines changed

4 files changed

+151
-159
lines changed

Xcode/Configs/TritiumCommon.xcconfig

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
//===-- Common.xcconfig ---------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
TRITIUM_INSTALL_BASE_PATH = $(TRITIUM_INSTALL_DIR:default=$(LOCAL_LIBRARY_DIR))
14+
TRITIUM_FRAMEWORKS_INSTALL_DIR = $(TRITIUM_INSTALL_BASE_PATH)/Frameworks
15+
16+
// Set the default product name.
17+
PRODUCT_NAME = $(TARGET_NAME)
18+
19+
// Set the versioning system to "Apple Generic" for all targets.
20+
VERSIONING_SYSTEM = apple-generic-hidden
21+
CURRENT_PROJECT_VERSION = 1
22+
23+
// Do not always search user paths.
24+
ALWAYS_SEARCH_USER_PATHS = NO
25+
26+
// Only use API safe for use in app extensions.
27+
APPLICATION_EXTENSION_API_ONLY = YES
28+
29+
// Headermaps are disabled.
30+
USE_HEADERMAP = NO
31+
32+
// llbuild has no @objc APIs, so the generated header is not needed
33+
SWIFT_OBJC_INTERFACE_HEADER_NAME =
34+
SWIFT_INSTALL_OBJC_HEADER = NO
35+
36+
// Enable InstallAPI.
37+
SUPPORTS_TEXT_BASED_API = YES
38+
TAPI_ENABLE_MODULES = YES
39+
TAPI_VERIFY_MODE = ErrorsOnly
40+
41+
// Manually opt targets into installation.
42+
SKIP_INSTALL = YES
43+
44+
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES
45+
SUPPORTED_PLATFORMS = $(AVAILABLE_PLATFORMS)
46+
SUPPORTS_MACCATALYST = YES
47+
48+
MACOSX_DEPLOYMENT_TARGET = 10.15
49+
50+
GCC_C_LANGUAGE_STANDARD = c17
51+
CLANG_CXX_LANGUAGE_STANDARD = c++20
52+
CLANG_CXX_LIBRARY = libc++
53+
54+
#include "Version.xcconfig"
55+
56+
COMMON_PREPROCESSOR_DEFINITIONS = $(LLBUILD_VERSION_DEFINITIONS)
57+
58+
// MARK: Signing Support
59+
60+
// Enable code signing, if appropriate.
61+
LLBUILD_ENABLE_SIGNING = NO
62+
63+
LLBUILD_CODE_SIGN_IDENTITY = $(LLBUILD_CODE_SIGN_IDENTITY__$(LLBUILD_ENABLE_SIGNING))
64+
LLBUILD_CODE_SIGN_IDENTITY__NO =
65+
LLBUILD_CODE_SIGN_IDENTITY__YES = -
66+
67+
// The entitlements to use for binaries.
68+
CODE_SIGN_ENTITLEMENTS = $(LLBUILD_CODE_SIGN_ENTITLEMENTS__producttype_eq_$(PRODUCT_TYPE:identifier))
69+
LLBUILD_CODE_SIGN_ENTITLEMENTS__producttype_eq_com_apple_product_type_tool = $(LLBUILD_TOOL_CODE_SIGN_ENTITLEMENTS)
70+
LLBUILD_TOOL_CODE_SIGN_ENTITLEMENTS =
71+
72+
#include? "TritiumOverrides.xcconfig"

Xcode/Configs/TritiumDebug.xcconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//===-- Debug.xcconfig ----------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
// Shared build settings.
14+
#include "TritiumCommon.xcconfig"
15+
16+
// Only build the active architecture for Debug.
17+
ONLY_ACTIVE_ARCH = YES
18+
19+
DEBUG_INFORMATION_FORMAT = dwarf
20+
STRIP_INSTALLED_PRODUCT = NO
21+
22+
GCC_OPTIMIZATION_LEVEL = 0
23+
SWIFT_OPTIMIZATION_LEVEL = -Onone
24+
25+
GCC_PREPROCESSOR_DEFINITIONS = $(COMMON_PREPROCESSOR_DEFINITIONS)

Xcode/Configs/TritiumRelease.xcconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//===-- Release.xcconfig --------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2024 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
// Shared build settings.
14+
#include "TritiumCommon.xcconfig"
15+
16+
// Prefer binary Info.plists for Release.
17+
INFOPLIST_OUTPUT_FORMAT = binary
18+
19+
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
20+
21+
STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(PRODUCT_TYPE:identifier):default=$(inherited))
22+
STRIP_INSTALLED_PRODUCT_com_apple_product_type_library_static = NO
23+
24+
GCC_OPTIMIZATION_LEVEL = s
25+
26+
GCC_PREPROCESSOR_DEFINITIONS = $(COMMON_PREPROCESSOR_DEFINITIONS) NDEBUG=1

0 commit comments

Comments
 (0)