summaryrefslogtreecommitdiff
path: root/xmake/scripts/platform
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/platform')
-rw-r--r--xmake/scripts/platform/platform.lua22
1 files changed, 21 insertions, 1 deletions
diff --git a/xmake/scripts/platform/platform.lua b/xmake/scripts/platform/platform.lua
index e6c369236..7ae8af969 100644
--- a/xmake/scripts/platform/platform.lua
+++ b/xmake/scripts/platform/platform.lua
@@ -44,7 +44,27 @@ function platform.init()
return p.init(configs)
end
--- dump configs
+-- get the given configure
+function platform.get(name)
+
+ -- check
+ assert(platform._CONFIGS)
+
+ -- get it
+ return platform._CONFIGS[name]
+end
+
+-- get the format from the given kind
+function platform.format(kind)
+
+ -- get format
+ local format = platform.get("format")
+
+ -- get it
+ return format[kind] or {"", ""}
+end
+
+-- dump the platform configure
function platform.dump()
-- check