[PATCH] D98023: [clang] Don't default to a specifically shared libunwind on mingw with a g++ driver

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 6 13:29:30 PST 2021


phosek added a comment.

We see two test failures that appear to have been introduced by this change:

  ******************** TEST 'Clang :: Driver/compiler-rt-unwind.c' FAILED ********************
  
  /b/s/w/ir/x/w/llvm-project/clang/test/Driver/compiler-rt-unwind.c:9:15: error: RTLIB-GCC: expected string not found in input
  // RTLIB-GCC: "{{.*}}lgcc_s"
                ^
  <stdin>:6:817: note: scanning from here
   "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/compiler-rt-unwind.c.tmp.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtbegin.o" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu" "-L/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/x86_64-linux-gnu" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../.." "-L/b/s/w/ir/x/w/staging/llvm_build/bin/../lib" "-L/lib" "-L/usr/lib" "/b/s/w/ir/x/t/compiler-rt-unwind-1fb79b.o" "-lgcc" "-lc" "-lgcc" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crtn.o"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
  <stdin>:6:822: note: possible intended match here
   "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/compiler-rt-unwind.c.tmp.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtbegin.o" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu" "-L/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/x86_64-linux-gnu" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../.." "-L/b/s/w/ir/x/w/staging/llvm_build/bin/../lib" "-L/lib" "-L/usr/lib" "/b/s/w/ir/x/t/compiler-rt-unwind-1fb79b.o" "-lgcc" "-lc" "-lgcc" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crtn.o"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
  
  Input file: <stdin>
  Check file: /b/s/w/ir/x/w/llvm-project/clang/test/Driver/compiler-rt-unwind.c
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<<<<<
             1: Fuchsia clang version 13.0.0 (https://llvm.googlesource.com/a/llvm-project 714644a36c3095e1dffeb2fb42da3876a5919d21) 
             2: Target: x86_64-unknown-linux 
             3: Thread model: posix 
             4: InstalledDir: /b/s/w/ir/x/w/staging/llvm_build/bin 
             5:  "/b/s/w/ir/x/w/staging/llvm_build/bin/clang" "-cc1" "-triple" "x86_64-unknown-linux" "-emit-obj" "-mrelax-all" "--mrelax-relocations" "-disable-free" "-main-file-name" "compiler-rt-unwind.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver" "-resource-dir" "/b/s/w/ir/x/w/staging/llvm_build/lib/clang/13.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/b/s/w/ir/x/w/staging/llvm_build/lib/clang/13.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir=/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-faddrsig" "-o" "/b/s/w/ir/x/t/compiler-rt-unwind-1fb79b.o" "-x" "c" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/compiler-rt-unwind.c" 
             6:  "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/compiler-rt-unwind.c.tmp.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtbegin.o" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu" "-L/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/x86_64-linux-gnu" "-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../.." "-L/b/s/w/ir/x/w/staging/llvm_build/bin/../lib" "-L/lib" "-L/usr/lib" "/b/s/w/ir/x/t/compiler-rt-unwind-1fb79b.o" "-lgcc" "-lc" "-lgcc" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crtn.o" 
  check:9'0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
  check:9'1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ?                                                                                                                  possible intended match
  >>>>>>
  
  ******************** TEST 'Clang :: Driver/linux-ld.c' FAILED ********************
  
  /b/s/w/ir/x/w/llvm-project/clang/test/Driver/linux-ld.c:34:17: error: CHECK-LD-64: expected string not found in input
  // CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
                  ^
  <stdin>:6:1011: note: scanning from here
   "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--sysroot=/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/linux-ld.c.tmp.o" "crt1.o" "crti.o" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib" "/b/s/w/ir/x/t/linux-ld-731974.o" "-lgcc" "-lc" "-lgcc" "crtend.o" "crtn.o"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^
  <stdin>:6:1046: note: possible intended match here
   "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--sysroot=/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/linux-ld.c.tmp.o" "crt1.o" "crti.o" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib" "/b/s/w/ir/x/t/linux-ld-731974.o" "-lgcc" "-lc" "-lgcc" "crtend.o" "crtn.o"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
  
  Input file: <stdin>
  Check file: /b/s/w/ir/x/w/llvm-project/clang/test/Driver/linux-ld.c
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<<<<<
              1: Fuchsia clang version 13.0.0 (https://llvm.googlesource.com/a/llvm-project 714644a36c3095e1dffeb2fb42da3876a5919d21) 
              2: Target: x86_64-unknown-linux 
              3: Thread model: posix 
              4: InstalledDir: /b/s/w/ir/x/w/staging/llvm_build/bin 
              5:  "/b/s/w/ir/x/w/staging/llvm_build/bin/clang" "-cc1" "-triple" "x86_64-unknown-linux" "-emit-obj" "-mrelax-all" "--mrelax-relocations" "-disable-free" "-main-file-name" "linux-ld.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-tune-cpu" "generic" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver" "-resource-dir" "/b/s/w/ir/x/w/staging/llvm_build/lib/clang/13.0.0" "-isysroot" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree" "-internal-isystem" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/local/include" "-internal-isystem" "/b/s/w/ir/x/w/staging/llvm_build/lib/clang/13.0.0/include" "-internal-externc-isystem" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/include" "-internal-externc-isystem" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/include" "-fdebug-compilation-dir=/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-faddrsig" "-o" "/b/s/w/ir/x/t/linux-ld-731974.o" "-x" "c" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/linux-ld.c" 
              6:  "/b/s/w/ir/x/w/staging/llvm_build/bin/ld.lld" "--sysroot=/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree" "--hash-style=both" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "/b/s/w/ir/x/w/staging/llvm_build/tools/clang/test/Driver/Output/linux-ld.c.tmp.o" "crt1.o" "crti.o" "/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/lib" "-L/b/s/w/ir/x/w/llvm-project/clang/test/Driver/Inputs/basic_linux_tree/usr/lib" "/b/s/w/ir/x/t/linux-ld-731974.o" "-lgcc" "-lc" "-lgcc" "crtend.o" "crtn.o" 
  check:34'0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
  check:34'1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ?                                          possible intended match
  >>>>>>


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98023/new/

https://reviews.llvm.org/D98023



More information about the cfe-commits mailing list