Skip to content

Commit dcfbd00

Browse files
authored
Merge pull request #70 from backtrace-labs/gm4sl/sync-upstream-2025-03-26
Merge upstream/main from 2025-03-26
2 parents d29783a + 551102e commit dcfbd00

File tree

363 files changed

+16091
-4334
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

363 files changed

+16091
-4334
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
*.gn text eol=lf
2424
*.gni text eol=lf
2525
*.go text eol=lf
26-
*.gyp text eol=lf
27-
*.gypi text eol=lf
2826
*.h text eol=lf
2927
*.m text eol=lf
3028
*.md text eol=lf

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# Keep sorted
16+
1517
*.Makefile
1618
*.ninja
1719
*.pyc
1820
*.target.mk
1921
*.xcodeproj
2022
*~
2123
.*.sw?
22-
.cache
2324
.DS_Store
25+
.cache
2426
.gdb_history
2527
.gdbinit
28+
/.vscode/
2629
/Makefile
30+
/build/fuchsia
2731
/out
2832
/third_party/edo/edo
33+
/third_party/fuchsia-gn-sdk
2934
/third_party/fuchsia/.cipd
3035
/third_party/fuchsia/clang
3136
/third_party/fuchsia/qemu
@@ -36,10 +41,12 @@
3641
/third_party/linux/clang
3742
/third_party/linux/sysroot
3843
/third_party/gyp/gyp
44+
/third_party/lss/lss
3945
/third_party/mini_chromium/mini_chromium
4046
/third_party/ninja/linux
4147
/third_party/ninja/mac*
4248
/third_party/ninja/ninja.exe
49+
/third_party/windows/clang/win-amd64
4350
/third_party/zlib/zlib
4451
/xcodebuild
4552
tag

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Vewd Software AS
1313
LG Electronics, Inc.
1414
MIPS Technologies, Inc.
1515
Darshan Sen <[email protected]>
16+
Ho Cheung <[email protected]>

BUILD.gn

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
3939
if (crashpad_is_in_fuchsia) {
4040
# TODO(fuchsia:46559): Fix the leaks and remove this.
4141
deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
42-
# TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
42+
# TODO(fxbug.dev/42059784): Remove this once the underlying issue is
43+
# addressed.
4344
exclude_toolchain_tags = [ "hwasan" ]
4445
}
4546
if (crashpad_is_android) {
@@ -123,11 +124,6 @@ if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
123124
deps = _resources
124125
}
125126

