[flang-commits] [flang] [flang] Fix cuda-option test on Darwin (PR #85687)

via flang-commits flang-commits at lists.llvm.org
Mon Mar 18 12:54:17 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-flang-driver

Author: Leandro Lupori (luporl)

<details>
<summary>Changes</summary>

On Darwin, -isysroot is needed and is automatically appended to
%flang and %flang_fc1, so use %flang_fc1 instead to have both -fc1
and -isysroot in the expected positions and avoid errors.


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


1 Files Affected:

- (modified) flang/test/Driver/cuda-option.f90 (+2-2) 


``````````diff
diff --git a/flang/test/Driver/cuda-option.f90 b/flang/test/Driver/cuda-option.f90
index 112e1cb6c77f8c..562f8683b0ff7d 100644
--- a/flang/test/Driver/cuda-option.f90
+++ b/flang/test/Driver/cuda-option.f90
@@ -1,6 +1,6 @@
 ! Test -fcuda option
-! RUN: %flang -fc1 -cpp -x cuda -fdebug-unparse %s -o - | FileCheck %s
-! RUN: not %flang -fc1 -cpp %s -o - 2>&1 | FileCheck %s --check-prefix=ERROR
+! RUN: %flang_fc1 -cpp -x cuda -fdebug-unparse %s -o - | FileCheck %s
+! RUN: not %flang_fc1 -cpp %s -o - 2>&1 | FileCheck %s --check-prefix=ERROR
 program main
 #if _CUDA
   integer :: var = _CUDA

``````````

</details>


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


More information about the flang-commits mailing list