[flang-commits] [flang] [flang] Fix flang tests on MacOS (PR #70811)

Andrzej WarzyƄski via flang-commits flang-commits at lists.llvm.org
Wed Nov 8 01:18:02 PST 2023


================
@@ -10,7 +10,8 @@
 ! RUN: %flang -### -S -flto=jobserver %s 2>&1 | FileCheck %s --check-prefix=FULL-LTO
 
 ! Also check linker plugin opt for Thin LTO
-! RUN: %flang -### -flto=thin %s 2>&1 | FileCheck %s --check-prefix=THIN-LTO
+! RUN: %flang -### -flto=thin %s 2>&1 | FileCheck %s --check-prefixes=%if \
+! RUN:        system-darwin %{THIN-LTO%} %else %{THIN-LTO,THIN-LTO-NOT-DARWIN%}
----------------
banach-space wrote:

[nit] You could rename:
*  `THIN-LOT` as `THIN-LTO-ALL` (it applies to ALL targets), and 
* `THIN-LOT-NOT-DARWIN` as `THIN-LTO-LINKER-PLUGIN` (this is a linker plugin "thingy" that you just wouldn't test for on Darwin as it's not supported).

I'm only lightly concerned that using "NOT" in a prefix might be confused with "CHECK-NOT" (which means something else).

https://github.com/llvm/llvm-project/pull/70811


More information about the flang-commits mailing list