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

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Mon Mar 18 12:53:48 PDT 2024


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

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.


>From 9e432f3d061e165e44819fdb70b79b826a06f196 Mon Sep 17 00:00:00 2001
From: Leandro Lupori <leandro.lupori at linaro.org>
Date: Mon, 18 Mar 2024 16:46:10 -0300
Subject: [PATCH] [flang] Fix cuda-option test on Darwin

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.
---
 flang/test/Driver/cuda-option.f90 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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



More information about the flang-commits mailing list