[clang] Add wasm-opt warning (PR #100321)

2024-07-24 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Personally I don't find it to be a great user experience when a tool warns by 
default in default configration. This means that any user using wasi-sdk, for 
example, would by default with no other action taken receive warnings. That's 
annoying and misleading to end users because `wasm-opt` isn't required for a 
successful compilation. "Just add another flag" does indeed solve the problem 
but it's annoying to have to configure that and IMO it should not be required 
to pass extra flags to suppress warnings in default configurations. 

https://github.com/llvm/llvm-project/pull/100321
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Add wasm-opt warning (PR #100321)

2024-07-24 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

If wasm-opt is explicitly enabled via a flag, then I think it would make sense 
for this to be an error rather than a warning. Otherwise though if no default 
behavior was indicated then I would personally fear the churn of this change as 
most developers I know of on `wasm32-wasip1` don't have `wasm-opt` in their 
path meaning that this would create many un-suppressable warnings by default 
for these projects.

Personally I think that `wasm-opt` should be disabled by default since it's an 
optional tool to be coupled with a toolchain and it means that the same 
compiler invocation can produce drastically different results on the same 
version of LLVM depending on the execution environment. I realize though that 
disabling it by default is probably controversial, so short of that I don't 
know how best to thread this needle and communicate the lack of `wasm-opt` to 
end users.

https://github.com/llvm/llvm-project/pull/100321
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-19 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

ping @sbc100 would you be able to merge this for me?

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-12 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

@sbc100 oh I can't merge things myself so if you'd be ok merging for me that'd 
be appreciated

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

> would it be relevant to open an issue in the binaryen repo for the support of 
> Wasm components?

Oh sorry forgot to respond to this as well. I'm not personally part of the 
binaryen repo but I suspect they would not object to having an issue to track 
this.

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-11 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Ah yeah unfortunately I think it still comes back to how to do all this in the 
test harness. If there are examples of this elsewhere I'd be happy to 
investigate and copy. I'm also not sure if shell scripts would work for 
Windows...

@sbc100 if you're ok with this without a test though would you be able to merge 
for me?

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Is there a way to "fake" a `wasm-opt` executable? I didn't find any existing 
tests for the `wasm-opt` integration and it's auto-disabled if `wasm-opt` isn't 
found on `$PATH`, which doesn't happen by default in the test suite, so unless 
I can set up `wasm-opt` to show up in `$PATH` as part of the test I'm not sure 
how to test

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton updated 
https://github.com/llvm/llvm-project/pull/98373

>From 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Wed, 10 Jul 2024 12:18:06 -0700
Subject: [PATCH 1/4] [WebAssembly] Disable running `wasm-opt` on components

This commit adds a check that disables `wasm-opt` for the
`wasm32-wasip2` target because `wasm-opt` doesn't support components at
this time. This also fixes a minor issue from #95208 where if `wasm-opt`
was disabled then the linker wouldn't run at all.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 85 -
 1 file changed, 47 insertions(+), 38 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index 60bd97e0ee987..2753645f4700f 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   return ToolChain.GetProgramPath(ToolChain.getDefaultLinker());
 }
 
+static bool IsWasip2(const llvm::Triple ) {
+  return TargetTriple.getOSName() == "wasip2";
+}
+
 void wasm::Linker::ConstructJob(Compilation , const JobAction ,
 const InputInfo ,
 const InputInfoList ,
@@ -158,46 +162,51 @@ void wasm::Linker::ConstructJob(Compilation , const 
JobAction ,
   CmdArgs.push_back("-o");
   CmdArgs.push_back(Output.getFilename());
 
-  if (Args.hasFlag(options::OPT_wasm_opt, options::OPT_no_wasm_opt, true)) {
-// When optimizing, if wasm-opt is available, run it.
-std::string WasmOptPath;
-if (Args.getLastArg(options::OPT_O_Group)) {
-  WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
-  if (WasmOptPath == "wasm-opt") {
-WasmOptPath = {};
-  }
+  // Don't use wasm-opt by default on `wasip2` as it doesn't have support for
+  // components at this time. Retain the historical default otherwise, though,
+  // of running `wasm-opt` by default.
+  bool WasmOptDefault = !IsWasip2(ToolChain.getTriple());
+  bool RunWasmOpt = Args.hasFlag(options::OPT_wasm_opt, 
options::OPT_no_wasm_opt, WasmOptDefault);
+
+  // If wasm-opt is enabled and optimizations are happening look for the
+  // `wasm-opt` program. If it's not found auto-disable it.
+  std::string WasmOptPath;
+  if (RunWasmOpt && Args.getLastArg(options::OPT_O_Group)) {
+WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
+if (WasmOptPath == "wasm-opt") {
+  WasmOptPath = {};
 }
+  }
 
-if (!WasmOptPath.empty()) {
-  CmdArgs.push_back("--keep-section=target_features");
-}
+  if (!WasmOptPath.empty()) {
+CmdArgs.push_back("--keep-section=target_features");
+  }
 
-C.addCommand(std::make_unique(JA, *this,
-   ResponseFileSupport::AtFileCurCP(),
-   Linker, CmdArgs, Inputs, Output));
-
-if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
-  if (!WasmOptPath.empty()) {
-StringRef OOpt = "s";
-if (A->getOption().matches(options::OPT_O4) ||
-A->getOption().matches(options::OPT_Ofast))
-  OOpt = "4";
-else if (A->getOption().matches(options::OPT_O0))
-  OOpt = "0";
-else if (A->getOption().matches(options::OPT_O))
-  OOpt = A->getValue();
-
-if (OOpt != "0") {
-  const char *WasmOpt = Args.MakeArgString(WasmOptPath);
-  ArgStringList OptArgs;
-  OptArgs.push_back(Output.getFilename());
-  OptArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt));
-  OptArgs.push_back("-o");
-  OptArgs.push_back(Output.getFilename());
-  C.addCommand(std::make_unique(
-  JA, *this, ResponseFileSupport::AtFileCurCP(), WasmOpt, OptArgs,
-  Inputs, Output));
-}
+  C.addCommand(std::make_unique(JA, *this,
+ ResponseFileSupport::AtFileCurCP(),
+ Linker, CmdArgs, Inputs, Output));
+
+  if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
+if (!WasmOptPath.empty()) {
+  StringRef OOpt = "s";
+  if (A->getOption().matches(options::OPT_O4) ||
+  A->getOption().matches(options::OPT_Ofast))
+OOpt = "4";
+  else if (A->getOption().matches(options::OPT_O0))
+OOpt = "0";
+  else if (A->getOption().matches(options::OPT_O))
+OOpt = A->getValue();
+
+  if (OOpt != "0") {
+const char *WasmOpt = Args.MakeArgString(WasmOptPath);
+ArgStringList OptArgs;
+OptArgs.push_back(Output.getFilename());
+OptArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt));
+OptArgs.push_back("-o");
+OptArgs.push_back(Output.getFilename());
+C.addCommand(std::make_unique(
+JA, *this, ResponseFileSupport::AtFileCurCP(), WasmOpt, OptArgs,
+ 

[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits


@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   return ToolChain.GetProgramPath(ToolChain.getDefaultLinker());
 }
 
+static bool IsWasip2(const llvm::Triple ) {
+  return TargetTriple.getOSName() == "wasip2";

alexcrichton wrote:

Sounds reasonable to me yeah  

https://github.com/llvm/llvm-project/pull/98373
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton updated 
https://github.com/llvm/llvm-project/pull/98373

>From 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Wed, 10 Jul 2024 12:18:06 -0700
Subject: [PATCH 1/3] [WebAssembly] Disable running `wasm-opt` on components

This commit adds a check that disables `wasm-opt` for the
`wasm32-wasip2` target because `wasm-opt` doesn't support components at
this time. This also fixes a minor issue from #95208 where if `wasm-opt`
was disabled then the linker wouldn't run at all.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 85 -
 1 file changed, 47 insertions(+), 38 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index 60bd97e0ee987..2753645f4700f 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   return ToolChain.GetProgramPath(ToolChain.getDefaultLinker());
 }
 
+static bool IsWasip2(const llvm::Triple ) {
+  return TargetTriple.getOSName() == "wasip2";
+}
+
 void wasm::Linker::ConstructJob(Compilation , const JobAction ,
 const InputInfo ,
 const InputInfoList ,
@@ -158,46 +162,51 @@ void wasm::Linker::ConstructJob(Compilation , const 
JobAction ,
   CmdArgs.push_back("-o");
   CmdArgs.push_back(Output.getFilename());
 
-  if (Args.hasFlag(options::OPT_wasm_opt, options::OPT_no_wasm_opt, true)) {
-// When optimizing, if wasm-opt is available, run it.
-std::string WasmOptPath;
-if (Args.getLastArg(options::OPT_O_Group)) {
-  WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
-  if (WasmOptPath == "wasm-opt") {
-WasmOptPath = {};
-  }
+  // Don't use wasm-opt by default on `wasip2` as it doesn't have support for
+  // components at this time. Retain the historical default otherwise, though,
+  // of running `wasm-opt` by default.
+  bool WasmOptDefault = !IsWasip2(ToolChain.getTriple());
+  bool RunWasmOpt = Args.hasFlag(options::OPT_wasm_opt, 
options::OPT_no_wasm_opt, WasmOptDefault);
+
+  // If wasm-opt is enabled and optimizations are happening look for the
+  // `wasm-opt` program. If it's not found auto-disable it.
+  std::string WasmOptPath;
+  if (RunWasmOpt && Args.getLastArg(options::OPT_O_Group)) {
+WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
+if (WasmOptPath == "wasm-opt") {
+  WasmOptPath = {};
 }
+  }
 
-if (!WasmOptPath.empty()) {
-  CmdArgs.push_back("--keep-section=target_features");
-}
+  if (!WasmOptPath.empty()) {
+CmdArgs.push_back("--keep-section=target_features");
+  }
 
-C.addCommand(std::make_unique(JA, *this,
-   ResponseFileSupport::AtFileCurCP(),
-   Linker, CmdArgs, Inputs, Output));
-
-if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
-  if (!WasmOptPath.empty()) {
-StringRef OOpt = "s";
-if (A->getOption().matches(options::OPT_O4) ||
-A->getOption().matches(options::OPT_Ofast))
-  OOpt = "4";
-else if (A->getOption().matches(options::OPT_O0))
-  OOpt = "0";
-else if (A->getOption().matches(options::OPT_O))
-  OOpt = A->getValue();
-
-if (OOpt != "0") {
-  const char *WasmOpt = Args.MakeArgString(WasmOptPath);
-  ArgStringList OptArgs;
-  OptArgs.push_back(Output.getFilename());
-  OptArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt));
-  OptArgs.push_back("-o");
-  OptArgs.push_back(Output.getFilename());
-  C.addCommand(std::make_unique(
-  JA, *this, ResponseFileSupport::AtFileCurCP(), WasmOpt, OptArgs,
-  Inputs, Output));
-}
+  C.addCommand(std::make_unique(JA, *this,
+ ResponseFileSupport::AtFileCurCP(),
+ Linker, CmdArgs, Inputs, Output));
+
+  if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
+if (!WasmOptPath.empty()) {
+  StringRef OOpt = "s";
+  if (A->getOption().matches(options::OPT_O4) ||
+  A->getOption().matches(options::OPT_Ofast))
+OOpt = "4";
+  else if (A->getOption().matches(options::OPT_O0))
+OOpt = "0";
+  else if (A->getOption().matches(options::OPT_O))
+OOpt = A->getValue();
+
+  if (OOpt != "0") {
+const char *WasmOpt = Args.MakeArgString(WasmOptPath);
+ArgStringList OptArgs;
+OptArgs.push_back(Output.getFilename());
+OptArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt));
+OptArgs.push_back("-o");
+OptArgs.push_back(Output.getFilename());
+C.addCommand(std::make_unique(
+JA, *this, ResponseFileSupport::AtFileCurCP(), WasmOpt, OptArgs,
+ 

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-07-10 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

I've opened https://github.com/llvm/llvm-project/pull/98373 to avoid running 
`wasm-opt` for the `wasm32-wasip2` target by default. It also fixes a minor 
issue with this PR where if `wasm-opt` were disabled it would skip running the 
linker entirely.

https://github.com/llvm/llvm-project/pull/95208
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Disable running `wasm-opt` on components (PR #98373)

2024-07-10 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton created 
https://github.com/llvm/llvm-project/pull/98373

This commit adds a check that disables `wasm-opt` for the `wasm32-wasip2` 
target because `wasm-opt` doesn't support components at this time. This also 
fixes a minor issue from #95208 where if `wasm-opt` was disabled then the 
linker wouldn't run at all.

>From 177fe1d4df4e9f02382c2f8f5dce9de4d935d763 Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Wed, 10 Jul 2024 12:18:06 -0700
Subject: [PATCH] [WebAssembly] Disable running `wasm-opt` on components

This commit adds a check that disables `wasm-opt` for the
`wasm32-wasip2` target because `wasm-opt` doesn't support components at
this time. This also fixes a minor issue from #95208 where if `wasm-opt`
was disabled then the linker wouldn't run at all.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 85 -
 1 file changed, 47 insertions(+), 38 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index 60bd97e0ee987..2753645f4700f 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -61,6 +61,10 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   return ToolChain.GetProgramPath(ToolChain.getDefaultLinker());
 }
 
+static bool IsWasip2(const llvm::Triple ) {
+  return TargetTriple.getOSName() == "wasip2";
+}
+
 void wasm::Linker::ConstructJob(Compilation , const JobAction ,
 const InputInfo ,
 const InputInfoList ,
@@ -158,46 +162,51 @@ void wasm::Linker::ConstructJob(Compilation , const 
JobAction ,
   CmdArgs.push_back("-o");
   CmdArgs.push_back(Output.getFilename());
 
-  if (Args.hasFlag(options::OPT_wasm_opt, options::OPT_no_wasm_opt, true)) {
-// When optimizing, if wasm-opt is available, run it.
-std::string WasmOptPath;
-if (Args.getLastArg(options::OPT_O_Group)) {
-  WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
-  if (WasmOptPath == "wasm-opt") {
-WasmOptPath = {};
-  }
+  // Don't use wasm-opt by default on `wasip2` as it doesn't have support for
+  // components at this time. Retain the historical default otherwise, though,
+  // of running `wasm-opt` by default.
+  bool WasmOptDefault = !IsWasip2(ToolChain.getTriple());
+  bool RunWasmOpt = Args.hasFlag(options::OPT_wasm_opt, 
options::OPT_no_wasm_opt, WasmOptDefault);
+
+  // If wasm-opt is enabled and optimizations are happening look for the
+  // `wasm-opt` program. If it's not found auto-disable it.
+  std::string WasmOptPath;
+  if (RunWasmOpt && Args.getLastArg(options::OPT_O_Group)) {
+WasmOptPath = ToolChain.GetProgramPath("wasm-opt");
+if (WasmOptPath == "wasm-opt") {
+  WasmOptPath = {};
 }
+  }
 
-if (!WasmOptPath.empty()) {
-  CmdArgs.push_back("--keep-section=target_features");
-}
+  if (!WasmOptPath.empty()) {
+CmdArgs.push_back("--keep-section=target_features");
+  }
 
-C.addCommand(std::make_unique(JA, *this,
-   ResponseFileSupport::AtFileCurCP(),
-   Linker, CmdArgs, Inputs, Output));
-
-if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
-  if (!WasmOptPath.empty()) {
-StringRef OOpt = "s";
-if (A->getOption().matches(options::OPT_O4) ||
-A->getOption().matches(options::OPT_Ofast))
-  OOpt = "4";
-else if (A->getOption().matches(options::OPT_O0))
-  OOpt = "0";
-else if (A->getOption().matches(options::OPT_O))
-  OOpt = A->getValue();
-
-if (OOpt != "0") {
-  const char *WasmOpt = Args.MakeArgString(WasmOptPath);
-  ArgStringList OptArgs;
-  OptArgs.push_back(Output.getFilename());
-  OptArgs.push_back(Args.MakeArgString(llvm::Twine("-O") + OOpt));
-  OptArgs.push_back("-o");
-  OptArgs.push_back(Output.getFilename());
-  C.addCommand(std::make_unique(
-  JA, *this, ResponseFileSupport::AtFileCurCP(), WasmOpt, OptArgs,
-  Inputs, Output));
-}
+  C.addCommand(std::make_unique(JA, *this,
+ ResponseFileSupport::AtFileCurCP(),
+ Linker, CmdArgs, Inputs, Output));
+
+  if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
+if (!WasmOptPath.empty()) {
+  StringRef OOpt = "s";
+  if (A->getOption().matches(options::OPT_O4) ||
+  A->getOption().matches(options::OPT_Ofast))
+OOpt = "4";
+  else if (A->getOption().matches(options::OPT_O0))
+OOpt = "0";
+  else if (A->getOption().matches(options::OPT_O))
+OOpt = A->getValue();
+
+  if (OOpt != "0") {
+const char *WasmOpt = Args.MakeArgString(WasmOptPath);
+ArgStringList OptArgs;
+OptArgs.push_back(Output.getFilename());
+

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-29 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Oop no I did not, thank you for the heads up! I'll work on updating wasi-sdk 
now.

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-22 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Yes it's expected that wasi-sdk will need changes to incorporate this PR. I'm 
waiting for this to be in an LLVM release before updating wasi-sdk.

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton updated 
https://github.com/llvm/llvm-project/pull/84569

>From 99ca952b60344d2ff683d05d8baa423aa11da83a Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Fri, 8 Mar 2024 13:36:18 -0800
Subject: [PATCH 1/2] [WebAssembly] Change the default linker for
 `wasm32-wasip2`

This commit changes the default linker in the WebAssembly toolchain for
the `wasm32-wasip2` target. This target is being added to the
WebAssembly/wasi-sdk and WebAssembly/wasi-libc projects to target the
Component Model by default, in contrast with the preexisting
`wasm32-wasi` target (in the process of being renamed to
`wasm32-wasip1`) which outputs a core WebAssembly module by default.

The `wasm-component-ld` project currently lives in my GitHub account at
https://github.com/alexcrichton/wasm-component-ld and isn't necessarily
"official" yet, but it's expected to continue to evolve as the
`wasm32-wasip2` target continues to shape up and evolve.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 6 ++
 clang/lib/Driver/ToolChains/WebAssembly.h   | 2 +-
 clang/test/Driver/wasm-toolchain.c  | 8 
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index b8c2573d6265fb..a6c43c627f7206 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -221,6 +221,12 @@ WebAssembly::WebAssembly(const Driver , const 
llvm::Triple ,
   }
 }
 
+const char *WebAssembly::getDefaultLinker() const {
+  if (getOS() == "wasip2")
+return "wasm-component-ld";
+  return "wasm-ld";
+}
+
 bool WebAssembly::IsMathErrnoDefault() const { return false; }
 
 bool WebAssembly::IsObjCNonFragileABIDefault() const { return true; }
diff --git a/clang/lib/Driver/ToolChains/WebAssembly.h 
b/clang/lib/Driver/ToolChains/WebAssembly.h
index ae60f464c10818..76e0ca39bd748d 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.h
+++ b/clang/lib/Driver/ToolChains/WebAssembly.h
@@ -67,7 +67,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public 
ToolChain {
llvm::opt::ArgStringList ) const override;
   SanitizerMask getSupportedSanitizers() const override;
 
-  const char *getDefaultLinker() const override { return "wasm-ld"; }
+  const char *getDefaultLinker() const override;
 
   CXXStdlibType GetDefaultCXXStdlibType() const override {
 return ToolChain::CST_Libcxx;
diff --git a/clang/test/Driver/wasm-toolchain.c 
b/clang/test/Driver/wasm-toolchain.c
index f950283ec42aa0..59cfdfb3cb113b 100644
--- a/clang/test/Driver/wasm-toolchain.c
+++ b/clang/test/Driver/wasm-toolchain.c
@@ -197,3 +197,11 @@
 // RUN: not %clang -### %s --target=wasm32-unknown-unknown 
--sysroot=%s/no-sysroot-there -fPIC -mno-mutable-globals %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=PIC_NO_MUTABLE_GLOBALS %s
 // PIC_NO_MUTABLE_GLOBALS: error: invalid argument '-fPIC' not allowed with 
'-mno-mutable-globals'
+
+// Test that `wasm32-wasip2` invokes the `wasm-component-ld` linker by default
+// instead of `wasm-ld`.
+
+// RUN: %clang -### -O2 --target=wasm32-wasip2 %s --sysroot /foo 2>&1 \
+// RUN:   | FileCheck -check-prefix=LINK_WASIP2 %s
+// LINK_WASIP2: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
+// LINK_WASIP2: wasm-component-ld{{.*}}" "-L/foo/lib/wasm32-wasip2" "crt1.o" 
"[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"

>From 7284fd4c545388985f44e6bf336aad44c083a197 Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Mon, 18 Mar 2024 12:23:23 -0700
Subject: [PATCH 2/2] Pass a path to `wasm-ld` to `wasm-component-ld`

This commit adds an explicit argument that's passed to
`wasm-component-ld` containing the location of `wasm-ld` itself. This
enables `wasm-component-ld` to avoid hunting around looking for it and
instead use the install that's paired with Clang itself.

Additionally this reinterprets the `-fuse-ld=lld` argument to explicitly
requesting the `wasm-ld` linker flavor, even on `wasm32-wasip2` targets.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 21 +++--
 clang/test/Driver/wasm-toolchain.c  | 16 
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index a6c43c627f7206..b7c6efab83e806 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -44,8 +44,15 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   llvm::sys::fs::can_execute(UseLinker))
 return std::string(UseLinker);
 
-  // Accept 'lld', and 'ld' as aliases for the default linker
-  if (UseLinker != "lld" && UseLinker != "ld")
+  // Interpret 'lld' as explicitly requesting `wasm-ld`, so look for that
+  // linker. Note that for `wasm32-wasip2` this overrides the default 
linker
+  // of `wasm-component-ld`.
+  if (UseLinker 

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

At @sunfishcode's request I've pushed up a second commit which pass the path to 
`wasm-ld` to `wasm-component-ld`, and in testing it I also added the ability 
for `-fuse-ld=lld` to explicitly request that `wasm-ld` is used, regardless of 
target.

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton updated 
https://github.com/llvm/llvm-project/pull/84569

>From 99ca952b60344d2ff683d05d8baa423aa11da83a Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Fri, 8 Mar 2024 13:36:18 -0800
Subject: [PATCH 1/2] [WebAssembly] Change the default linker for
 `wasm32-wasip2`

This commit changes the default linker in the WebAssembly toolchain for
the `wasm32-wasip2` target. This target is being added to the
WebAssembly/wasi-sdk and WebAssembly/wasi-libc projects to target the
Component Model by default, in contrast with the preexisting
`wasm32-wasi` target (in the process of being renamed to
`wasm32-wasip1`) which outputs a core WebAssembly module by default.

The `wasm-component-ld` project currently lives in my GitHub account at
https://github.com/alexcrichton/wasm-component-ld and isn't necessarily
"official" yet, but it's expected to continue to evolve as the
`wasm32-wasip2` target continues to shape up and evolve.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 6 ++
 clang/lib/Driver/ToolChains/WebAssembly.h   | 2 +-
 clang/test/Driver/wasm-toolchain.c  | 8 
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index b8c2573d6265fb..a6c43c627f7206 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -221,6 +221,12 @@ WebAssembly::WebAssembly(const Driver , const 
llvm::Triple ,
   }
 }
 
+const char *WebAssembly::getDefaultLinker() const {
+  if (getOS() == "wasip2")
+return "wasm-component-ld";
+  return "wasm-ld";
+}
+
 bool WebAssembly::IsMathErrnoDefault() const { return false; }
 
 bool WebAssembly::IsObjCNonFragileABIDefault() const { return true; }
diff --git a/clang/lib/Driver/ToolChains/WebAssembly.h 
b/clang/lib/Driver/ToolChains/WebAssembly.h
index ae60f464c10818..76e0ca39bd748d 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.h
+++ b/clang/lib/Driver/ToolChains/WebAssembly.h
@@ -67,7 +67,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public 
ToolChain {
llvm::opt::ArgStringList ) const override;
   SanitizerMask getSupportedSanitizers() const override;
 
-  const char *getDefaultLinker() const override { return "wasm-ld"; }
+  const char *getDefaultLinker() const override;
 
   CXXStdlibType GetDefaultCXXStdlibType() const override {
 return ToolChain::CST_Libcxx;
diff --git a/clang/test/Driver/wasm-toolchain.c 
b/clang/test/Driver/wasm-toolchain.c
index f950283ec42aa0..59cfdfb3cb113b 100644
--- a/clang/test/Driver/wasm-toolchain.c
+++ b/clang/test/Driver/wasm-toolchain.c
@@ -197,3 +197,11 @@
 // RUN: not %clang -### %s --target=wasm32-unknown-unknown 
--sysroot=%s/no-sysroot-there -fPIC -mno-mutable-globals %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=PIC_NO_MUTABLE_GLOBALS %s
 // PIC_NO_MUTABLE_GLOBALS: error: invalid argument '-fPIC' not allowed with 
'-mno-mutable-globals'
+
+// Test that `wasm32-wasip2` invokes the `wasm-component-ld` linker by default
+// instead of `wasm-ld`.
+
+// RUN: %clang -### -O2 --target=wasm32-wasip2 %s --sysroot /foo 2>&1 \
+// RUN:   | FileCheck -check-prefix=LINK_WASIP2 %s
+// LINK_WASIP2: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
+// LINK_WASIP2: wasm-component-ld{{.*}}" "-L/foo/lib/wasm32-wasip2" "crt1.o" 
"[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"

>From d1a1b22da3e1361a34f2d4fa8a2f9ef361f109ee Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Mon, 18 Mar 2024 12:23:23 -0700
Subject: [PATCH 2/2] Pass a path to `wasm-ld` to `wasm-component-ld`

This commit adds an explicit argument that's passed to
`wasm-component-ld` containing the location of `wasm-ld` itself. This
enables `wasm-component-ld` to avoid hunting around looking for it and
instead use the install that's paired with Clang itself.

Additionally this reinterprets the `-fuse-ld=lld` argument to explicitly
requesting the `wasm-ld` linker flavor, even on `wasm32-wasip2` targets.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 20 ++--
 clang/test/Driver/wasm-toolchain.c  | 16 
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index a6c43c627f7206..61bf9d8aae72d2 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -44,8 +44,15 @@ std::string wasm::Linker::getLinkerPath(const ArgList ) 
const {
   llvm::sys::fs::can_execute(UseLinker))
 return std::string(UseLinker);
 
-  // Accept 'lld', and 'ld' as aliases for the default linker
-  if (UseLinker != "lld" && UseLinker != "ld")
+  // Interpret 'lld' as explicitly requesting `wasm-ld`, so look for that
+  // linker. Note that for `wasm32-wasip2` this overrides the default 
linker
+  // of `wasm-component-ld`.
+  if (UseLinker 

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

ping @sbc100, happy to answer any more questions if you have them! 

I was tentatively hoping this could get backported to an 18.1.x release so we 
could get a wasi-sdk release with p1/p2/etc

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

> So the core module + metadata is kind of isomorphic with that 
> single-core-module-component?

Sort of and sort of not. At a high level you're correct, but at a technical 
level this isn't correct. The subtle differences are:

* Most wasm binaries today using WASI probably use `wasi_snapshot_preview1` 
imports. That means they need an "adapter" to switch to to WASIp2-based 
imports. That adapter is a core wasm which is currently baked into 
`wasm-component-ld` (see the adapters in [this 
folder](https://github.com/alexcrichton/wasm-component-ld/tree/main/src))
* Due to the way components and lifting and lowering works many imports need a 
"shim". For example in the component model when you "lower" a function from a 
component function to a core function you need to specify a linear memory. A 
linear memory isn't available until you instantiate the core module, but the 
core module needs the lowered imports to be instantiated. To break this cycle 
we introduce a shim wasm module which uses `call_indirect` through a table for 
its exports, so that's used to pass in as imports when instantiating the main 
module, and then after the main module is instantiated we instantiate another 
shim module that fills in the table.

Going from core module + metadata into a component is a pretty nontrivial 
operation, so the raw output of `wasm-ld` (module + metadata) isn't suitable as 
an intermediate artifact for components. 

> I was more asking about whether the file types is accepts are anything more 
> than object files and libraries. i.e. can you pass other core modules and 
> have wasm-component-ld build a component that contains more than one core 
> module?


Ah sory I misunderstood! Currently wasm-component-ld takes no other inputs and 
it assumes everything goes into `wasm-ld`. In the future for the dynamic 
linking case above it may start taking in `*.wasm` binaries compiled as shared 
libraries to bundle and/or refer to in the output component, but that's in the 
future. That means that at this time wasm-component-ld will always build a 
component with a single "main module", e.g. the one from `wasm-ld`.

> Also, can you say more about the metadata that is being using to drive 
> wasm-componenet-ld? If the core module is all based on canonical ABI what 
> extra metdata is needed/planned?

Certainly! The canonical ABI gives the ability to say that for any component 
model function type it corresponds to a particular core wasm function type. 
That operation is not reversible, though, you can't go from core wasm back to 
the component model function type. Thus the metadata carries along this 
information. That way the componentization process draws a mapping from 
component model import/export to core wasm import/export and then can 
synthesize the right type in the component binary format.

The short answer to your question, though, is `wasm-tools component wit 
./my-wit-files --wasm`. That output blob, which is itself a component but only 
with type information, is embedded in core wasm. Put another way we start with 
WIT files, then those are converted into their binary format as a component 
with only types, that gets fed through LLVM/wasm-ld, then on the other end we 
deserialize the component-with-type-information, turn it back into WIT, and 
then make the real component.

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

Currently it accepts no extra inputs, but in the future I'd expect that it'll 
grow an option or two of its own. Currently it [hand-codes the list of options 
to forward to 
`wasm-ld`](https://github.com/alexcrichton/wasm-component-ld/blob/2f6106e395e2db99a8bb0524088d08bb6964997a/src/main.rs#L23-L53)
 which I'm sure will need updates over time, but that should be ok. And yes, 
the purpose of `wasm-component-ld` is twofold:

1. First it invokes `wasm-ld` internally, producing the core wasm that's 
expected today.
2. Next it invokes the "componentization process" which activates some Rust 
crates that converts this output core wasm module into a component.

In step (2) it's using component type information smuggled through LLVM/wasm-ld 
through custom sections to create the final output component.

> Do we expect clang users to be building compound components using a single 
> clang command?

If by compound you mean linking multiple components internally, then no. The 
intention is that `wasm32-wasip2` outputs a component but internally it's 
"just" a core wasm module. The next phase of composing components together 
we've got other tooling for, and that's intended to be outside the scope of 
individual language toolchains. (e.g. in theory composition works the same 
regardless of source language)

> Would it make more sense to have clang default to building core modules and 
> have the component creation be a higher level thing built on top clang 
> outputs?

That's actually what we currently have to day with converting `wasm32-wasip1` 
outputs into components. The purpose of `wasm32-wasip2`, however, is that core 
wasms are not natively usable as-is because WASI APIs are defined at the level 
of the component model, not core wasm. There is of course definitions for core 
wasm using the canonical ABI, but that's not the focus of WASI nowdays.

I do plan on having a flag (also answering the question about 
wasm-component-ld-specific-flags) to not emit a component and instead skip the 
componentization step. This step could also be done by using `-fuse-ld=wasm-ld` 
(or the equivalent thereof) to just switch the default linker back to `wasm-ld`.

> Regarding WebAssembly/wasi-sdk and WebAssembly/wasi-libc, is there any reason 
> why simple programs wouldn't be core modules? Won't most C/C++ programs still 
> be build-able as just core modules?

Yep, they'll all still be buildable as core modules (as that's the internals of 
a component anyway, a big thing produced by LLVM). With the p2 target though 
the thinking is that components are the default output, not core wasm modules.

---

Another future feature on the theoretical roadmap for wasm-component-ld is that 
Joel has componentize-py built on "dynamic linking" of a sort which gets 
`dlopen` working enough for Python to open its native extensions. This is all 
built on the Emscripten dynamic linking model and a component packages that all 
up into a single component where the dynamic libraries are statically known at 
build time. This is all wrapped up in `wasm-tools component link` and is 
something I'd like to also automatically bake in to `wasm-component-ld` so 
building that style of component is much easier.

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits

alexcrichton wrote:

cc @sunfishcode and @sbc100 

https://github.com/llvm/llvm-project/pull/84569
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits

https://github.com/alexcrichton created 
https://github.com/llvm/llvm-project/pull/84569

This commit changes the default linker in the WebAssembly toolchain for the 
`wasm32-wasip2` target. This target is being added to the WebAssembly/wasi-sdk 
and WebAssembly/wasi-libc projects to target the Component Model by default, in 
contrast with the preexisting `wasm32-wasi` target (in the process of being 
renamed to `wasm32-wasip1`) which outputs a core WebAssembly module by default.

The `wasm-component-ld` project currently lives in my GitHub account at 
https://github.com/alexcrichton/wasm-component-ld and isn't necessarily 
"official" yet, but it's expected to continue to evolve as the `wasm32-wasip2` 
target continues to shape up and evolve.

>From fb90a737233a9f8928c44c4563c0f0ad33a68142 Mon Sep 17 00:00:00 2001
From: Alex Crichton 
Date: Fri, 8 Mar 2024 13:36:18 -0800
Subject: [PATCH] [WebAssembly] Change the default linker for `wasm32-wasip2`

This commit changes the default linker in the WebAssembly toolchain for
the `wasm32-wasip2` target. This target is being added to the
WebAssembly/wasi-sdk and WebAssembly/wasi-libc projects to target the
Component Model by default, in contrast with the preexisting
`wasm32-wasi` target (in the process of being renamed to
`wasm32-wasip1`) which outputs a core WebAssembly module by default.

The `wasm-component-ld` project currently lives in my GitHub account at
https://github.com/alexcrichton/wasm-component-ld and isn't necessarily
"official" yet, but it's expected to continue to evolve as the
`wasm32-wasip2` target continues to shape up and evolve.
---
 clang/lib/Driver/ToolChains/WebAssembly.cpp | 6 ++
 clang/lib/Driver/ToolChains/WebAssembly.h   | 2 +-
 clang/test/Driver/wasm-toolchain.c  | 8 
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp 
b/clang/lib/Driver/ToolChains/WebAssembly.cpp
index b8c2573d6265fb..a6c43c627f7206 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.cpp
+++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp
@@ -221,6 +221,12 @@ WebAssembly::WebAssembly(const Driver , const 
llvm::Triple ,
   }
 }
 
+const char *WebAssembly::getDefaultLinker() const {
+  if (getOS() == "wasip2")
+return "wasm-component-ld";
+  return "wasm-ld";
+}
+
 bool WebAssembly::IsMathErrnoDefault() const { return false; }
 
 bool WebAssembly::IsObjCNonFragileABIDefault() const { return true; }
diff --git a/clang/lib/Driver/ToolChains/WebAssembly.h 
b/clang/lib/Driver/ToolChains/WebAssembly.h
index ae60f464c10818..76e0ca39bd748d 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.h
+++ b/clang/lib/Driver/ToolChains/WebAssembly.h
@@ -67,7 +67,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssembly final : public 
ToolChain {
llvm::opt::ArgStringList ) const override;
   SanitizerMask getSupportedSanitizers() const override;
 
-  const char *getDefaultLinker() const override { return "wasm-ld"; }
+  const char *getDefaultLinker() const override;
 
   CXXStdlibType GetDefaultCXXStdlibType() const override {
 return ToolChain::CST_Libcxx;
diff --git a/clang/test/Driver/wasm-toolchain.c 
b/clang/test/Driver/wasm-toolchain.c
index f950283ec42aa0..5f18e56f79b657 100644
--- a/clang/test/Driver/wasm-toolchain.c
+++ b/clang/test/Driver/wasm-toolchain.c
@@ -197,3 +197,11 @@
 // RUN: not %clang -### %s --target=wasm32-unknown-unknown 
--sysroot=%s/no-sysroot-there -fPIC -mno-mutable-globals %s 2>&1 \
 // RUN:   | FileCheck -check-prefix=PIC_NO_MUTABLE_GLOBALS %s
 // PIC_NO_MUTABLE_GLOBALS: error: invalid argument '-fPIC' not allowed with 
'-mno-mutable-globals'
+
+// Test that `wasm32-wasip2` invokes a the `wasm-component-ld` linker by 
default
+// instead of `wasm-ld`.
+
+// RUN: %clang -### -O2 --target=wasm32-wasip2 %s --sysroot /foo 2>&1 \
+// RUN:   | FileCheck -check-prefix=LINK_WASIP2 %s
+// LINK_WASIP2: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
+// LINK_WASIP2: wasm-component-ld{{.*}}" "-L/foo/lib/wasm32-wasip2" "crt1.o" 
"[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits