[llvm-dev] FW: Successfully build libstdc++ for wasm32-wasi

unlvsur unlvsur via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 28 05:30:07 PDT 2021


Hello clang and llvm devs. Can you enable -stdlib=libstdc++ for wasm32-wasi? I have successfully built libstdc++ with clang, targeting wasm32-wasi. Problem is clang does not support this for that target. Options like -nostdinc++ will end up conflict with -lc++abi since clang always adds -lc++abi to the compilation command.

I know GCC itself does not support webassembly, but Libstdc++ can be built.

Thank you

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: unlvsur unlvsur<mailto:unlvsur at live.com>
Sent: Wednesday, April 28, 2021 08:21
To: Jonathan Wakely<mailto:jwakely.gcc at gmail.com>
Cc: unlvsur unlvsur via Libstdc++<mailto:libstdc++ at gcc.gnu.org>
Subject: Re: Successfully build libstdc++ for wasm32-wasi

Probably We need to tell clang to support -stdlib=libstdc++ for wasm? And nathan is able to modify the clang source code directly
Get Outlook for Android<https://aka.ms/AAb9ysg>


From: Jonathan Wakely <jwakely.gcc at gmail.com>
Sent: Wednesday, April 28, 2021 4:52:55 AM
To: unlvsur unlvsur <unlvsur at live.com>
Cc: unlvsur unlvsur via Libstdc++ <libstdc++ at gcc.gnu.org>
Subject: Re: Successfully build libstdc++ for wasm32-wasi


On Wed, 28 Apr 2021, 04:59 unlvsur unlvsur via Libstdc++, <libstdc++ at gcc.gnu.org<mailto:libstdc%2B%2B at gcc.gnu.org>> wrote:
The issue is that clang front-end does not support -stdlib=libstdc++ for wasm32-wasi. It always adds -lc++abi toggle. Is that possible to disable this and use -lsupc++?


That seems like a question about using clang, so off topic here, but I would try -nostdlib -lsupc++



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210428/08291d56/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 65B15BA9A5594C71B0CA9E75307E1408.png
Type: image/png
Size: 159 bytes
Desc: 65B15BA9A5594C71B0CA9E75307E1408.png
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210428/08291d56/attachment.png>


More information about the llvm-dev mailing list