[clang] 5d06e8b - Pass -rtlib=libgcc in tests conditioned on the default.

Stella Laurenzo via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 17 11:29:57 PDT 2020


Author: Stella Laurenzo
Date: 2020-07-17T11:28:18-07:00
New Revision: 5d06e8b24f97202764c7522efcfb6e2febdce6b7

URL: https://github.com/llvm/llvm-project/commit/5d06e8b24f97202764c7522efcfb6e2febdce6b7
DIFF: https://github.com/llvm/llvm-project/commit/5d06e8b24f97202764c7522efcfb6e2febdce6b7.diff

LOG: Pass -rtlib=libgcc in tests conditioned on the default.

Summary:
* This test was failing in our builds that configure compiler-rt as the configure-time rtlib.
* Opted for this test fix instead of a rollback, and hopefully TI can fix forward if this weakens the tests beyond expectations.
* Suspected this failure introduced in D81676.

Subscribers: cfe-commits

Tags: #clang

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

Added: 
    

Modified: 
    clang/test/Driver/msp430-toolchain.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/msp430-toolchain.c b/clang/test/Driver/msp430-toolchain.c
index f88b32d66a9b..1aee2f75a9d9 100644
--- a/clang/test/Driver/msp430-toolchain.c
+++ b/clang/test/Driver/msp430-toolchain.c
@@ -66,11 +66,11 @@
 
 // Tests for -nostdlib, -nostartfiles, -nodefaultfiles and -f(no-)exceptions
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc \
 // RUN:   --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1
 // RUN: FileCheck -check-prefix=LIBS-DEFAULT-POS %s < %t
 // RUN: FileCheck -check-prefix=LIBS-DEFAULT-NEG %s < %t
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc \
 // RUN:   --gcc-toolchain="%S/Inputs/basic_msp430_tree" --sysroot="" 2>&1 \
 // RUN:   | FileCheck -check-prefix=LIBS-DEFAULT-GCC-TOOLCHAIN %s
 // LIBS-DEFAULT-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
@@ -112,7 +112,7 @@
 // LIBS-COMPILER-RT-NEG-NOT: crtend.o
 // LIBS-COMPILER-RT-NEG-NOT: /exceptions
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -fexceptions \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -fexceptions \
 // RUN:   --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1
 // RUN: FileCheck -check-prefix=LIBS-EXC-POS %s < %t
 // RUN: FileCheck -check-prefix=LIBS-EXC-NEG %s < %t
@@ -126,7 +126,7 @@
 // LIBS-EXC-NEG-NOT: "{{.*}}/430"
 // LIBS-EXC-NEG-NOT: "{{.*}}430/crt{{.*}}"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc \
 // RUN:   -fstack-protector  --sysroot="%S/Inputs/basic_msp430_tree" 2>&1 \
 // RUN:   | FileCheck -check-prefix=LIBS-SSP %s
 // LIBS-SSP: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
@@ -138,7 +138,7 @@
 // LIBS-SSP: "-lgcc" "--start-group" "-lmul_none" "-lc" "-lgcc" "-lcrt" "-lnosys" "--end-group"
 // LIBS-SSP: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/430{{/|\\\\}}crtend_no_eh.o" "-lgcc"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nodefaultlibs \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -nodefaultlibs \
 // RUN:   --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1
 // RUN: FileCheck -check-prefix=LIBS-NO-DFT-POS %s < %t
 // RUN: FileCheck -check-prefix=LIBS-NO-DFT-NEG %s < %t
@@ -155,7 +155,7 @@
 // LIBS-NO-DFT-NEG-NOT: "--start-group"
 // LIBS-NO-DFT-NEG-NOT: "--end-group"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nolibc \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -nolibc \
 // RUN:   -fstack-protector --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1
 // RUN: FileCheck -check-prefix=LIBS-NO-LIBC-POS %s < %t
 // RUN: FileCheck -check-prefix=LIBS-NO-LIBC-NEG %s < %t
@@ -173,7 +173,7 @@
 // LIBS-NO-LIBC-NEG-NOT: "--start-group"
 // LIBS-NO-LIBC-NEG-NOT: "--end-group"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nostartfiles \
+// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -rtlib=libgcc -nostartfiles \
 // RUN:   --sysroot="%S/Inputs/basic_msp430_tree" > %t 2>&1
 // RUN: FileCheck -check-prefix=LIBS-NO-START-POS %s < %t
 // RUN: FileCheck -check-prefix=LIBS-NO-START-NEG %s < %t
@@ -222,7 +222,7 @@
 // Test for compiling for simulator
 
 // RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430g2553 \
-// RUN:   -msim --sysroot=%S/Inputs/basic_msp430_tree > %t 2>&1
+// RUN:   -msim -rtlib=libgcc --sysroot=%S/Inputs/basic_msp430_tree > %t 2>&1
 // RUN: FileCheck -check-prefix=SIMULATOR-POS %s < %t
 // RUN: FileCheck -check-prefix=SIMULATOR-NEG %s < %t
 // SIMULATOR-POS: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/8.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"


        


More information about the cfe-commits mailing list