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

[SR-7321] Driver/linker-args-order-linux.swift test fails on non-x86_64 Linux #49869

swift-ci opened this issue Mar 31, 2018 · 3 comments


Copy link

@swift-ci swift-ci commented Mar 31, 2018

Previous ID SR-7321
Radar None
Original Reporter jasonm128 (JIRA User)
Type Bug
Status Resolved
Resolution Done

Tested on Linux (Ubuntu 16.04) running on AArch64 (Xilinx ZCU102 board with Cortex A53 cores) but probably applies to Linux running on anything other than x86_64 processors.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, aarch64, arm, linux
Assignee None
Priority Medium

md5: 25cccc7a7743161d082807fd28c29d87

Issue Description:

The Driver/linker-args-order-linux.swift test seems to be hardcoded for x86_64 Linux and fails on any other architecture. It is checking that the output contains "x86_64-unknown-linux-gnu" instead of an architecture-specific triple. Here is an example from AArch64:

Command Output (stderr):
/scratch/jasonm/swift-4.1-RELEASE-patched/swift/test/Driver/linker-args-order-linux.swift:7:11: error: expected string not found in input
// CHECK: {{.*}}/swift -frontend -c -primary-file {{.*}}/linker-args-order-linux.swift -target x86_64-unknown-linux-gnu -disable-objc-interop
<stdin>:1:1: note: scanning from here
BUILD_DIR/bin/swift -frontend -c -primary-file SOURCE_DIR/test/Driver/linker-args-order-linux.swift -target aarch64-unknown-linux-gnu -Xllvm -aarch64-use-tbi -disable-objc-interop -module-cache-path /tmp/swift-testsuite-clang-module-cache0uOCbb -module-name main -o /tmp/lit_tmp_CzQ9qF/linker-args-order-linux-1459ee.o

Based on this example, it looks like there will probably be other differences besides the triple as well; for example, the "-Xllvm -aarch-use-tbi" that comes before "-disable-objc-interop". I'm not sure exactly what this test is meant to verify but it probably needs to be distilled down to just the essential elements. An alternative quick fix would be to make it require x86_64.

NB: To reproduce this on AArch64, you will need to apply the changes from PR #15174 or the compiler won't be functional enough to run this test.

Copy link

@belkadan belkadan commented Apr 3, 2018

Copy link

@spevans spevans commented Apr 3, 2018

The test only really needs to check that the last line is correct and that the *.o files come before static-stdlib-args.lnk etc so the explicit check for the line x86_64-unknown-linux-gnu can be removed.

Copy link

@futurejones futurejones commented Jul 7, 2018

This is now fixed in PR17749

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

4 participants