[flang-commits] [flang] [flang] Make gcc-triple.f90 unsupported on Darwin (PR #171690)

via flang-commits flang-commits at lists.llvm.org
Wed Dec 10 13:21:26 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-driver

Author: Leandro Lupori (luporl)

<details>
<summary>Changes</summary>

It fails with the following error:

```
RUN: at line 13
/Users/leandro.lupori/home/git/flang/build/bin/flang -v --sysroot=/Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/Inputs/fedora_39_tree --gcc-triple=x86_64-redhat-linux 2>&1 | /Users/leandro.lupori/home/git/flang/build/bin/FileCheck /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/gcc-triple.f90 --check-prefix=TRIPLE_EXISTS
.---command stderr------------
| /Users/leandro.lupori/home/git/flang/llvm-project/flang/test/Driver/gcc-triple.f90:14:18: error: TRIPLE_EXISTS: expected string not found in input
| ! TRIPLE_EXISTS: {{^}}Selected GCC installation:
|                  ^
| ...
| Input was:
| <<<<<<
|             1: flang version 22.0.0git (git@<!-- -->github.com:llvm/llvm-project.git dde1990b01fa13087b0eab77579f528329555968)
| check:14'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
|             2: Target: arm64-apple-darwin24.6.0
| check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|             3: Thread model: posix
| check:14'0     ~~~~~~~~~~~~~~~~~~~~
|             4: InstalledDir: /Users/leandro.lupori/home/git/flang/build/bin
| check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|             5: Build config: +assertions
| check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
|             6: flang-22: warning: argument unused during compilation: '--gcc-triple=x86_64-redhat-linux' [-Wunused-command-line-argument]
| check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| >>>>>>
`-----------------------------
```


---
Full diff: https://github.com/llvm/llvm-project/pull/171690.diff


1 Files Affected:

- (modified) flang/test/Driver/gcc-triple.f90 (+3-3) 


``````````diff
diff --git a/flang/test/Driver/gcc-triple.f90 b/flang/test/Driver/gcc-triple.f90
index 3aacb84bfd227..95a0b3b375f17 100644
--- a/flang/test/Driver/gcc-triple.f90
+++ b/flang/test/Driver/gcc-triple.f90
@@ -10,9 +10,9 @@
 ! DEFAULT_TRIPLE: {{^}}Selected GCC installation:
 ! DEFAULT_TRIPLE: fedora_39_tree/usr/lib/gcc/x86_64-linux-gnu/13
 
-! RUN: %flang -v --sysroot=%S/Inputs/fedora_39_tree --gcc-triple=x86_64-redhat-linux 2>&1 | FileCheck %s --check-prefix=TRIPLE_EXISTS
+! RUN: %flang --target=x86_64-redhat-linux-gnu -v --sysroot=%S/Inputs/fedora_39_tree --gcc-triple=x86_64-redhat-linux 2>&1 | FileCheck %s --check-prefix=TRIPLE_EXISTS
 ! TRIPLE_EXISTS: {{^}}Selected GCC installation:
 ! TRIPLE_EXISTS: fedora_39_tree/usr/lib/gcc/x86_64-redhat-linux/13
 
-! RUN: %flang -v --sysroot=%S/Inputs/fedora_39_tree --gcc-triple=x86_64-foo-linux 2>&1 | FileCheck %s --check-prefix=TRIPLE_DOES_NOT_EXISTS
-! TRIPLE_DOES_NOT_EXISTS-NOT: x86_64-foo-linux
\ No newline at end of file
+! RUN: %flang --target=x86_64-redhat-linux-gnu -v --sysroot=%S/Inputs/fedora_39_tree --gcc-triple=x86_64-foo-linux 2>&1 | FileCheck %s --check-prefix=TRIPLE_DOES_NOT_EXISTS
+! TRIPLE_DOES_NOT_EXISTS-NOT: x86_64-foo-linux

``````````

</details>


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


More information about the flang-commits mailing list