Skip to content

Commit 80f0ffb

Browse files
authored
[lld][WebAssembly] Set the target-cpu in LTO config (#140010)
I couldn't find an existing way to pass -mcpu=lime1 equivalent to LTO codegen. This commit would privide one. With this commit, you can do so by passing `-mllvm -mcpu=lime1` to wasm-ld.
1 parent 88c4ef2 commit 80f0ffb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lld/wasm/LTO.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static lto::Config createConfig() {
5959
c.DisableVerify = ctx.arg.disableVerify;
6060
c.DiagHandler = diagnosticHandler;
6161
c.OptLevel = ctx.arg.ltoo;
62+
c.CPU = getCPUStr();
6263
c.MAttrs = getMAttrs();
6364
c.CGOptLevel = ctx.arg.ltoCgo;
6465
c.DebugPassManager = ctx.arg.ltoDebugPassManager;

0 commit comments

Comments
 (0)