[clang] 5cf3677 - [clang] Pass -c to clang in test/Driver/Ofast.c
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 6 05:28:14 PDT 2024
Author: Nico Weber
Date: 2024-09-06T08:27:41-04:00
New Revision: 5cf3677a7bcdf5a9e603c054bd40c1282db984a9
URL: https://github.com/llvm/llvm-project/commit/5cf3677a7bcdf5a9e603c054bd40c1282db984a9
DIFF: https://github.com/llvm/llvm-project/commit/5cf3677a7bcdf5a9e603c054bd40c1282db984a9.diff
LOG: [clang] Pass -c to clang in test/Driver/Ofast.c
Without this, `-###` prints the linker invocation as well, which
can lead to `-Wno-msvc-not-found` warnings on Windows bots that
don't have MSVC on path, causing the test to fail.
Since the test isn't trying to test linker-related things, just
pass `-c`. See discussion on #98736.
Added:
Modified:
clang/test/Driver/Ofast.c
Removed:
################################################################################
diff --git a/clang/test/Driver/Ofast.c b/clang/test/Driver/Ofast.c
index 91de296a4c3ff7..b5189e951cc68f 100644
--- a/clang/test/Driver/Ofast.c
+++ b/clang/test/Driver/Ofast.c
@@ -1,14 +1,14 @@
-// RUN: %clang -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
-// RUN: %clang -O2 -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
-// RUN: %clang -fno-fast-math -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
-// RUN: %clang -fno-strict-aliasing -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
-// RUN: %clang -fno-vectorize -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
-// RUN: %clang -Ofast -O2 -### -Werror %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-O2 \
+// RUN: %clang -c -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
+// RUN: %clang -c -O2 -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
+// RUN: %clang -c -fno-fast-math -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
+// RUN: %clang -c -fno-strict-aliasing -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
+// RUN: %clang -c -fno-vectorize -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s
+// RUN: %clang -c -Ofast -O2 -### -Werror %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-O2 \
// RUN: %if target={{.*-windows-msvc.*}} %{ --check-prefix=CHECK-OFAST-O2-ALIASING-MSVC %} \
// RUN: %else %{ --check-prefix=CHECK-OFAST-O2-ALIASING %} %s
-// RUN: %clang -Ofast -fno-fast-math -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-FAST-MATH %s
-// RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s
-// RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s
+// RUN: %clang -c -Ofast -fno-fast-math -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-FAST-MATH %s
+// RUN: %clang -c -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s
+// RUN: %clang -c -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s
// CHECK-OFAST: use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations
// CHECK-OFAST: -cc1
More information about the cfe-commits
mailing list