-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchromium.build.apple.patch
160 lines (148 loc) · 5.7 KB
/
chromium.build.apple.patch
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index b5c5cb75e..e2a433d2f 100644
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -561,7 +561,7 @@ foreach(_target_type,
if (is_clang && (!defined(invoker.use_libcxx_modules) ||
invoker.use_libcxx_modules)) {
# This is necessary for Clang modules builds.
- deps += [ "//buildtools/third_party/libc++:std" ]
+ # deps += [ "//buildtools/third_party/libc++:std" ]
}
# Consumed by the unsafe-buffers plugin during compile.
@@ -652,10 +652,10 @@ foreach(_target_type,
invoker.use_libcxx_modules)) {
# These are necessary for Clang modules builds.
deps += [
- "//buildtools/third_party/libc++:_Builtin_limits",
- "//buildtools/third_party/libc++:_Builtin_stdarg",
- "//buildtools/third_party/libc++:_Builtin_stddef",
- "//buildtools/third_party/libc++:std",
+ # "//buildtools/third_party/libc++:_Builtin_limits",
+ # "//buildtools/third_party/libc++:_Builtin_stdarg",
+ # "//buildtools/third_party/libc++:_Builtin_stddef",
+ # "//buildtools/third_party/libc++:std",
]
}
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index ae6cbc24e..ca562b137 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -1974,28 +1974,12 @@ config("default_warnings") {
cflags += [
# TODO(crbug.com/330524456): -Wcast-function-type is under -Wextra now.
"-Wno-cast-function-type",
-
- # TODO(crbug.com/40284799): Fix and re-enable.
- "-Wno-thread-safety-reference-return",
-
- # TODO(crbug.com/376641662): Fix and re-enable.
- "-Wno-nontrivial-memcall",
]
cflags_cc += [
# TODO(crbug.com/328490295): Fix and re-enable for C flags.
"-Wenum-compare-conditional",
]
-
- if (!is_nacl) {
- cflags_cc += [
- # TODO(crbug.com/41486292): Fix and re-enable.
- "-Wno-c++11-narrowing-const-reference",
- ]
-
- # TODO(crbug.com/344680447): Fix and re-enable.
- cflags_cc += [ "-Wno-missing-template-arg-list-after-template-kw" ]
- }
}
# Some builders, such as Cronet, use a different version of Clang than
@@ -2946,7 +2930,7 @@ config("symbols") {
configs += [ "//build/config:compress_debug_sections" ]
}
- if (is_clang && !is_nacl && is_win && !is_component_build) {
+ if (is_clang && !is_nacl && is_win && !is_component_build && is_apple) {
# Remove unreferenced methods to reduce type info in symbols.
# See: https://github.com/llvm/llvm-project/pull/87018.
# The downside with this flag is precisely that: Unreferenced methods get
diff --git a/config/ios/BUILD.gn b/config/ios/BUILD.gn
index a3c560a62..8a912beb1 100644
--- a/config/ios/BUILD.gn
+++ b/config/ios/BUILD.gn
@@ -257,6 +257,14 @@ group("xctest") {
_xctrunner_path =
"$ios_sdk_platform_path/Developer/Library/Xcode/Agents/XCTRunner.app"
+if (target_environment == "catalyst") {
+ _xctrunner_executable_path =
+ "$_xctrunner_path/Contents/MacOS/XCTRunner"
+} else {
+ _xctrunner_executable_path =
+ "$_xctrunner_path/XCTRunner"
+}
+
# When building with RBE, $ios_sdk_platform_path corresponds to a symlink
# below $root_build_dir that points to the real SDK to use. Because the files
# are below $root_build_dir, it is not possible to list them as a target input
@@ -270,15 +278,24 @@ _xctrunner_path =
# To workaround this, add a target that pretends to create those files
# (but does nothing). See https://crbug.com/1061487 for why this is needed.
if (ios_use_xcode_symlinks) {
- action("copy_xctrunner_app") {
- testonly = true
- script = "//build/noop.py"
+ if (target_environment == "catalyst") {
+ outputs = [
+ "$_xctrunner_path/Contents/Info.plist",
+ "$_xctrunner_path/Contents/PkgInfo",
+ "$_xctrunner_executable_path",
+ ]
+ } else {
outputs = [
"$_xctrunner_path/Info.plist",
"$_xctrunner_path/PkgInfo",
- "$_xctrunner_path/XCTRunner",
+ "$_xctrunner_executable_path",
]
}
+ action("copy_xctrunner_app") {
+ testonly = true
+ script = "//build/noop.py"
+ outputs = outputs
+ }
}
# When creating the test runner for an XCUITest, the arm64e slice of the binary
@@ -287,7 +304,7 @@ if (ios_use_xcode_symlinks) {
action("xctest_runner_without_arm64e") {
testonly = true
script = "//build/config/ios/strip_arm64e.py"
- sources = [ "$_xctrunner_path/XCTRunner" ]
+ sources = [ _xctrunner_executable_path ]
outputs = [ "$target_out_dir/XCTRunner" ]
args = [
"--output",
diff --git a/config/ios/rules.gni b/config/ios/rules.gni
index cbc5f1986..635f9fff5 100644
--- a/config/ios/rules.gni
+++ b/config/ios/rules.gni
@@ -1352,9 +1352,13 @@ template("ios_xcuitest_test_runner_bundle") {
testonly = true
script = "//build/apple/plist_util.py"
- sources = [
- "$_xctrunner_path/Info.plist",
+ if (target_environment == "catalyst") {
+ sources = ["$_xctrunner_path/Contents/Info.plist"]
+ } else {
+ sources = ["$_xctrunner_path/Info.plist"]
+ }
+ sources += [
# NOTE: The XCTRunnerAddition+Info.plist must come after the Info.plist
# because it overrides the values under "CFBundleIdentifier" and
# "CFBundleName".
@@ -1399,7 +1403,11 @@ template("ios_xcuitest_test_runner_bundle") {
testonly = true
visibility = [ ":$_target_name" ]
- sources = [ "$_xctrunner_path/PkgInfo" ]
+ if (target_environment == "catalyst") {
+ sources = ["$_xctrunner_path/Contents/PkgInfo"]
+ } else {
+ sources = ["$_xctrunner_path/PkgInfo"]
+ }
outputs = [ "{{bundle_contents_dir}}/PkgInfo" ]