File tree Expand file tree Collapse file tree 3 files changed +73
-0
lines changed
tests/run-make/rust-lld-custom-target Expand file tree Collapse file tree 3 files changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ include ../tools.mk
2+
3+ # needs-rust-lld
4+ # only-x86_64-unknown-linux-gnu
5+ all :
6+ RUSTC_LOG=rustc_codegen_ssa::back::link=info $(RUSTC ) --crate-type cdylib --target custom-target.json -Clink-args=-Wl,-v lib.rs 2> $(TMPDIR ) /output.txt
7+ $(CGREP ) -e " ^LLD [0-9]+\.[0-9]+\.[0-9]+" < $(TMPDIR ) /output.txt
Original file line number Diff line number Diff line change 1+ {
2+ "arch" : " x86_64" ,
3+ "cpu" : " x86-64" ,
4+ "crt-static-respected" : true ,
5+ "data-layout" : " e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" ,
6+ "dynamic-linking" : true ,
7+ "env" : " gnu" ,
8+ "has-rpath" : true ,
9+ "has-thread-local" : true ,
10+ "link-self-contained" : {
11+ "components" : [
12+ " linker"
13+ ]
14+ },
15+ "linker-flavor" : " gnu-lld-cc" ,
16+ "llvm-target" : " x86_64-unknown-linux-gnu" ,
17+ "max-atomic-width" : 64 ,
18+ "os" : " linux" ,
19+ "plt-by-default" : false ,
20+ "position-independent-executables" : true ,
21+ "pre-link-args" : {
22+ "gnu-cc" : [
23+ " -m64"
24+ ],
25+ "gnu-lld-cc" : [
26+ " -m64"
27+ ]
28+ },
29+ "relro-level" : " full" ,
30+ "stack-probes" : {
31+ "kind" : " inline-or-call" ,
32+ "min-llvm-version-for-inline" : [
33+ 16 ,
34+ 0 ,
35+ 0
36+ ]
37+ },
38+ "static-position-independent-executables" : true ,
39+ "supported-sanitizers" : [
40+ " address" ,
41+ " cfi" ,
42+ " leak" ,
43+ " memory" ,
44+ " thread" ,
45+ " safestack"
46+ ],
47+ "supported-split-debuginfo" : [
48+ " packed" ,
49+ " unpacked" ,
50+ " off"
51+ ],
52+ "supports-xray" : true ,
53+ "target-family" : [
54+ " unix"
55+ ],
56+ "target-pointer-width" : " 64"
57+ }
Original file line number Diff line number Diff line change 1+ // Test linking using `cc` with `rust-lld`, using a custom target with features described in MCP 510
2+ // see https://github.com/rust-lang/compiler-team/issues/510 for more info:
3+ //
4+ // Starting from the `x86_64-unknown-linux-gnu` target spec, we add the following options:
5+ // - a linker-flavor using lld via a C compiler
6+ // - the self-contained linker component is enabled
7+
8+ #![ feature( no_core) ]
9+ #![ no_core]
You can’t perform that action at this time.
0 commit comments