From d66af6ebf209e891ad7c893b54291e193d63da3f Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 15 May 2025 15:32:06 +0900 Subject: [PATCH] [lld][WebAssembly] Set the target-cpu in LTO config I couldn't find an existing way to pass -mcpu=lime1 equivalent to LTO codegen. This commit would privide one. --- lld/wasm/LTO.cpp | 1 + 1 file changed, 1 insertion(+) 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;