gcc-lld mvp

ignore test if rust-lld not found

create ld -> rust-lld symlink at build time instead of run time

for testing in ci

copy instead of symlinking

remove linux check

test for linker, suggestions from bjorn3

fix overly restrictive lld matcher

use -Zgcc-ld flag instead of -Clinker-flavor

refactor code adding lld to gcc path

revert ci changes

suggestions from petrochenkov

rename gcc_ld to gcc-ld in dirs
This commit is contained in:
1000teslas 2021-06-02 19:48:33 +10:00
parent c5fbcd35a8
commit 2a76762695
8 changed files with 82 additions and 1 deletions

View file

@ -0,0 +1,6 @@
-include ../../run-make-fulldeps/tools.mk
# needs-rust-lld
all:
RUSTC_LOG=rustc_codegen_ssa::back::link=info $(RUSTC) -Z gcc-ld=lld -C link-args=-Wl,-v main.rs 2> $(TMPDIR)/output.txt
$(CGREP) -e "^LLD [0-9]+\.[0-9]+\.[0-9]+" < $(TMPDIR)/output.txt

View file

@ -0,0 +1,4 @@
// test linking using cc with rust-lld injected into search path as ld
// see rust-lang/rust#71519 for more info
fn main() {}