[OpenEmbedded] Explicitly specify -rtlib in tests
authorPetr Hosek <phosek@chromium.org>
Wed, 1 Aug 2018 03:30:06 +0000 (03:30 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 1 Aug 2018 03:30:06 +0000 (03:30 +0000)
Tests added in r338294 implicitly assume that libgcc is the runtime library,
but that's not the case when the user configures Clang to use compiler-rt in
which case these tests will break. Explicitly request libgcc when invoking
clang in these tests to avoid that.

Differential Revision: https://reviews.llvm.org/D50123

llvm-svn: 338482

clang/test/Driver/linux-ld.c

index 81cb7f8..7870139 100644 (file)
 
 // Check whether the OpenEmbedded ARM libs are added correctly.
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     --target=arm-oe-linux-gnueabi \
+// RUN:     --target=arm-oe-linux-gnueabi -rtlib=libgcc \
 // RUN:     --sysroot=%S/Inputs/openembedded_arm_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-OE-ARM %s
 
 
 // Check whether the OpenEmbedded AArch64 libs are added correctly.
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     --target=aarch64-oe-linux \
+// RUN:     --target=aarch64-oe-linux -rtlib=libgcc \
 // RUN:     --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-OE-AARCH64 %s