Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 status
- Loading branch information