diff options
Diffstat (limited to 'test/Driver')
-rw-r--r-- | test/Driver/Inputs/basic_linux_tree/lib/.keep | 0 | ||||
-rw-r--r-- | test/Driver/Inputs/basic_linux_tree/usr/lib/.keep | 0 | ||||
-rw-r--r-- | test/Driver/linux-ld.c | 17 |
3 files changed, 12 insertions, 5 deletions
diff --git a/test/Driver/Inputs/basic_linux_tree/lib/.keep b/test/Driver/Inputs/basic_linux_tree/lib/.keep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/Driver/Inputs/basic_linux_tree/lib/.keep diff --git a/test/Driver/Inputs/basic_linux_tree/usr/lib/.keep b/test/Driver/Inputs/basic_linux_tree/usr/lib/.keep new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/Driver/Inputs/basic_linux_tree/usr/lib/.keep diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c index 745b03c7a6..8896afc5e8 100644 --- a/test/Driver/linux-ld.c +++ b/test/Driver/linux-ld.c @@ -1,9 +1,16 @@ -// General tests that ld invocations on Linux targets sane. +// General tests that ld invocations on Linux targets sane. Note that we use +// sysroot to make these tests independent of the host system. // -// RUN: %clang -no-canonical-prefixes -ccc-host-triple i386-unknown-linux %s -### -o %t.o 2>&1 \ +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -ccc-host-triple i386-unkown-linux \ +// RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s -// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib" "-L/usr/lib" +// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-LD-32: {{.*}} "-L[[SYSROOT]]/lib" "-L[[SYSROOT]]/usr/lib" // -// RUN: %clang -no-canonical-prefixes -ccc-host-triple x86_64-unknown-linux %s -### -o %t.o 2>&1 \ +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -ccc-host-triple x86_64-unknown-linux \ +// RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s -// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib" "-L/usr/lib" +// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-LD-64: {{.*}} "-L[[SYSROOT]]/lib" "-L[[SYSROOT]]/usr/lib" |