mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 07:21:04 +01:00
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.
18 lines
924 B
Plaintext
18 lines
924 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// ARGS: --include-diagnostic-kind compile foo.carbon -- bar.cpp
|
|
//
|
|
// NOAUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/compile/fail_clang_arg_extra_input.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/compile/fail_clang_arg_extra_input.carbon
|
|
// CHECK:STDERR: error: unable to handle compilation, expected exactly one compiler job in ' "{{.*}}/clang" "-cc1" {{.*}} "-x" "c++" "<carbon Cpp imports>"; "{{.*}}/clang" "-cc1" {{.*}} "-x" "c++" "bar.cpp"; ' [CppInteropDriverError]
|
|
// CHECK:STDERR:
|
|
|
|
// --- foo.carbon
|
|
|
|
// --- bar.cpp
|