Consolidate default Clang argument handling (#6545)

This unifies the default Clang arguments between the `clang` subcommand,
the `link` subcommand, and the `ClangInvocation` built for C++ interop.

This sets the stage to integrate either pre-built or on-demand runtimes
flags for both of these. However, this PR should have very little
practical difference. The biggest functional change is wrapping the
default arguments in flags to allow unused flags so that we can build a
collection of flags viable across compile and link.
This commit is contained in:
Chandler Carruth
2026-01-03 17:35:29 +00:00
committed by GitHub
parent e545929386
commit e7eb3b7b5a
10 changed files with 131 additions and 85 deletions
@@ -4,6 +4,8 @@
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
//
// EXTRA-ARGS: --target=aarch64-unknown-linux
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/cpp_namespace.carbon