diff options
| -rw-r--r-- | xmake/core/sandbox/modules/import/core/tool/toolchain.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua index 83071811d..8f4202f2b 100644 --- a/xmake/core/sandbox/modules/import/core/tool/toolchain.lua +++ b/xmake/core/sandbox/modules/import/core/tool/toolchain.lua @@ -30,8 +30,10 @@ local raise = require("sandbox/modules/raise") -- get all toolchains list function sandbox_core_tool_toolchain.list() local names = table.copy(platform.toolchains()) - for name, _ in pairs(project.toolchains()) do - table.insert(names, name) + if os.isfile(os.projectfile()) then + for name, _ in pairs(project.toolchains()) do + table.insert(names, name) + end end return names end |
