summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/platforms/sdcc/load.lua8
-rw-r--r--xmake/platforms/sdcc/xmake.lua4
2 files changed, 10 insertions, 2 deletions
diff --git a/xmake/platforms/sdcc/load.lua b/xmake/platforms/sdcc/load.lua
index 896d73a7f..e15d4daa0 100644
--- a/xmake/platforms/sdcc/load.lua
+++ b/xmake/platforms/sdcc/load.lua
@@ -36,5 +36,13 @@ function main(platform)
platform:add("linkdirs", linkdir)
end
end
+
+ -- add port flags for arch
+ local arch = config.get("arch")
+ if arch then
+ platform:add("cxflags", "-m" .. arch)
+ platform:add("ldflags", "-m" .. arch)
+ platform:add("shflags", "-m" .. arch)
+ end
end
diff --git a/xmake/platforms/sdcc/xmake.lua b/xmake/platforms/sdcc/xmake.lua
index c43e241ed..82dc92e6a 100644
--- a/xmake/platforms/sdcc/xmake.lua
+++ b/xmake/platforms/sdcc/xmake.lua
@@ -25,10 +25,10 @@ platform("sdcc")
set_hosts("macosx", "linux", "windows")
-- set archs
- set_archs("stm8")
+ set_archs("stm8", "mcs51")
-- set formats
- set_formats {static = "$(name).lib", object = "$(name).rel", binary = "$(name)", symbol = "$(name).sym"}
+ set_formats {static = "$(name).lib", object = "$(name).rel", binary = "$(name).bin", symbol = "$(name).sym"}
-- on check project configuration
on_config_check("config")