2014-12-02 08:53:20 +08:00
|
|
|
// These tests try to ensure that the driver operates reasonably when run with
|
|
|
|
// a strange environment. Unfortunately, it requires a normal shell and the
|
2015-07-26 12:36:39 +08:00
|
|
|
// 'env' command that understands arguments, unlike the LIT built-in env.
|
2014-12-02 08:53:20 +08:00
|
|
|
//
|
|
|
|
// REQUIRES: shell
|
|
|
|
// The PATH variable is heavily used when trying to find a linker.
|
2014-12-03 16:19:17 +08:00
|
|
|
// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-12-02 08:53:20 +08:00
|
|
|
// RUN: --target=i386-unknown-linux \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2021-04-27 17:15:37 +08:00
|
|
|
// RUN: --rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-12-02 08:53:20 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
|
|
|
|
//
|
2014-12-03 16:19:17 +08:00
|
|
|
// RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2014-12-02 08:53:20 +08:00
|
|
|
// RUN: --target=i386-unknown-linux \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2021-04-27 17:15:37 +08:00
|
|
|
// RUN: --rtlib=platform \
|
2015-01-06 01:07:42 +08:00
|
|
|
// RUN: --gcc-toolchain="" \
|
2014-12-02 08:53:20 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
|
|
|
|
//
|
|
|
|
// CHECK-LD-32-NOT: warning:
|
|
|
|
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2021-04-01 16:47:56 +08:00
|
|
|
// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/10.2.0{{/|\\\\}}crtbegin.o"
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0"
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib"
|
2014-12-02 08:53:20 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib"
|