[lld] [lld][WebAssembly] Set the target-cpu in LTO config (PR #140010)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu May 15 09:03:17 PDT 2025


================
@@ -59,6 +59,7 @@ static lto::Config createConfig() {
   c.DisableVerify = ctx.arg.disableVerify;
   c.DiagHandler = diagnosticHandler;
   c.OptLevel = ctx.arg.ltoo;
+  c.CPU = getCPUStr();
----------------
sbc100 wrote:

Yup this looks like this is already present in the ELF version of `createConfig` .. I wonder why we didn't have it here before.

Can we write a test for this?

https://github.com/llvm/llvm-project/pull/140010


More information about the llvm-commits mailing list