diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp b/clang/lib/Driver/ToolChains/WebAssembly.cpp --- a/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -106,17 +106,17 @@ getProgramPaths().push_back(getDriver().getInstalledDir()); - if (getTriple().getOS() == llvm::Triple::UnknownOS) { + if (getTriple().getOS() != llvm::Triple::UnknownOS) { // Theoretically an "unknown" OS should mean no standard libraries, however // it could also mean that a custom set of libraries is in use, so just add // /lib to the search path. Disable multiarch in this case, to discourage // paths containing "unknown" from acquiring meanings. - getFilePaths().push_back(getDriver().SysRoot + "/lib"); - } else { const std::string MultiarchTriple = getMultiarchTriple(getDriver(), Triple, getDriver().SysRoot); getFilePaths().push_back(getDriver().SysRoot + "/lib/" + MultiarchTriple); } + + getFilePaths().push_back(getDriver().SysRoot + "/lib"); } bool WebAssembly::IsMathErrnoDefault() const { return false; }