126-
fuchsia_shell_package("crashpad-database-util") {
127-
package_name = "crashpad_database_util"
128-
deps = [ "tools:crashpad_database_util" ]
129-
}
130-
131127
group("tests") {
132128
testonly = true
133129

DEPS

Lines changed: 55 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ vars = {
2929
deps = {
3030
'buildtools':
3131
Var('chromium_git') + '/chromium/src/buildtools.git@' +
32-
'8b16338d17cd71b04a6ba28da7322ab6739892c2',
32+
'efa920ce144e4dc1c1841e73179cd7e23b9f0d5e',
3333
'buildtools/clang_format/script':
3434
Var('chromium_git') +
3535
'/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@' +
@@ -44,22 +44,22 @@ deps = {
4444
'af29db7ec28d6df1c7f0f745186884091e602e07',
4545
'crashpad/third_party/lss/lss':
4646
Var('chromium_git') + '/linux-syscall-support.git@' +
47-
'e1e7b0ad8ee99a875b272c8e33e308472e897660',
47+
'9719c1e1e676814c456b55f5f070eabad6709d31',
4848
'crashpad/third_party/mini_chromium/mini_chromium':
4949
Var('chromium_git') + '/chromium/mini_chromium@' +
50-
'4332ddb6963750e1106efdcece6d6e2de6dc6430',
50+
'7477036e238e54f220bed206f71036db8064dd34',
5151
'crashpad/third_party/libfuzzer/src':
5252
Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' +
5353
'fda403cf93ecb8792cb1d061564d89a6553ca020',
5454
'crashpad/third_party/zlib/zlib':
5555
Var('chromium_git') + '/chromium/src/third_party/zlib@' +
56-
'13dc246a58e4b72104d35f9b1809af95221ebda7',
56+
'fef58692c1d7bec94c4ed3d030a45a1832a9615d',
5757

5858
# CIPD packages.
5959
'buildtools/linux64': {
6060
'packages': [
6161
{
62-
'package': 'gn/gn/linux-amd64',
62+
'package': 'gn/gn/linux-${{arch}}',
6363
'version': Var('gn_version'),
6464
}
6565
],
@@ -86,11 +86,21 @@ deps = {
8686
'dep_type': 'cipd',
8787
'condition': 'host_os == "win"',
8888
},
89+
'crashpad/build/fuchsia': {
90+
'packages': [
91+
{
92+
'package': 'chromium/fuchsia/test-scripts',
93+
'version': 'latest',
94+
}
95+
],
96+
'condition': 'checkout_fuchsia',
97+
'dep_type': 'cipd',
98+
},
8999
'crashpad/third_party/linux/clang/linux-amd64': {
90100
'packages': [
91101
{
92-
'package': 'fuchsia/clang/linux-amd64',
93-
'version': 'goma',
102+
'package': 'fuchsia/third_party/clang/linux-amd64',
103+
'version': 'Tpc85d1ZwSlZ6UKl2d96GRUBGNA5JKholOKe24sRDr0C',
94104
},
95105
],
96106
'condition': 'checkout_linux and pull_linux_clang',
@@ -99,8 +109,8 @@ deps = {
99109
'crashpad/third_party/fuchsia/clang/mac-amd64': {
100110
'packages': [
101111
{
102-
'package': 'fuchsia/clang/mac-amd64',
103-
'version': 'goma',
112+
'package': 'fuchsia/third_party/clang/mac-amd64',
113+
'version': 'latest',
104114
},
105115
],
106116
'condition': 'checkout_fuchsia and host_os == "mac"',
@@ -109,27 +119,40 @@ deps = {
109119
'crashpad/third_party/fuchsia/clang/linux-amd64': {
110120
'packages': [
111121
{
112-
'package': 'fuchsia/clang/linux-amd64',
113-
'version': 'goma',
122+
'package': 'fuchsia/third_party/clang/linux-amd64',
123+
'version': 'latest',
114124
},
115125
],
116126
'condition': 'checkout_fuchsia and host_os == "linux"',
117127
'dep_type': 'cipd'
118128
},
119-
'crashpad/third_party/fuchsia/sdk/mac-amd64': {
129+
'crashpad/third_party/windows/clang/win-amd64': {
130+
'bucket': 'chromium-browser-clang',
131+
'objects': [
132+
{
133+
'object_name': 'Win/clang-llvmorg-20-init-17108-g29ed6000-2.tar.xz',
134+
'sha256sum': '1c71efd923a91480480d4f31c2fd5f1369e01e14f15776a9454abbce0bc13548',
135+
'size_bytes': 46357580,
136+
'generation': 1737590897363452,
137+
},
138+
],
139+
'condition': 'checkout_win and host_os == "win"',
140+
'dep_type': 'gcs',
141+
},
142+
'crashpad/third_party/fuchsia-gn-sdk': {
120143
'packages': [
121144
{
122-
'package': 'fuchsia/sdk/gn/mac-amd64',
145+
'package': 'chromium/fuchsia/gn-sdk',
123146
'version': 'latest'
124147
},
125148
],
126-
'condition': 'checkout_fuchsia and host_os == "mac"',
149+
'condition': 'checkout_fuchsia',
127150
'dep_type': 'cipd'
128151
},
129152
'crashpad/third_party/fuchsia/sdk/linux-amd64': {
130153
'packages': [
131154
{
132-
'package': 'fuchsia/sdk/gn/linux-amd64',
155+
'package': 'fuchsia/sdk/core/linux-amd64',
133156
'version': 'latest'
134157
},
135158
],
@@ -199,54 +222,35 @@ deps = {
199222

200223
hooks = [
201224
{
202-
'name': 'clang_format_mac',
203-
'pattern': '.',
204-
'condition': 'host_os == "mac"',
205-
'action': [
206-
'download_from_google_storage',
207-
'--no_resume',
208-
'--no_auth',
209-
'--bucket=chromium-clang-format',
210-
'--sha1_file',
211-
'buildtools/mac/clang-format.{host_cpu}.sha1',
212-
'--output',
213-
'buildtools/mac/clang-format',
214-
],
215-
},
216-
{
217-
'name': 'clang_format_linux',
225+
# If using a local clang ("pull_linux_clang" above), also pull down a
226+
# sysroot.
227+
'name': 'sysroot_linux',
218228
'pattern': '.',
219-
'condition': 'host_os == "linux"',
229+
'condition': 'checkout_linux and pull_linux_clang',
220230
'action': [
221-
'download_from_google_storage',
222-
'--no_resume',
223-
'--no_auth',
224-
'--bucket=chromium-clang-format',
225-
'--sha1_file',
226-
'buildtools/linux64/clang-format.sha1',
231+
'crashpad/build/install_linux_sysroot.py',
227232
],
228233
},
229234
{
230-
'name': 'clang_format_win',
235+
# Avoid introducing unnecessary PRESUBMIT.py file from build/fuchsia.
236+
# Never fail and ignore the error if the file does not exist.
237+
'name': 'Remove the PRESUBMIT.py from build/fuchsia',
231238
'pattern': '.',
232-
'condition': 'host_os == "win"',
239+
'condition': 'checkout_fuchsia',
233240
'action': [
234-
'download_from_google_storage',
235-
'--no_resume',
236-
'--no_auth',
237-
'--bucket=chromium-clang-format',
238-
'--sha1_file',
239-
'buildtools/win/clang-format.exe.sha1',
241+
'rm',
242+
'-f',
243+
'crashpad/build/fuchsia/PRESUBMIT.py',
240244
],
241245
},
242246
{
243-
# If using a local clang ("pull_linux_clang" above), also pull down a
244-
# sysroot.
245-
'name': 'sysroot_linux',
247+
'name': 'Generate Fuchsia Build Definitions',
246248
'pattern': '.',
247-
'condition': 'checkout_linux and pull_linux_clang',
249+
'condition': 'checkout_fuchsia',
248250
'action': [
249-
'crashpad/build/install_linux_sysroot.py',
251+
'python3',
252+
'crashpad/build/fuchsia_envs.py',
253+
'crashpad/build/fuchsia/gen_build_defs.py'
250254
],
251255
},
252256
{

OWNERS

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2025 The Crashpad Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
17+
18+
19+
20+

build/BUILD.gn

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ config("crashpad_is_in_fuchsia") {
3131
}
3232

3333
config("flock_always_supported_defines") {
34-
defines = [
35-
"CRASHPAD_FLOCK_ALWAYS_SUPPORTED=$crashpad_flock_always_supported",
36-
]
34+
defines =
35+
[ "CRASHPAD_FLOCK_ALWAYS_SUPPORTED=$crashpad_flock_always_supported" ]
3736
}
3837

3938
group("default_exe_manifest_win") {
@@ -52,16 +51,18 @@ config("crashpad_fuzzer_flags") {
5251
ldflags = [ "-fsanitize=address" ]
5352
}
5453

55-
if (crashpad_is_ios) {
56-
group("ios_enable_arc") {
57-
if (crashpad_is_in_chromium) {
58-
public_configs = [ "//build/config/compiler:enable_arc" ]
59-
} else if (crashpad_is_standalone) {
60-
public_configs =
61-
[ "//third_party/mini_chromium/mini_chromium/build/config:ios_enable_arc" ]
54+
if (crashpad_is_apple) {
55+
group("apple_enable_arc") {
56+
# If `crashpad_is_in_chromium`, then because Chromium enables ARC
57+
# compilation by default, no special configuration is needed.
58+
59+
if (crashpad_is_standalone) {
60+
public_configs = [ "//third_party/mini_chromium/mini_chromium/build/config:apple_enable_arc" ]
6261
}
6362
}
63+
}
6464

65+
if (crashpad_is_ios) {
6566
group("ios_xctest") {
6667
if (crashpad_is_in_chromium) {
6768
public_configs = [ "//build/config/ios:xctest_config" ]
@@ -71,4 +72,17 @@ if (crashpad_is_ios) {
7172
]
7273
}
7374
}
75+
76+
if (crashpad_is_in_chromium) {
77+
import("//build/config/ios/ios_sdk.gni")
78+
crashpad_is_ios_app_extension = ios_is_app_extension
79+
} else {
80+
crashpad_is_ios_app_extension = false
81+
}
82+
83+
config("crashpad_is_ios_app_extension") {
84+
if (crashpad_is_ios_app_extension) {
85+
defines = [ "CRASHPAD_IS_IOS_APP_EXTENSION" ]
86+
}
87+
}
7488
}

build/BUILDCONFIG.gn

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ if (crashpad_use_libfuzzer) {
6969
_default_configs += [ "//build/config:crashpad_fuzzer_flags" ]
7070
}
7171

72+
if (current_os == "fuchsia") {
73+
_default_configs += [
74+
"//third_party/fuchsia-gn-sdk/src/config:compiler",
75+
"//third_party/fuchsia-gn-sdk/src/config:runtime_library",
76+
]
77+
import("//third_party/fuchsia-gn-sdk/src/gn_configs.gni")
78+
}
79+
7280
_default_executable_configs = _default_configs + [
7381
"$_mini_chromium_dir/build/config:executable",
7482
"$_mini_chromium_dir/build/config:win_console",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2024 The Crashpad Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This file is copied from
16+
# https://crsrc.org/c/build/config/fuchsia/gn_configs.gni?q=gn_configs.gni
17+
# with some local modifications to match the crashpad setup.
18+
19+
# Path to the fuchsia SDK. This is intended for use in other templates &
20+
# rules to reference the contents of the fuchsia SDK.
21+
fuchsia_sdk = "//third_party/fuchsia/sdk/linux-amd64"
22+
23+
declare_args() {
24+
# Specify a readelf_exec path to use. If not specified, the host's system
25+
# executable will be used. Passed to populate_build_id_dir.py and
26+
# prepare_package_inputs.py via the --readelf-exec flag.
27+
# Must be a GN path (not an absolute path) since it is adjusted with
28+
# rebase_path().
29+
if (!defined(fuchsia_sdk_readelf_exec)) {
30+
fuchsia_sdk_readelf_exec = ""
31+
}
32+
}

0 commit comments

Comments
 (0)