[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-dev
Subject:    [llvm-dev] FW: Successfully build libstdc++ for wasm32-wasi
From:       unlvsur unlvsur via llvm-dev <llvm-dev () lists ! llvm ! org>
Date:       2021-04-28 12:30:07
Message-ID: DM6PR05MB469798E67F0CABB3F69F4B61D6409 () DM6PR05MB4697 ! namprd05 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@live.com>
Sent: Wednesday, April 28, 2021 08:21
To: Jonathan Wakely<mailto:jwakely.gcc@gmail.com>
Cc: unlvsur unlvsur via Libstdc++<mailto:libstdc++@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@gmail.com>
Sent: Wednesday, April 28, 2021 4:52:55 AM
To: unlvsur unlvsur <unlvsur@live.com>
Cc: unlvsur unlvsur via Libstdc++ <libstdc++@gcc.gnu.org>
Subject: Re: Successfully build libstdc++ for wasm32-wasi


On Wed, 28 Apr 2021, 04:59 unlvsur unlvsur via Libstdc++, \
<libstdc++@gcc.gnu.org<mailto:libstdc%2B%2B@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++


[Attachment #5 (text/html)]

<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>&nbsp;</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>&nbsp;</o:p></p>
<p class="MsoNormal">Thank you</p>
<p class="MsoNormal"><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span \
style="font-family:&quot;Arial&quot;,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:&quot;Arial&quot;,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:&quot;Arial&quot;,sans-serif;color:black"><o:p>&nbsp;</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 &lt;jwakely.gcc@gmail.com&gt;<br> <b>Sent:</b> \
Wednesday, April 28, 2021 4:52:55 AM<br> <b>To:</b> unlvsur unlvsur \
&lt;unlvsur@live.com&gt;<br> <b>Cc:</b> unlvsur unlvsur via Libstdc++ \
&lt;libstdc++@gcc.gnu.org&gt;<br> <b>Subject:</b> Re: Successfully build libstdc++ \
for wasm32-wasi</span> <o:p></o:p></p> <div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, 28 Apr 2021, 04:59 unlvsur unlvsur via Libstdc++, &lt;<a \
href="mailto:libstdc%2B%2B@gcc.gnu.org">libstdc++@gcc.gnu.org</a>&gt; \
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>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</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>&nbsp;</o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>


["65B15BA9A5594C71B0CA9E75307E1408.png" (image/png)]
[Attachment #7 (unknown)]

_______________________________________________
LLVM Developers mailing list
llvm-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic