mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:40:12 +01:00
- Subdivide toolchain/driver:driver into granular subcommand targets (compile_subcommand, format_subcommand, lld_subcommand, etc.) to enable independent compilation and linking. - Decouple Target and TargetMachine options from driver headers. - Prune unused direct dependencies across toolchain BUILD files. Assisted-by: Antigravity with Gemini
25 lines
735 B
C++
25 lines
735 B
C++
// 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
|
|
|
|
#include "toolchain/driver/driver_subcommand.h"
|
|
|
|
namespace Carbon {
|
|
|
|
auto DriverSubcommand::TestAndDiagnoseIfFuzzingExternalLibraries(
|
|
DriverEnv& driver_env, llvm::StringRef name) -> bool {
|
|
// Only need to do anything when fuzzing.
|
|
if (!driver_env.fuzzing) {
|
|
return false;
|
|
}
|
|
|
|
CARBON_DIAGNOSTIC(
|
|
ToolFuzzingDisallowed, Error,
|
|
"preventing fuzzing of `{0}` subcommand due to external library",
|
|
std::string);
|
|
driver_env.emitter.Emit(ToolFuzzingDisallowed, name.str());
|
|
return true;
|
|
}
|
|
|
|
} // namespace Carbon
|