diff options
| author | ruki <[email protected]> | 2025-12-24 23:33:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-24 23:33:07 +0800 |
| commit | d2f19c477cb65b01f0d9e6b83b30176d18bd8027 (patch) | |
| tree | f9a5ef1c11860fb5bc784488eef069f1940917e7 /xmake/platforms/linux | |
| parent | 47f9f2604141a5995c88d28d00938020a547b6dc (diff) | |
fix cross toolchain on linux
Diffstat (limited to 'xmake/platforms/linux')
| -rw-r--r-- | xmake/platforms/linux/xmake.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua index ebaedf975..8b0232241 100644 --- a/xmake/platforms/linux/xmake.lua +++ b/xmake/platforms/linux/xmake.lua @@ -29,7 +29,14 @@ platform("linux") set_formats("symbol", "$(name).sym") set_installdir("/usr/local") - set_toolchains("envs", "cross", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "go", "rust", "swift", "gfortran", "zig", "fpc", "nim") + + -- The cross toolchain should be placed after the host toolchain. + -- otherwise, if the host toolchain is explicitly loaded in the target, + -- the cross toolchain will be selected incorrectly in toolchain.lua. + -- + -- TODO Perhaps we should handle it better, or remove the cross toolchain. + set_toolchains("envs", "gcc", "clang", + "cross", "yasm", "nasm", "fasm", "cuda", "go", "rust", "swift", "gfortran", "zig", "fpc", "nim") set_menu { config = |
