Skip to content

Commit 36f50ef

Browse files
committed
🐞 fix(tools/scripts/toolchains): fix static link
1 parent c92ebb2 commit 36f50ef

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

β€Žtools/scripts/toolchains/aarch64-smart-musleabi.luaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ do
3838

3939
local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
4040
if link_type == "static" then
41-
toolchain:add("ldflags", "-static", {force = true})
41+
toolchain:add("ldflags", "--static", {force = true})
4242
local ldscript = rtflags.get_ldscripts(false)
4343
toolchain:add("ldflags", ldscript.ldflags, {force = true})
4444
else

β€Žtools/scripts/toolchains/arm-smart-musleabi.luaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ do
3737

3838
local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
3939
if link_type == "static" then
40-
toolchain:add("ldflags", "-static", {force = true})
40+
toolchain:add("ldflags", "--static", {force = true})
4141
local ldscript = rtflags.get_ldscripts(false)
4242
toolchain:add("ldflags", ldscript.ldflags, {force = true})
4343
else

β€Žtools/scripts/toolchains/riscv64gc-unknown-smart-musl.luaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ do
3737

3838
local link_type = os.getenv("RT_XMAKE_LINK_TYPE") or "shared"
3939
if link_type == "static" then
40-
toolchain:add("ldflags", "-static", {force = true})
40+
toolchain:add("ldflags", "--static", {force = true})
4141
local ldscript = rtflags.get_ldscripts(false)
4242
toolchain:add("ldflags", ldscript.ldflags, {force = true})
4343
else

β€Žtools/scripts/toolchains/x86_64-linux-musl.luaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ do
2626
set_description("x86_64 cross compiler for linux.")
2727
on_load(function(toolchain)
2828
toolchain:load_cross_toolchain()
29-
toolchain:add("ldflags", "-static", {force = true})
29+
toolchain:add("ldflags", "--static", {force = true})
3030
end)
3131
end
3232
toolchain_end()

0 commit comments

Comments
Β (0)