From: Petr Hosek Date: Wed, 1 May 2019 16:52:45 +0000 (+0000) Subject: [Driver] Explicitly request platform rtlib in the Driver pic test X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=faa9d11b755b3e108b0bb2811f821fe3b6da8499;p=clang [Driver] Explicitly request platform rtlib in the Driver pic test This test checks whether crtbegin.o and crtend.o appear on the link line, but names of these files may be affected by the choice of the rtlib, specifically when compiler-rt is used as the default rtlib the names will be clang_rt.crtbegin.o and clang_rt.crtend.o instead of crtbeginS.o and crtendS.o. To avoid the test failure, explicitly request to use the platform rtlib. Differential Revision: https://reviews.llvm.org/D61383 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359706 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/pic.c b/test/Driver/pic.c index 68a307914f..c0cdeb464c 100644 --- a/test/Driver/pic.c +++ b/test/Driver/pic.c @@ -123,15 +123,15 @@ // Make sure -pie is passed to along to ld and that the right *crt* files // are linked in. // RUN: %clang %s -target i386-unknown-freebsd -fPIE -pie -### \ -// RUN: --gcc-toolchain="" \ +// RUN: --gcc-toolchain="" -rtlib=platform \ // RUN: --sysroot=%S/Inputs/basic_freebsd_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD // RUN: %clang %s -target i386-linux-gnu -fPIE -pie -### \ -// RUN: --gcc-toolchain="" \ +// RUN: --gcc-toolchain="" -rtlib=platform \ // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD // RUN: %clang %s -target i386-linux-gnu -fPIC -pie -### \ -// RUN: --gcc-toolchain="" \ +// RUN: --gcc-toolchain="" -rtlib=platform \ // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD //