-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchromium.build.apple.patch
More file actions
206 lines (194 loc) · 8.38 KB
/
chromium.build.apple.patch
File metadata and controls
206 lines (194 loc) · 8.38 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
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn
index c3a3bf497..49e13daeb 100644
--- a/config/BUILDCONFIG.gn
+++ b/config/BUILDCONFIG.gn
@@ -565,19 +565,19 @@ foreach(_target_type,
invoker.use_libcxx_modules)) {
# This is necessary for Clang modules builds.
deps += [
- "//buildtools/third_party/libc++:std",
- "//buildtools/third_party/libc++:std_config",
- "//buildtools/third_party/libc++:std_core",
- "//buildtools/third_party/libc++:std_ctype_h",
- "//buildtools/third_party/libc++:std_errno_h",
- "//buildtools/third_party/libc++:std_fenv_h",
- "//buildtools/third_party/libc++:std_float_h",
- "//buildtools/third_party/libc++:std_inttypes_h",
- "//buildtools/third_party/libc++:std_math_h",
- "//buildtools/third_party/libc++:std_private_mbstate_t",
- "//buildtools/third_party/libc++:std_string_h",
- "//buildtools/third_party/libc++:std_uchar_h",
- "//buildtools/third_party/libc++:std_wctype_h",
+ # "//buildtools/third_party/libc++:std",
+ # "//buildtools/third_party/libc++:std_config",
+ # "//buildtools/third_party/libc++:std_core",
+ # "//buildtools/third_party/libc++:std_ctype_h",
+ # "//buildtools/third_party/libc++:std_errno_h",
+ # "//buildtools/third_party/libc++:std_fenv_h",
+ # "//buildtools/third_party/libc++:std_float_h",
+ # "//buildtools/third_party/libc++:std_inttypes_h",
+ # "//buildtools/third_party/libc++:std_math_h",
+ # "//buildtools/third_party/libc++:std_private_mbstate_t",
+ # "//buildtools/third_party/libc++:std_string_h",
+ # "//buildtools/third_party/libc++:std_uchar_h",
+ # "//buildtools/third_party/libc++:std_wctype_h",
]
}
@@ -669,22 +669,22 @@ 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++:std_config",
- "//buildtools/third_party/libc++:std_core",
- "//buildtools/third_party/libc++:std_ctype_h",
- "//buildtools/third_party/libc++:std_errno_h",
- "//buildtools/third_party/libc++:std_fenv_h",
- "//buildtools/third_party/libc++:std_float_h",
- "//buildtools/third_party/libc++:std_inttypes_h",
- "//buildtools/third_party/libc++:std_math_h",
- "//buildtools/third_party/libc++:std_private_mbstate_t",
- "//buildtools/third_party/libc++:std_string_h",
- "//buildtools/third_party/libc++:std_uchar_h",
- "//buildtools/third_party/libc++:std_wctype_h",
+ # "//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++:std_config",
+ # "//buildtools/third_party/libc++:std_core",
+ # "//buildtools/third_party/libc++:std_ctype_h",
+ # "//buildtools/third_party/libc++:std_errno_h",
+ # "//buildtools/third_party/libc++:std_fenv_h",
+ # "//buildtools/third_party/libc++:std_float_h",
+ # "//buildtools/third_party/libc++:std_inttypes_h",
+ # "//buildtools/third_party/libc++:std_math_h",
+ # "//buildtools/third_party/libc++:std_private_mbstate_t",
+ # "//buildtools/third_party/libc++:std_string_h",
+ # "//buildtools/third_party/libc++:std_uchar_h",
+ # "//buildtools/third_party/libc++:std_wctype_h",
]
}
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
index fca6c9295..a67d09706 100644
--- a/config/compiler/BUILD.gn
+++ b/config/compiler/BUILD.gn
@@ -623,13 +623,6 @@ config("compiler") {
default_toolchain != "//build/toolchain/cros:target") {
cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
}
-
- # TODO(crbug.com/413427035): Remove once
- # https://github.com/llvm/llvm-project/pull/136867/ is landed.
- if (!is_win && !llvm_android_mainline &&
- default_toolchain != "//build/toolchain/cros:target") {
- cflags += [ "-fextend-variable-liveness=none" ]
- }
}
# C11/C++11 compiler flags setup.
@@ -1998,12 +1991,6 @@ 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 += [
@@ -2976,7 +2963,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 507e2a867..444a7a2e0 100644
--- a/config/ios/BUILD.gn
+++ b/config/ios/BUILD.gn
@@ -263,6 +263,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
@@ -276,15 +284,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
@@ -293,7 +310,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 d7fe32f7f..302d37efc 100644
--- a/config/ios/rules.gni
+++ b/config/ios/rules.gni
@@ -1364,9 +1364,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".
@@ -1411,7 +1415,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" ]