Skip to content

Conversation

@JoshuaMoelans
Copy link
Member

No description provided.

pbos and others added 30 commits August 13, 2024 00:36
This annotates NOTREACHED() as [[noreturn]], matching chromium.

Bug: 40580068
Change-Id: If13ec8b488457aa7424bcd7d76dc3bd2830551b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5775483
Reviewed-by: Mark Mentovai <mark@chromium.org>
This is no longer referenced in crashpad.

Bug: 40580068
Change-Id: I7c3d955279c791a8e9895c73820264efeb48ee9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5782432
Reviewed-by: Mark Mentovai <mark@chromium.org>
* [UN]LIKELY: https://crrev.com/c/5734517
* CDECL: https://crrev.com/c/5803679
* Arch-specific macros: https://crrev.com/c/5805706
* ALIGNAS: https://crrev.com/c/5805902

Bug: none
Change-Id: I863e7cedb86e7a471cfe4c551aef11c87b477627
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5804535
Reviewed-by: Mark Mentovai <mark@chromium.org>
Matches https://crrev.com/c/5805924.

Bug: none
Change-Id: If96d8ecbc227247d436427cda88d3d6aabe8f40e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5804790
Reviewed-by: Mark Mentovai <mark@chromium.org>
This also changes NOTREACHED() to use LOG(FATAL) which both enables log
streaming and printing something useful when hit.

Bug: chromium:40254046
Change-Id: I187da25fe42f67dbf06f1e5a8c507e6b8cc46d6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5904318
Reviewed-by: Mark Mentovai <mark@chromium.org>
This disables C4722 for intentionally-[[noreturn]] destructors and IWYUs
base/immediate_crash.h for fuchsia_logging.cc.

Bug: chromium:40254046
Change-Id: I9df3ab96d4d6489485bca55748dfe806a1f0f444
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5907038
Reviewed-by: Mark Mentovai <mark@chromium.org>
This trades warnings with C4715 (not all control paths return a value)
and C4127 (conditional expression is constant). We explicitly disable
C4127 so fingers crossed that no other problem pops up when rolling this
into crashpad.

This also gets rid of logging::LogMessageVoidify which is nice.

Bug: chromium:40254046
Change-Id: I52274f3e66d84507c48f019a66ebabebe80ca912
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/5907040
Reviewed-by: Mark Mentovai <mark@chromium.org>
Change-Id: I714c3fde7579a43faf30973fcc0d7f3cb5e7227a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6011592
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This is done in a more localized way than upstream, where we support
IntegralConstantLike in StrictNumeric.

Bug: none
Change-Id: Ia2a5f086fec0d318f168774aad717805eed25a35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6090877
Reviewed-by: Mark Mentovai <mark@chromium.org>
Bug: none
Change-Id: I531fb132349814214896ac8af9734a75b873f4d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6092430
Reviewed-by: Mark Mentovai <mark@chromium.org>
`distutils` is removed in Python 3.12+. Changed to adapt the approach
in maxi-Chromium's `build/mac/find_sdk.py`


Bug: None
Change-Id: Ia2beb098b822ef5b09d1fe2048a310fcdaa0cf95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6097742
Reviewed-by: Mark Mentovai <mark@chromium.org>
Bug: 390190633
Change-Id: I60eb0804cea4f1151782943e2402e5a1a11a554b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6180421
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Joey Scarr <jsca@google.com>
This does several things to prepare for using clang on Windows:

* It makes `mini_chromium_is_clang` a GN arg on Windows, so that
  it's possible to opt in to using clang via args.gn.
  (It doesn't change the default yet, and once the default is
  flipped, we can make it not an arg again.)

* It stops passing a few cl.exe flags to the compiler if clang is
  being used. clang-cl supports most of cl.exe's flags, but it warns
  about the LTCG flags. It also stops passing a few cl.exe flags that
  are silently ignored by clang-cl to keep command lines tidier.

* It passes a few clang-only flags such as `-m32` on x86.

* It passes warning flags that we pass on other platforms to the compiler
  to clang-cl on Windows too. The important one is `Wno-unused-parameter`:
  without this, we get hundreds of build warnings.

* It also disables a few clang warnings on Windows only. These can be
  cleaned up and turned on later.

* It updates win_helper.py to accept slashes in the path to ml in
  ExecAsmWrapper, like already done for the linker in ExecLinkWrapper()

* Finally, and most importantly, it makes the toolchain call clang-cl,
  lld-link, and llvm-ml instead of cl.exe, link.exe, and ml.exe.
  On arm64, we use clang-cl instead of armasm64.exe (matching Chromium).

