[clang] f1c88d7 - [flang] Fix fveclib on Darwin (#77605)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 11 05:39:58 PST 2024
Author: Leandro Lupori
Date: 2024-01-11T10:39:53-03:00
New Revision: f1c88d7c6f7698e4c51cb34754bb3177db9dc704
URL: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704
DIFF: https://github.com/llvm/llvm-project/commit/f1c88d7c6f7698e4c51cb34754bb3177db9dc704.diff
LOG: [flang] Fix fveclib on Darwin (#77605)
Fixes fveclib.f90 and fveclib-codegen.f90 tests, that were failing
on Darwin.
Added:
Modified:
clang/lib/Driver/ToolChains/Flang.cpp
flang/test/Driver/fveclib.f90
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp
index 422209e6c26152..03d68c3df7fb37 100644
--- a/clang/lib/Driver/ToolChains/Flang.cpp
+++ b/clang/lib/Driver/ToolChains/Flang.cpp
@@ -403,12 +403,10 @@ void Flang::addTargetOptions(const ArgList &Args,
if (A->getValue() == StringRef{"Accelerate"}) {
CmdArgs.push_back("-framework");
CmdArgs.push_back("Accelerate");
- A->render(Args, CmdArgs);
}
}
- } else {
- A->render(Args, CmdArgs);
}
+ A->render(Args, CmdArgs);
}
if (Triple.isKnownWindowsMSVCEnvironment()) {
diff --git a/flang/test/Driver/fveclib.f90 b/flang/test/Driver/fveclib.f90
index 898c65b0c850af..14c59b0616f828 100644
--- a/flang/test/Driver/fveclib.f90
+++ b/flang/test/Driver/fveclib.f90
@@ -5,6 +5,7 @@
! RUN: %flang -### -c -fveclib=Darwin_libsystem_m %s 2>&1 | FileCheck -check-prefix CHECK-DARWIN_LIBSYSTEM_M %s
! RUN: %flang -### -c --target=aarch64-none-none -fveclib=SLEEF %s 2>&1 | FileCheck -check-prefix CHECK-SLEEF %s
! RUN: %flang -### -c --target=aarch64-none-none -fveclib=ArmPL %s 2>&1 | FileCheck -check-prefix CHECK-ARMPL %s
+! RUN: %flang -### -c --target=aarch64-apple-darwin -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB-DARWIN %s
! RUN: not %flang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
! CHECK-NOLIB: "-fveclib=none"
@@ -14,6 +15,7 @@
! CHECK-DARWIN_LIBSYSTEM_M: "-fveclib=Darwin_libsystem_m"
! CHECK-SLEEF: "-fveclib=SLEEF"
! CHECK-ARMPL: "-fveclib=ArmPL"
+! CHECK-NOLIB-DARWIN: "-fveclib=none"
! CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
More information about the cfe-commits
mailing list