[PATCH] D117888: [clang][driver][wasm] Support -stdlib=libstdc++ for WebAssembly
Sam Clegg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 1 05:45:47 PST 2022
sbc100 added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:445
addSystemInclude(DriverArgs, CC1Args,
- getDriver().SysRoot + "/include/c++/v1");
+ getDriver().SysRoot + "/include/c++/11");
+ break;
----------------
Can't these 6 lines be removed now? (don't they happen as part of addLibStdCXXIncludePaths?)
================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:493
+ // FIXME: Fallback correct?
+ Version = "v1";
+ }
----------------
Looking at `Gnu.cpp` and `Fuscia.cpp` it seems like `return` (or `return false`) here should be fine.
================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:544
+
+ if (Version.empty()) {
+ // FIXME: Fallback correct?
----------------
Just early return here if no headers can be found? Looking at Gnu.cpp it seems that `addLibStdCxxIncludePaths` can simply to nothing if no GCC install is found.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117888/new/
https://reviews.llvm.org/D117888
More information about the cfe-commits
mailing list