There are several cleanups that can be done with clang that I haven't
done yet and am currently not planning on doing:

* The ninja -e and ninja -t msvc wrapper processes for cc, cxx, ld, ar, ml
  can be removed by instead using clang-cl's /winsysroot flag

* Once that's done, it should be reasonably straightforward to set up
  a cross build to enable building crashpad/win on linux

* https://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
  describes how to make the build fully deterministic with clang-cl

No behavior change, since clang is still off by default.

Bug: 384682775
Change-Id: Ie7b16a94c595fdf7e281c6127520b69d380408df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6261289
Reviewed-by: Mark Mentovai <mark@chromium.org>
For now, it can still be turned off via a GN arg on Windows.
We probably want to remove that soon.

Bug: 384682775
Change-Id: I59e2374347e7b39000aaebd1dcf9a35e68d75666
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6298676
Reviewed-by: Mark Mentovai <mark@chromium.org>
I got this wrong in https://chromium-review.googlesource.com/6261289
because I based it on Chromium, and Chromium no longer uses env
wrappers.

I think this fixes compiling asm files in win/clang/arm64 builds.
I cannot check that though as win/arm64 builds seem to be broken
earlier in the build for other reasons (both with and without clang).

Bug: 384682775
Change-Id: I0b763e76c8e5bc52fe3756aa41e61d6fb1e0d317
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6297640
Reviewed-by: Mark Mentovai <mark@chromium.org>
I used yapf, and then a followed that up with manual application of
automatic reflow of comments and docstrings. I also removed a couple of
unused imports, and added a missing #! line.

Change-Id: Ie291e05a36844106478e001e28c85d90ca5f254b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6307102
Reviewed-by: Justin Cohen <justincohen@chromium.org>
On a system with only the Visual Studio Build Tools workload installed
(version 2022/17.13.0), but not Enterprise, Professional, or Community,
`vswhere -latest -property installationPath` was not returning anything,
resulting in this script failing with “Exception: Visual Studio
installation dir not found” during `gn gen`.

Evidently, vswhere by default only looks for
Microsoft.VisualStudio.Product.{Enterprise,Professional,Community}, but
not BuildTools. BuildTools alone (with a suitable SDK) should be
sufficient for Crashpad development. Specifying `-products *` should
allow vswhere to find the products it was previously able to locate, and
also Microsoft.VisualStudio.Product.BuildTools.

Change-Id: I14fb2c043b50036b26e0766a76e1fabe5a3da46a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6306504
Reviewed-by: Nico Weber <thakis@chromium.org>
A GN conditional was accidentally structured:

```
if (invoker.current_cpu == "arm64") {
  ml = "armasm64.exe"
} if (invoker.current_cpu == "x64") {
  ml = "ml64.exe"
} else {
  ml = "ml.exe"
}
```

The second `if` should have been `else if`.

The file was not `gn format`ted or `git cl format`ted. Formatting would
have made the error more readily apparent during code review and
subsequent troubleshooting, as there would not have been a tendency to
misread the second `if` as `else if`, making it much more evident that
in the arm64 case, `ml` would have been reset to `ml.exe`:

```
if (invoker.current_cpu == "arm64") {
  ml = "armasm64.exe"
}
if (invoker.current_cpu == "x64") {
  ml = "ml64.exe"
} else {
  ml = "ml.exe"
}
```

Bug: 399577698
Change-Id: I390c96fe8436ecaa540fe9460d6e8582ad29e7db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6308964
Reviewed-by: Nico Weber <thakis@chromium.org>
Remove unused references to `Sec{ACL,TrustedApplication}GetTypeID` which
belong to the deprecated SecKeychain API.

A similar change was included in https://crrev.com/c/3791712.

Bug: https://crbug.com/40233280
Change-Id: Icc3bdb592439ec056807d3fa640f2d8bcbd3f000
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6354674
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
This is the mini_chromium version of https://crrev.com/c/6306066,
which added tvOS support to //build in Chromium.

Like in Chromium, tvOS is treated like a subset of iOS: a build is
considered to be a tvOS build when a regular iOS build's
`target_platform` GN variable is set to "tvos" (by default its value
is "iphoneos"). In other words, `target_os` is still "ios", and
`is_ios` is true.

On the C++ side, BUILDFLAG(IS_IOS_TVOS) is also set if and only if
BUILDFLAG(IS_IOS) is also true (which mimics Apple's own
TargetConditionals.h hierarchy given the variables we use to set the
other IS_* flags).

