<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I know GCC itself does not support webassembly, but Libstdc++ can be built.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:unlvsur@live.com">unlvsur unlvsur</a><br>
<b>Sent: </b>Wednesday, April 28, 2021 08:21<br>
<b>To: </b><a href="mailto:jwakely.gcc@gmail.com">Jonathan Wakely</a><br>
<b>Cc: </b><a href="mailto:libstdc++@gcc.gnu.org">unlvsur unlvsur via Libstdc++</a><br>
<b>Subject: </b>Re: Successfully build libstdc++ for wasm32-wasi</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Arial",sans-serif;color:black">Probably We need to tell clang to support -stdlib=libstdc++ for wasm? And nathan is able to modify the clang source code directly<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">Get
<a href="https://aka.ms/AAb9ysg">Outlook for Android</a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><img border="0" width="347" height="2" style="width:3.6145in;height:.0156in" id="Horizontal_x0020_Line_x0020_1" src="cid:image001.png@01D73C08.B95DDBE0"><o:p></o:p></p>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Jonathan Wakely <jwakely.gcc@gmail.com><br>
<b>Sent:</b> Wednesday, April 28, 2021 4:52:55 AM<br>
<b>To:</b> unlvsur unlvsur <unlvsur@live.com><br>
<b>Cc:</b> unlvsur unlvsur via Libstdc++ <libstdc++@gcc.gnu.org><br>
<b>Subject:</b> Re: Successfully build libstdc++ for wasm32-wasi</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, 28 Apr 2021, 04:59 unlvsur unlvsur via Libstdc++, <<a href="mailto:libstdc%2B%2B@gcc.gnu.org">libstdc++@gcc.gnu.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">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++?<o:p></o:p></p>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">That seems like a question about using clang, so off topic here, but I would try -nostdlib -lsupc++<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>