[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.
This commit is contained in:
YAMAMOTO Takashi 2025-05-21 09:29:01 +09:00 committed by GitHub
parent 88c4ef2f9f
commit 80f0ffb937
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;