Simplify implementation of -Z gcc-ld

- The logic is now unified for all targets (wasm targets should also be supported now)
- Additional "symlink" files like `ld64` are eliminated
- lld-wrapper is used for propagating the correct lld flavor
- Cleanup "unwrap or exit" logic in lld-wrapper
This commit is contained in:
Vadim Petrochenkov 2022-05-24 23:29:15 +03:00
parent 1b5e1215ef
commit 2984bf674f
8 changed files with 71 additions and 122 deletions

View file

@ -656,7 +656,6 @@ impl Step for Cargo {
pub struct LldWrapper {
pub compiler: Compiler,
pub target: TargetSelection,
pub flavor_feature: &'static str,
}
impl Step for LldWrapper {
@ -676,7 +675,7 @@ impl Step for LldWrapper {
path: "src/tools/lld-wrapper",
is_optional_tool: false,
source_type: SourceType::InTree,
extra_features: vec![self.flavor_feature.to_owned()],
extra_features: Vec::new(),
})
.expect("expected to build -- essential tool");