mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Factor out fuzzing disablement in the driver (#5048)
We end up needing to do this in any driver subcommand that reaches into external code that may not be fully fuzz-clean. No need to grow multiple different diagnostics for each, we can use a common diagnostic.
This commit is contained in:
@@ -93,11 +93,7 @@ auto LldSubcommand::Run(DriverEnv& driver_env) -> DriverResult {
|
||||
|
||||
// Don't run LLD when fuzzing, as we're not currently in a good position to
|
||||
// debug and fix fuzzer-found bugs within LLD.
|
||||
if (driver_env.fuzzing) {
|
||||
CARBON_DIAGNOSTIC(
|
||||
LLDFuzzingDisallowed, Error,
|
||||
"preventing fuzzing of `lld` subcommand due to external library");
|
||||
driver_env.emitter.Emit(LLDFuzzingDisallowed);
|
||||
if (!DisableFuzzingExternalLibraries(driver_env, "lld")) {
|
||||
return {.success = false};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user