diff --git a/docs/wiki/CICD-Pipeline.md b/docs/wiki/CICD-Pipeline.md index 8ef5de87..082b0fd5 100644 --- a/docs/wiki/CICD-Pipeline.md +++ b/docs/wiki/CICD-Pipeline.md @@ -246,6 +246,20 @@ docker volume rm $(docker volume ls -q | grep '0_') docker restart woodpecker_agent ``` +### Windows DLL Export Ordinal Too Large +`/usr/bin/x86_64-w64-mingw32-ld: error: export ordinal too large: 106290` + +MinGW's `ld` auto-exports ALL public Rust symbols into the DLL export table. With a +large dependency tree (~106k symbols), this exceeds the 65,535 PE ordinal limit. + +Fix: `src-tauri/.cargo/config.toml` tells `ld` to suppress auto-export: +```toml +[target.x86_64-pc-windows-gnu] +rustflags = ["-C", "link-arg=-Wl,--exclude-all-symbols"] +``` +The desktop `main.exe` links against `rlib` (static), so the cdylib export table is +unused at runtime. An empty export table is valid for a DLL. + ### Gogs OAuth2 Limitation Gogs 0.14 has no OAuth2 provider support, blocking upgrade to Woodpecker 2.x. diff --git a/src-tauri/.cargo/config.toml b/src-tauri/.cargo/config.toml new file mode 100644 index 00000000..ec6d3760 --- /dev/null +++ b/src-tauri/.cargo/config.toml @@ -0,0 +1,6 @@ +[target.x86_64-pc-windows-gnu] +# Prevent MinGW ld from auto-exporting all ~106k public symbols into the DLL +# export table, which would exceed the 65535 ordinal limit and cause a link +# error. The desktop binary links against rlib (static), so cdylib exports +# are unused at runtime. +rustflags = ["-C", "link-arg=-Wl,--exclude-all-symbols"]