[clang] 305ac81 - Fix macos target assumption in test
Thomas Preud'homme via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 29 02:22:04 PST 2021
Author: Thomas Preud'homme
Date: 2021-01-29T10:22:04Z
New Revision: 305ac81e1d4bbd037587190175e4d0b5631300e1
URL: https://github.com/llvm/llvm-project/commit/305ac81e1d4bbd037587190175e4d0b5631300e1
DIFF: https://github.com/llvm/llvm-project/commit/305ac81e1d4bbd037587190175e4d0b5631300e1.diff
LOG: Fix macos target assumption in test
Clang test Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp
assumes the target is darwin when the host is darwin which is not
necessarily the case, causing the test to fail when it is not. This
commit adds a -triple argument to the clang invocation to ensure the
target is darwin.
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D94396
Added:
Modified:
clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp b/clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp
index ec3b710c4da8..f622016e2b16 100644
--- a/clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp
+++ b/clang/test/Driver/macos-apple-silicon-slice-link-libs-darwin-only.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang -### -arch arm64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s
-// RUN: %clang -### -arch x86_64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=x86_64-10_7 %s
+// RUN: %clang -### -target arm64-apple-darwin -arch arm64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=ARM64-10_7 %s
+// RUN: %clang -### -target x86_64-apple-darwin10 -arch x86_64 -mmacosx-version-min=10.7 %s 2>&1 | FileCheck -check-prefix=x86_64-10_7 %s
// REQUIRES: system-darwin
// ARM64-10_7-NOT: -lcrt1.10.6.o
More information about the cfe-commits
mailing list