mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Fix Linux AArch64 build and add CI for that platform (#7273)
The `--dump-cpp-ast` file tests strip references to Clang builtins so that the expected output is target-independent. The filter anchored a `__`-prefixed builtin identifier on a preceding space or quote, which matches the x86-64 `__va_list_tag` spelling but not the AArch64 `std::__va_list`, where `__` is preceded by the `::` namespace qualifier. That left a single `RecordType 'std::__va_list'` line unfiltered on AArch64, producing a spurious autoupdate diff for `thunk_ast.carbon`. Anchor the match on a preceding `:` as well so namespace-qualified builtins are also filtered. Carbon's test workflow covered Linux on x86-64 and macOS on AArch64, but had no Linux AArch64 coverage, so AArch64-specific issues that don't reproduce on macOS could land unnoticed. Add an `ubuntu-22.04-arm` runner to the matrix. The release used for Linux does not publish the monolithic `LLVM-*-Linux-ARM64` package, only a `clang+llvm-*-aarch64-linux-gnu` community build with a smaller tool set, so the Ubuntu setup now selects the tarball by `runner.arch`. The prune step uses `rm -f` since the two packages do not ship an identical set of tools to remove. Assisted-by: Claude Code with Claude Opus 4.7
This commit is contained in:
@@ -308,9 +308,11 @@ static auto DoClangASTCheckReplacements(std::string& check_line) -> void {
|
||||
return;
|
||||
}
|
||||
|
||||
// Filter out references to builtins.
|
||||
// Filter out references to builtins. The `__`-prefixed identifier may be
|
||||
// namespace-qualified, such as the AArch64 `std::__va_list`, so a preceding
|
||||
// `:` also anchors the match.
|
||||
static const RE2 is_builtin_referring_re(
|
||||
R"(`-BuiltinType |[ ']__[a-zA-Z]|\| `\-PointerType 0x[a-f0-9]+ 'char \*'$)");
|
||||
R"(`-BuiltinType |[ ':]__[a-zA-Z]|\| `\-PointerType 0x[a-f0-9]+ 'char \*'$)");
|
||||
if (RE2::PartialMatch(check_line, is_builtin_referring_re)) {
|
||||
check_line.clear();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user