diff options
| author | ruki <[email protected]> | 2024-08-21 22:50:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-08-21 22:50:31 +0800 |
| commit | 0f19ea21f9c9d3f94ace3f8a836deeb63affdad7 (patch) | |
| tree | bd82b9226466ca67a54e516a22aafa149d1a8831 /core/xmake.lua | |
| parent | d3effb1bc2076932bbcc319a696be3f40b95d4b7 (diff) | |
add cosmocc option
Diffstat (limited to 'core/xmake.lua')
| -rw-r--r-- | core/xmake.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/xmake.lua b/core/xmake.lua index 675d4676f..df84e81bb 100644 --- a/core/xmake.lua +++ b/core/xmake.lua @@ -48,6 +48,16 @@ if is_mode("coverage") then add_ldflags("-coverage", "-fprofile-arcs", "-ftest-coverage") end +-- set cosmocc toolchain, e.g. xmake f -p linux --cosmocc=y +if has_config("cosmocc") then + add_requires("cosmocc") + set_toolchains("@cosmocc") + set_policy("build.ccache", false) +end + +-- the cosmocc option +option("cosmocc", {default = false, category = "option", description = "Use cosmocc toolchain to build once and run anywhere."}) + -- the runtime option option("runtime") set_default("lua") |
