Repository navigation
Expand file tree
/
Copy pathlibJavaScriptCore.xcconfig
More file actions
75 lines (63 loc) · 4.13 KB
/
Copy pathlibJavaScriptCore.xcconfig
File metadata and controls
75 lines (63 loc) · 4.13 KB
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
// Copyright (C) 2009-2023 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseTarget.xcconfig"
WK_OPTIMIZATION_PROFILE_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/Profiling/$(arch).profdata;
WK_COMPRESSED_OPTIMIZATION_PROFILE_FOLDER = $(WK_COMPRESSED_OPTIMIZATION_PROFILE_FOLDER_$(USE_INTERNAL_SDK));
WK_COMPRESSED_OPTIMIZATION_PROFILE_FOLDER_YES = $(WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH)/Profiling;
// WTF builds first as a dependency of JSC and decompresses the same
// PGO profile JSC uses. JSC's Copy Profiling Data phase symlinks to WTF's
// already-decompressed output when present, falling back to a fresh decompression
// if WTF's output is missing. This saves 50MB of disk space at desk.
WK_CLANG_PGO_REUSE_FROM_TARGET = WTF;
WK_ENABLE_CLANG_PGO_USE = $(WK_ENABLE_CLANG_PGO_USE_$(WK_NOT_$(ENABLE_LLVM_PROFILE_GENERATION))_$(USE_INTERNAL_SDK)_$(CONFIGURATION)_$(WK_PLATFORM_NAME));
WK_ENABLE_CLANG_PGO_USE_YES_YES_Release_macosx = YES;
WK_ENABLE_CLANG_PGO_USE_YES_YES_Release_iphoneos = YES;
WK_ENABLE_CLANG_PGO_USE_YES_YES_Release_xros = YES;
WK_ENABLE_CLANG_PGO_USE_YES_YES_Production_macosx = YES;
WK_ENABLE_CLANG_PGO_USE_YES_YES_Production_iphoneos = YES;
WK_ENABLE_CLANG_PGO_USE_YES_YES_Production_xros = YES;
WK_CLANG_PGO_USE_CFLAGS = $(WK_CLANG_PGO_USE_CFLAGS_$(WK_ENABLE_CLANG_PGO_USE));
WK_CLANG_PGO_USE_CFLAGS_YES = -fprofile-use=$(WK_OPTIMIZATION_PROFILE_FILE) -Wno-error=backend-plugin;
WK_CLANG_PGO_USE_LDFLAGS = $(WK_CLANG_PGO_USE_LDFLAGS_$(WK_ENABLE_CLANG_PGO_USE));
WK_CLANG_PGO_USE_LDFLAGS_YES = -fprofile-use=$(WK_OPTIMIZATION_PROFILE_FILE) -Wno-error=backend-plugin;
// Swift's IR-PGO consumer only accepts profiles produced by clang's own IR PGO
// instrumentation, so only ever enable it in lockstep with WK_ENABLE_CLANG_PGO_USE
// rather than tracking it separately. Swift PGO is supported only starting from
// macOS 26, because earlier deployment targets generate a Frontend profile
// instead of an IR one.
WK_SWIFT_IR_PGO_SUPPORTED = YES;
WK_SWIFT_IR_PGO_SUPPORTED[sdk=macosx*] = $(WK_SWIFT_IR_PGO_SUPPORTED$(WK_MACOS_1500_2600));
WK_SWIFT_IR_PGO_SUPPORTED_MACOS_BEFORE_2600 = NO;
WK_SWIFT_IR_PGO_SUPPORTED_MACOS_SINCE_2600 = YES;
WK_SWIFT_PGO_USE_FLAGS = $(WK_SWIFT_PGO_USE_FLAGS_$(WK_AND_$(WK_ENABLE_CLANG_PGO_USE)_$(WK_SWIFT_IR_PGO_SUPPORTED)));
WK_SWIFT_PGO_USE_FLAGS_YES = -Xfrontend -ir-profile-use=$(WK_OPTIMIZATION_PROFILE_FILE);
OTHER_CFLAGS = $(inherited) $(WK_CLANG_PGO_USE_CFLAGS) $(WK_CLANG_PGO_GEN_FLAGS);
OTHER_LDFLAGS = $(inherited) $(WK_CLANG_PGO_USE_LDFLAGS) $(WK_CLANG_PGO_GEN_FLAGS);
// rdar://174426778: Force a 64-bit fat header, as some build configurations
// generate a >4GB static archive but do not trigger sizing logic inside lipo.
OTHER_LIPOFLAGS = $(inherited) -fat64;
SKIP_INSTALL = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
STRIP_INSTALLED_PRODUCT = NO;
EXCLUDED_SOURCE_FILE_NAMES = $(inherited);
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = $(inherited) framework.sb;