Rollup merge of #125369 - saethlin:synthetic-targets-dont-cc, r=onur-ozkan

Don't do cc detection for synthetic targets

Fixes https://github.com/rust-lang/rust/issues/125365

Synthetic targets only exist for mir-opt tests, and the mir-opt test suite is in general designed to avoid any use of a C compiler. We don't need to do CC detection. It's unclear to me how this code didn't cause issues before.
This commit is contained in:
Matthias Krüger 2024-05-21 20:28:49 +02:00 committed by GitHub
commit d04e2e2858
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,8 +80,5 @@ fn create_synthetic_target(
customize(spec_map);
std::fs::write(&path, serde_json::to_vec_pretty(&spec).unwrap()).unwrap();
let target = TargetSelection::create_synthetic(&name, path.to_str().unwrap());
crate::utils::cc_detect::find_target(builder, target);
target
TargetSelection::create_synthetic(&name, path.to_str().unwrap())
}