mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Fix capture_context_win_arm64 in standalone clang build
clang-cl does not understand armasm64 assembler syntax. The existing workaround for crashpad_is_in_chromium, which has used clang-cl exclusively for quite some time, was to use a checked-in prebuilt .obj produced by armasm64, rather than assembling the .asm during the build. This same .obj can be used to support the standalone clang build. As Crashpad on Windows is now clang-primary (with an eye toward becoming clang-only), this is not a long-term solution. The existing armasm64 source will need to be translated to an assembler dialect that clang-cl understands. Bug: 399587142, 384682775 Change-Id: Ieeb3c1c54c954997514a3fecb5c362b7d4d7d13d Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6309923 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
32a2c250a3
commit
8eb8015544
@ -528,13 +528,12 @@ crashpad_static_library("util") {
|
|||||||
"win/safe_terminate_process.asm",
|
"win/safe_terminate_process.asm",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
# Most Crashpad builds use Microsoft's armasm64.exe macro assembler for
|
# When building with clang, clang-cl is used as the assembler. Since
|
||||||
# .asm source files. When building in Chromium, clang-cl is used as the
|
# clang-cl recognizes a different assembly dialect than Microsoft’s
|
||||||
# assembler instead. Since the two assemblers recognize different
|
# armasm64 macro assembler, the same .asm file can’t be used for each. As
|
||||||
# assembly dialects, the same .asm file can't be used for each. As a
|
# a workaround, use a prebuilt .obj file when the Microsoft-dialect
|
||||||
# workaround, use a prebuilt .obj file when the Microsoft-dialect
|
# assembler isn’t available.
|
||||||
# assembler isn't available.
|
if (crashpad_is_clang) {
|
||||||
if (crashpad_is_in_chromium) {
|
|
||||||
sources += [ "misc/capture_context_win_arm64.obj" ]
|
sources += [ "misc/capture_context_win_arm64.obj" ]
|
||||||
} else {
|
} else {
|
||||||
sources += [ "misc/capture_context_win_arm64.asm" ]
|
sources += [ "misc/capture_context_win_arm64.asm" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user