File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,13 @@ export async function buildUi(target?: string, debug = false) {
9797 Object . assign ( env , getSysrootEnv ( target ) ) ;
9898 }
9999
100- // On musl (Alpine), GTK must be dynamically linked even with static musl libc
100+ // On musl (Alpine), we need to disable static-pie to allow dynamic GTK linking.
101+ // The binary will still be mostly static but can link GTK dynamically.
101102 if ( platform === "desktop" && await isMusl ( ) ) {
102- env . PKG_CONFIG_ALL_DYNAMIC = "1" ;
103+ const existingFlags = env . RUSTFLAGS || "" ;
104+ // Remove -static-pie and force -Bdynamic before system libs
105+ env . RUSTFLAGS =
106+ `${ existingFlags } -C link-arg=-Wl,-Bdynamic -C relocation-model=pic` . trim ( ) ;
103107 }
104108
105109 await exec ( buildArgs , env ) ;
You can’t perform that action at this time.
0 commit comments