diff --git a/clang/unittests/Tooling/Syntax/TreeTest.cpp b/clang/unittests/Tooling/Syntax/TreeTest.cpp --- a/clang/unittests/Tooling/Syntax/TreeTest.cpp +++ b/clang/unittests/Tooling/Syntax/TreeTest.cpp @@ -99,6 +99,9 @@ Diags->setClient(new IgnoringDiagConsumer); // Prepare to run a compiler. std::vector Args = {"syntax-test", "-std=c++11", + // Hard-setting target so the unit test + // behavior doesn't depend on the host. + "-target", "x86_64-unknown-unknown", "-fsyntax-only", FileName}; Invocation = createInvocationFromCommandLine(Args, Diags, FS); assert(Invocation);