Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame^] | 1 | // General tests that ld invocations on Linux targets sane. Note that we use |
| 2 | // sysroot to make these tests independent of the host system. |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 3 | // |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame^] | 4 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 5 | // RUN: -ccc-host-triple i386-unkown-linux \ |
| 6 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 7 | // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame^] | 8 | // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 9 | // CHECK-LD-32: {{.*}} "-L[[SYSROOT]]/lib" "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 10 | // |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame^] | 11 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 12 | // RUN: -ccc-host-triple x86_64-unknown-linux \ |
| 13 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 14 | // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame^] | 15 | // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 16 | // CHECK-LD-64: {{.*}} "-L[[SYSROOT]]/lib" "-L[[SYSROOT]]/usr/lib" |