[clang] 6f9db45 - [clang][NFC] Fix undefined-libs tests
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 10 06:04:17 PST 2021
Author: Timm Bäder
Date: 2021-02-10T15:01:09+01:00
New Revision: 6f9db455a50489d05e4aff761ee070dc90a1ece6
URL: https://github.com/llvm/llvm-project/commit/6f9db455a50489d05e4aff761ee070dc90a1ece6
DIFF: https://github.com/llvm/llvm-project/commit/6f9db455a50489d05e4aff761ee070dc90a1ece6.diff
LOG: [clang][NFC] Fix undefined-libs tests
Not all platforms accept -stdlib or -rtlib. Instead of complaining about
the wrong argument to these options, clang complains about the option
itself being present.
Pass an appropriate -target to the clang invocations.
Added:
Modified:
clang/test/Driver/undefined-libs.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/undefined-libs.cpp b/clang/test/Driver/undefined-libs.cpp
index 25a15328cbdd..99006e14ddd4 100644
--- a/clang/test/Driver/undefined-libs.cpp
+++ b/clang/test/Driver/undefined-libs.cpp
@@ -2,14 +2,14 @@
// Check that all the following options print a warning when given a non-existent
// value. But only one warning.
-// RUN: not %clangxx -stdlib=nostdlib %s 2>&1 | FileCheck --check-prefix=STDLIB %s
+// RUN: not %clangxx -target=i386-unknown-linux -stdlib=nostdlib %s 2>&1 | FileCheck --check-prefix=STDLIB %s
// STDLIB: error: invalid library name in argument '-stdlib=nostdlib'
// STDLIB-EMPTY:
//
-// RUN: not %clangxx -rtlib=nortlib %s 2>&1 | FileCheck --check-prefix=RTLIB %s
+// RUN: not %clangxx -target=i386-unknown-linux -rtlib=nortlib %s 2>&1 | FileCheck --check-prefix=RTLIB %s
// RTLIB: error: invalid runtime library name in argument '-rtlib=nortlib'
// RTLIB-EMPTY:
//
-// RUN: not %clangxx -unwindlib=nounwindlib %s 2>&1 | FileCheck --check-prefix=UNWINDLIB %s
+// RUN: not %clangxx -target=i386-unknown-linux -unwindlib=nounwindlib %s 2>&1 | FileCheck --check-prefix=UNWINDLIB %s
// UNWINDLIB: error: invalid unwind library name in argument '-unwindlib=nounwindlib'
// UNWINDLIB-EMPTY:
More information about the cfe-commits
mailing list