Skip to content

Commit a71a7b7

Browse files
committed
🐞 fix(tools/scripts/rules/rt.cpp.lua): if target_os is not rt-smart, then return
1 parent dca83ce commit a71a7b7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tools/scripts/rules/rt.cpp.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@
2323
rule("rt.cpp")
2424
do
2525
on_config(function(target)
26+
import("core.project.config")
2627
import("rt.private.build.rtflags")
27-
local flags = rtflags.get_sdk()
2828

29+
local flags = rtflags.get_sdk()
2930
local cxx, _ = target:tool("cxx")
3031
target:set("toolset", "ld", cxx)
32+
33+
if config.get("target_os") ~= "rt-smart" then
34+
return
35+
end
36+
3137
target:add("ldflags", flags.ldflags_lib, {force = true})
3238
target:add("ldflags", "-lcxx", {force = true})
3339
end)

0 commit comments

Comments
 (0)