2016-03-09 13:18:16 +08:00
|
|
|
// RUN: %clang %s -### \
|
|
|
|
// RUN: -fuse-ld=/usr/local/bin/or1k-linux-ld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-ABSOLUTE-LD
|
|
|
|
// CHECK-ABSOLUTE-LD: /usr/local/bin/or1k-linux-ld
|
|
|
|
|
|
|
|
|
2014-06-26 22:23:45 +08:00
|
|
|
// RUN: %clang %s -### \
|
|
|
|
// RUN: -target x86_64-unknown-freebsd 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-FREEBSD-LD
|
|
|
|
// CHECK-FREEBSD-LD: ld
|
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=bfd \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
|
|
|
|
// RUN: -target x86_64-unknown-freebsd \
|
|
|
|
// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-BFD
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-FREEBSD-BFD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.bfd
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=gold \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
|
|
|
|
// RUN: -target x86_64-unknown-freebsd \
|
|
|
|
// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-FREEBSD-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=plib \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
|
|
|
|
// RUN: -target x86_64-unknown-freebsd \
|
|
|
|
// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-PLIB
|
|
|
|
// CHECK-FREEBSD-PLIB: error: invalid linker name
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: %clang %s -### -fuse-ld=ld \
|
2014-06-26 22:23:45 +08:00
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-LD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=bfd \
|
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-BFD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.bfd
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=gold \
|
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-GOLD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.gold
|
2014-06-26 22:23:45 +08:00
|
|
|
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: %clang %s -### -fuse-ld=ld \
|
2014-06-26 22:23:45 +08:00
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD-TC
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-LD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=bfd \
|
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD-TC
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-BFD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.bfd
|
2014-06-26 22:23:45 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=gold \
|
|
|
|
// RUN: -target arm-linux-androideabi \
|
|
|
|
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD-TC
|
2014-06-27 09:32:59 +08:00
|
|
|
// CHECK-ANDROID-ARM-GOLD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.gold
|
2017-11-07 05:18:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=link \
|
|
|
|
// RUN: -target i686-unknown-windows-msvc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix CHECK-WINDOWS-MSVC-LINK
|
|
|
|
// CHECK-WINDOWS-MSVC-LINK: "{{.*}}link.exe"
|
|
|
|
// CHECK-WINDOWS-MSVC-LINK-SAME: "-out:{{.*}}"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=lld \
|
|
|
|
// RUN: -target i686-unknown-windows-msvc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix CHECK-WINDOWS-MSVC-LLD
|
|
|
|
// CHECK-WINDOWS-MSVC-LLD: "{{.*}}lld-link"
|
|
|
|
// CHECK-WINDOWS-MSVC-LLD-SAME: "-out:{{.*}}"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=lld-link \
|
|
|
|
// RUN: -target i686-unknown-windows-msvc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix CHECK-WINDOWS-MSVC-LLD-LINK
|
|
|
|
// CHECK-WINDOWS-MSVC-LLD-LINK: "{{.*}}lld-link"
|
|
|
|
// CHECK-WINDOWS-MSVC-LLD-LINK-SAME: "-out:{{.*}}"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### -fuse-ld=bfd \
|
|
|
|
// RUN: -target i686-unknown-windows-msvc \
|
|
|
|
// RUN: -B %S/Inputs/Windows/usr/bin 2>&1 \
|
|
|
|
// RUN: | FileCheck %s --check-prefix CHECK-WINDOWS-MSVC-BFD
|
|
|
|
// CHECK-WINDOWS-MSVC-BFD: "{{.*}}ld.bfd"
|
|
|
|
// CHECK-WINDOWS-MSVC-BFD-SAME: "-o"
|