Commit 0cc120b
committed
For compiletests, use the linker if present.
When running x.py test tests/ui with a custom linker script, we found
that 204 tests actually invoke the default linker (/usr/bin/ld) instead
of the linker script. Depending on the system linker, this will cause
those tests to fail. Many of the failing tests (196) use
"// aux-build:..." directives. One such example is
tests/ui/annotate-snippet/multispan.rs.
In cases where there were failures, we ran with -v and confirmed that we
saw "linker: Some(<path deleted>)" when the compiletest configuration
was dumped. Nevertheless, the rustc command lines for the failing tests
did not contain -Clinker=XXX, resulting in errors like the following:
= note: /usr/bin/ld: /path/to/libunwind.a(UnwindLevel1-gcc-ext.o): unrecognized relocation (0x2a) in section `.text._Unwind_GetDataRelBase'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status1 parent e216300 commit 0cc120b
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1897 | 1897 | | |
1898 | 1898 | | |
1899 | 1899 | | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1900 | 1904 | | |
1901 | 1905 | | |
1902 | 1906 | | |
| |||
0 commit comments