[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

Paschalis Mpeis via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 08:48:12 PST 2024


================
@@ -31,3 +31,27 @@
 
 // RUN: %clang -fveclib=Accelerate %s -nodefaultlibs -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NODEFAULTLIBS %s
 // CHECK-LINK-NODEFAULTLIBS-NOT: "-framework" "Accelerate"
+
+
+/* Verify that the correct vector library is passed to LTO flags. */
+
+// RUN: %clang -### -fveclib=Accelerate -flto %s -v 2>&1 | FileCheck -check-prefix CHECK-LTO-ACCELERATE %s
----------------
paschalis-mpeis wrote:

Actually it turns out that some of the veclibs (like Accelerate in this case) do not have any target/toolchain that would call `addLTOOptions`. So I removed those.

The ones that remain, all specify a target.

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


More information about the cfe-commits mailing list