From c0fc38ce1511b95a8b44918c7958b0843f6071c6 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 27 Jan 2021 09:19:25 -0500 Subject: [PATCH] Try to fix cl-options.c on bots were the default triple is non-x86 non-arm llvmArchToWindowsSDKArch() returns "" for non-intel non-arm archs. We're checking for "/fake/lib/" which is followed by the result of that function -- but if that returns an empty string, then that trailing slash isn't there. As fix, just explicitly pass a triple that's intel or arm (I randomly chose aarch64). Since the test runs with -###, that arch doesn't have to be in LLVM_TARGETS_TO_BUILD. --- clang/test/Driver/cl-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c index 487cbf0f1fcd..73f7026c65e6 100644 --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -696,7 +696,7 @@ // VCTOOLSDIR: "-triple" "{{[a-zA-Z0-9_-]*}}-pc-windows-msvc19.11.0" // Validate that built-in include paths are based on the supplied path -// RUN: %clang_cl -vctoolsdir "/fake" -winsdkdir "/foo" -winsdkversion 10.0.12345.0 -### -- %s 2>&1 | FileCheck %s --check-prefix FAKEDIR +// RUN: %clang_cl --target=aarch64-pc-windows-msvc -vctoolsdir "/fake" -winsdkdir "/foo" -winsdkversion 10.0.12345.0 -### -- %s 2>&1 | FileCheck %s --check-prefix FAKEDIR // FAKEDIR: "-internal-isystem" "/fake{{/|\\\\}}include" // FAKEDIR: "-internal-isystem" "/fake{{/|\\\\}}atlmfc{{/|\\\\}}include" // FAKEDIR: "-internal-isystem" "/foo{{/|\\\\}}Include{{/|\\\\}}10.0.12345.0{{/|\\\\}}ucrt"