[lld] [lld][WebAssembly] Set the target-cpu in LTO config (PR #140010)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 23:35:42 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld
Author: YAMAMOTO Takashi (yamt)
<details>
<summary>Changes</summary>
I couldn't find an existing way to pass -mcpu=lime1 equivalent to LTO codegen. This commit would privide one.
---
Full diff: https://github.com/llvm/llvm-project/pull/140010.diff
1 Files Affected:
- (modified) lld/wasm/LTO.cpp (+1)
``````````diff
diff --git a/lld/wasm/LTO.cpp b/lld/wasm/LTO.cpp
index a877f067603e5..581104745b8ba 100644
--- a/lld/wasm/LTO.cpp
+++ b/lld/wasm/LTO.cpp
@@ -59,6 +59,7 @@ static lto::Config createConfig() {
c.DisableVerify = ctx.arg.disableVerify;
c.DiagHandler = diagnosticHandler;
c.OptLevel = ctx.arg.ltoo;
+ c.CPU = getCPUStr();
c.MAttrs = getMAttrs();
c.CGOptLevel = ctx.arg.ltoCgo;
c.DebugPassManager = ctx.arg.ltoDebugPassManager;
``````````
</details>
https://github.com/llvm/llvm-project/pull/140010
More information about the llvm-commits
mailing list