diff options
| author | ruki <[email protected]> | 2017-07-12 14:02:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-12 14:02:51 +0800 |
| commit | 693619f971581f9b7bc66fcdb1ef65d01aa002e5 (patch) | |
| tree | eced75dee7ccc9f998e1c69d14d7fbd0aaa117ec /xmake/core/project/project.lua | |
| parent | b470ddf3d3723a700a97f73f8599696d21198bfb (diff) | |
fix swiftc and on_load environment
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index f16d61c5d..5195df00b 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -41,6 +41,7 @@ local option = require("project/option") local package = require("project/package") local deprecated_project = require("project/deprecated/project") local platform = require("platform/platform") +local environment = require("platform/environment") local language = require("language/language") local sandbox_os = require("sandbox/modules/os") @@ -434,19 +435,25 @@ function project.load() -- save targets project._TARGETS = targets + -- enter toolchains environment + environment.enter("toolchains") + -- on load for each target for _, target in pairs(targets) do local on_load = target:script("load") if on_load then ok, errors = sandbox.load(on_load, target) if not ok then - return false, errors + break end end end - -- ok - return true + -- leave toolchains environment + environment.leave("toolchains") + + -- ok? + return ok, errors end -- get the given target |
