From e89d5ff3a89e5274737a16303e2682165f8848dd Mon Sep 17 00:00:00 2001 From: Jesus Fileto Date: Thu, 5 Nov 2026 22:07:33 +0000 Subject: [PATCH] worker-build: leave the Emscripten glue unminified emcc minifies its glue onto one line, so wrangler's source map points every glue frame at that line under emcc's short names. With --minify=0 they get real lines and names. --- worker-build/src/emscripten.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worker-build/src/emscripten.rs b/worker-build/src/emscripten.rs index e4c6a4342..56825d0fe 100644 --- a/worker-build/src/emscripten.rs +++ b/worker-build/src/emscripten.rs @@ -64,6 +64,9 @@ pub const LINK_ARGS: &[&str] = &[ // emcc strips the producers section by default; keep the language and // processed-by entries the toolchain records in it. "-sEMIT_PRODUCERS_SECTION=1", + // Leave the glue unminified, so the source map of the bundled Worker + // points at its real lines instead of one minified line. + "--minify=0", ]; pub const EMCC_CFLAGS: &[&str] = &["-fwasm-exceptions", "-sWASM_LEGACY_EXCEPTIONS=0"];