forked from OSchip/llvm-project
[clang][driver][wasm] Fix libstdc++ target-dependent include dir
The triple goes after the gcc version, not before. Also add the /backward version. Differential Revision: https://reviews.llvm.org/D120251
This commit is contained in:
parent
57c6012213
commit
2f300d34de
|
@ -528,10 +528,12 @@ void WebAssembly::addLibStdCXXIncludePaths(
|
||||||
|
|
||||||
// First add the per-target include path if the OS is known.
|
// First add the per-target include path if the OS is known.
|
||||||
if (IsKnownOs) {
|
if (IsKnownOs) {
|
||||||
std::string TargetDir = LibPath + "/" + MultiarchTriple + "/c++/" + Version;
|
std::string TargetDir = LibPath + "/c++/" + Version + "/" + MultiarchTriple;
|
||||||
addSystemInclude(DriverArgs, CC1Args, TargetDir);
|
addSystemInclude(DriverArgs, CC1Args, TargetDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second add the generic one.
|
// Second add the generic one.
|
||||||
addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
|
addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version);
|
||||||
|
// Third the backward one.
|
||||||
|
addSystemInclude(DriverArgs, CC1Args, LibPath + "/c++/" + Version + "/backward");
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,9 @@
|
||||||
// COMPILE_STDCXX: clang{{.*}}" "-cc1"
|
// COMPILE_STDCXX: clang{{.*}}" "-cc1"
|
||||||
// COMPILE_STDCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
// COMPILE_STDCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
||||||
// COMPILE_STDCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
|
// COMPILE_STDCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
|
||||||
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/c++/4.8"
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/wasm32-wasi"
|
||||||
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8"
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8"
|
||||||
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/backward"
|
||||||
// COMPILE_STDCXX: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
// COMPILE_STDCXX: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
||||||
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
||||||
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
||||||
|
|
Loading…
Reference in New Issue