Bug: chromium:405140658
Change-Id: I3acd1f4c9226789b708e586d9f50052398678884
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6382038
Reviewed-by: Justin Cohen <justincohen@chromium.org>
The existing __IPHONE_OS_VERSION_MIN_REQUIRED checks were evaluating
to true on tvOS builds even though ASL does not exist on the versions
we are targeting.

None of the platform versions that mini_chromium supports uses ASL
though, so the entire code path can be removed.

Bug: chromium:405140658
Change-Id: I1c03ae48f1193a6a3d2e24acfe88fd78e969c590
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6381775
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Not doing so causes the generated bundles (e.g. Crashpad tests) to
fail to run:

```
Unable to Install “crashpad_client_test”
Domain: IXUserPresentableErrorDomain
Code: 6
Failure Reason: This app is not made for this device.
Recovery Suggestion: This app was not built to support this device family; app is compatible with (
    1,
    2
) but this device supports (
    3
)
```

Bug: chromium:405140658
Change-Id: I9612263c3c90bf22b8084673c3f5f34dbd107f87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6383575
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Change-Id: Ic6d543ba6356239a7ada1f3778ec3b667c4e51d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6391196
Reviewed-by: Justin Cohen <justincohen@chromium.org>
New versions of clang will start warning about more cases when the
conversion happens.

Bug: 402753152
Change-Id: I7e81cbe07cee18b44f4cd7fd2c90d73beb5572f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6389255
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Peter Boström <pbos@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
XCUIAutomation.framework moved.

Change-Id: I197fc2460f27677ed55289a763e7f55d2838de71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6431318
Reviewed-by: Leonard Grey <lgrey@chromium.org>
The Windows 64-bit build of base/logging.cc raises format specifier
warnings:

base/logging.cc:94:65: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat]
   93 |     return base::StringPrintf("%s (%u)",
      |                                    ~~
      |                                    %lu
   94 |                               base::WideToUTF8(msgbuf).c_str(), error_code);
      |                                                                 ^~~~~~~~~~

base/logging.cc:97:29: error: format specifies type 'unsigned int' but the argument has type 'DWORD' (aka 'unsigned long') [-Werror,-Wformat]
   96 |   return base::StringPrintf("Error %u while retrieving error %u",
      |                                    ~~
      |                                    %lu
   97 |                             GetLastError(),
      |                             ^~~~~~~~~~~~~~

base/logging.cc:98:29: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat]
   96 |   return base::StringPrintf("Error %u while retrieving error %u",
      |                                                              ~~
      |                                                              %lu
   97 |                             GetLastError(),
   98 |                             error_code);
      |                             ^~~~~~~~~~

This fixes the warnings.

Bug: http://b/403338487
Change-Id: I41d7c2470e7093af426632b0d9dec8bd701ff237
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6434735
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
That is, all the byte ops are moved from base::numerics to base. This
matches the upstream chromium change in https://crrev.com/1281370.

Bug: 413083268
Change-Id: I45eb81c4a411ba486f71200239a759c93fcf0198
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6484918
Reviewed-by: Mark Mentovai <mark@chromium.org>
Bug: 408364834
Change-Id: I9a09473f13a22788284b0ef9c5cf8f1d1d636c7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6598174
Reviewed-by: Mark Mentovai <mark@chromium.org>
Change-Id: If70af644c5eab01001621193d2ea32a12b2dd059
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6778745
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Generated with the script in https://g-issues.chromium.org/issues/40506050#comment344

Bug: 40506050
Change-Id: I065943ec0a6d763ffe64e97a5c4a698f40848a91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6851626
Reviewed-by: Mark Mentovai <mark@chromium.org>
Joshua Peraza and others added 3 commits August 15, 2025 12:54
Change-Id: I43ab5738e14e9bf8a4837f706f9d04887d09c84d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6854520
Reviewed-by: Mark Mentovai <mark@chromium.org>
The last user of Barrier_AtomicIncrement was crashpad_client_win.cc;
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6785253
removes the use, so we can remove the implementation.

Bug: 40175832
Change-Id: Id2884c37e1788bc471b02831885a6eb213824654
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/6786567
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Benoit Lize <lizeb@chromium.org>
@JoshuaMoelans JoshuaMoelans merged commit 5d06003 into getsentry Oct 23, 2025
4 checks passed
@JoshuaMoelans JoshuaMoelans deleted the meta/update_22_10_2025 branch October 23, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.