[flang-commits] [clang] [flang] [flang][Driver] Account for the default unwind library in linker test (PR #212419)
via flang-commits
flang-commits at lists.llvm.org
Fri Aug 7 22:07:02 PDT 2026
================
@@ -12,7 +12,10 @@
! RUN: %flang -### --target=x86_64-unknown-haiku %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,HAIKU,HAIKU-F128%f128-lib
! RUN: %flang -### --target=x86_64-windows-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,MINGW,MINGW-F128%f128-lib
-! RUN: %flang -### -rtlib=compiler-rt --target=aarch64-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,COMPILER-RT
+! RUN: %flang -### -rtlib=compiler-rt --target=aarch64-linux-gnu %S/Inputs/hello.f90 > %t 2>&1
+! RUN: FileCheck %s --input-file=%t --check-prefixes=CHECK,UNIX,COMPILER-RT
+! RUN: FileCheck %s --input-file=%t --check-prefix=NO-LIBGCC-BUILTINS
+! RUN: FileCheck %s --input-file=%t --check-prefix=%if default-unwindlib=libgcc %{DEFAULT-UNWIND-LIBGCC%} %else %{DEFAULT-UNWIND-NO-LIBGCC%}
----------------
leovancekang wrote:
Thanks. `CLANG_DEFAULT_UNWINDLIB` is restricted by CMake to an empty value, `none`, `libgcc`, or `libunwind`. Any other value is reset to the platform default.
I updated the test to require `-lgcc_s` for a libgcc default, require `-lunwind` for a libunwind default, and reject both for none or an empty default. The exact `"-lgcc"` argument remains rejected in every configuration.
https://github.com/llvm/llvm-project/pull/212419
More information about the flang-commits
mailing list