Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For compiletests, use the linker if present. #109544

Closed
wants to merge 1 commit into from

Commits on Apr 3, 2023

  1. 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
    jfgoog committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    0cc120b View commit details
    Browse the repository at this point in the history