diff options
| author | ruki <[email protected]> | 2020-09-16 22:53:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-16 22:53:06 +0800 |
| commit | ef86cee77a2cb6cdb3449b48ce33cb8123933a8c (patch) | |
| tree | 18b4d7f9796d0a37bec49fbabb8dfdd8905bd9ce /xmake/toolchains/emcc/xmake.lua | |
| parent | 409275d22cf9137845021203c812a1c890a3ddd8 (diff) | |
fix emcc for windows
Diffstat (limited to 'xmake/toolchains/emcc/xmake.lua')
| -rw-r--r-- | xmake/toolchains/emcc/xmake.lua | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/xmake/toolchains/emcc/xmake.lua b/xmake/toolchains/emcc/xmake.lua index 0d0901865..a74303b61 100644 --- a/xmake/toolchains/emcc/xmake.lua +++ b/xmake/toolchains/emcc/xmake.lua @@ -27,15 +27,18 @@ toolchain("emcc") -- mark as standalone toolchain set_kind("standalone") + + -- add suffix for windows + local suffix = is_host("windows") and ".bat" or "" -- set toolset - set_toolset("cc", "emcc") - set_toolset("cxx", "emcc", "em++") - set_toolset("ld", "em++", "emcc") - set_toolset("sh", "em++", "emcc") - set_toolset("ar", "emar") - set_toolset("ex", "emar") - set_toolset("as", "emcc") + set_toolset("cc", "emcc" .. suffix) + set_toolset("cxx", "emcc" .. suffix, "em++" .. suffix) + set_toolset("ld", "em++" .. suffix, "emcc" .. suffix) + set_toolset("sh", "em++" .. suffix, "emcc" .. suffix) + set_toolset("ar", "emar" .. suffix) + set_toolset("ex", "emar" .. suffix) + set_toolset("as", "emcc" .. suffix) -- check toolchain on_check(function (toolchain) @@ -49,3 +52,4 @@ toolchain("emcc") toolchain:add("ldflags", "") toolchain:add("shflags", "") end) + |
