diff options
| author | ruki <[email protected]> | 2020-05-21 23:11:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-21 13:11:06 +0800 |
| commit | 36e30f47020e0c4399eb5f7b7a8739d55489f499 (patch) | |
| tree | 2835479e2089ec80189e43d472668724dcd7be10 /xmake/platforms/linux/xmake.lua | |
| parent | f248bb4ffe4a980eebd31a9ae12ddf8a03237d29 (diff) | |
improve to check arch for platform
Diffstat (limited to 'xmake/platforms/linux/xmake.lua')
| -rw-r--r-- | xmake/platforms/linux/xmake.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua index 62cc1e3e8..a1097565b 100644 --- a/xmake/platforms/linux/xmake.lua +++ b/xmake/platforms/linux/xmake.lua @@ -39,8 +39,15 @@ platform("linux") -- set install directory set_installdir("/usr/local") - -- on check - on_check("check") + -- on check + on_check(function (platform) + import("core.project.config") + local arch = config.get("arch") + if not arch then + config.set("arch", os.arch()) + cprint("checking for the architecture ... ${color.success}%s", config.get("arch")) + end + end) -- set toolchains set_toolchains("envs", "cross", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "dlang", "go", "rust") |
