summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-21 09:38:45 +0800
committerruki <[email protected]>2020-06-21 09:38:45 +0800
commit6beb182abf05dcaa3786b65f6a3049067b07b17c (patch)
treed907e24269ee1309fb822cf7f6f56318d77db642
parentcbad38152f8b3f27888fe1c5ff9c95acb25dc71e (diff)
remove some toolchains envs
-rw-r--r--xmake/actions/build/build.lua3
-rw-r--r--xmake/actions/build/build_files.lua3
-rw-r--r--xmake/core/project/project.lua7
-rwxr-xr-xxmake/plugins/project/main.lua7
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x.lua7
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua7
6 files changed, 0 insertions, 34 deletions
diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua
index ae68fd1a3..9dbd93a8f 100644
--- a/xmake/actions/build/build.lua
+++ b/xmake/actions/build/build.lua
@@ -22,7 +22,6 @@
import("core.base.option")
import("core.project.config")
import("core.project.project")
-import("core.platform.environment")
import("private.async.jobpool")
import("private.async.runjobs")
import("core.base.hashset")
@@ -219,14 +218,12 @@ function main(targetname)
-- build all jobs
local batchjobs = get_batchjobs(targetname)
if batchjobs and batchjobs:size() > 0 then
- environment.enter("toolchains")
runjobs("build", batchjobs, {comax = option.get("jobs") or 1, on_exit = function (errors)
import("private.utils.progress")
if errors and progress.showing_without_scroll() then
print("")
end
end})
- environment.leave("toolchains")
end
end
diff --git a/xmake/actions/build/build_files.lua b/xmake/actions/build/build_files.lua
index 76bf64f4c..3bd4804df 100644
--- a/xmake/actions/build/build_files.lua
+++ b/xmake/actions/build/build_files.lua
@@ -23,7 +23,6 @@ import("core.base.option")
import("core.base.hashset")
import("core.project.config")
import("core.project.project")
-import("core.platform.environment")
import("private.async.jobpool")
import("private.async.runjobs")
import("kinds.object")
@@ -206,9 +205,7 @@ function main(targetname, sourcefiles)
-- build all jobs
local batchjobs = _get_batchjobs(targetname, filepatterns)
if batchjobs and batchjobs:size() > 0 then
- environment.enter("toolchains")
runjobs("build_files", batchjobs, {comax = option.get("jobs") or 1})
- environment.leave("toolchains")
end
end
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index be0694235..9ec7bc0bf 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -41,7 +41,6 @@ local requireinfo = require("project/requireinfo")
local deprecated_project = require("project/deprecated/project")
local package = require("package/package")
local platform = require("platform/platform")
-local environment = require("platform/environment")
local toolchain = require("tool/toolchain")
local language = require("language/language")
local sandbox_os = require("sandbox/modules/os")
@@ -446,9 +445,6 @@ function project._load_targets()
end
end
- -- enter toolchains environment
- environment.enter("toolchains")
-
-- do load for each target
local ok = false
for _, t in pairs(targets) do
@@ -458,9 +454,6 @@ function project._load_targets()
end
end
- -- leave toolchains environment
- environment.leave("toolchains")
-
-- do load failed?
if not ok then
return nil, errors
diff --git a/xmake/plugins/project/main.lua b/xmake/plugins/project/main.lua
index 0cb8d0d0e..7090413ed 100755
--- a/xmake/plugins/project/main.lua
+++ b/xmake/plugins/project/main.lua
@@ -22,7 +22,6 @@
import("core.base.option")
import("core.base.task")
import("core.project.config")
-import("core.platform.environment")
import("make.makefile")
import("make.xmakefile")
import("cmake.cmakelists")
@@ -82,15 +81,9 @@ function main()
-- config it first
task.run("config")
- -- enter toolchains environment
- environment.enter("toolchains")
-
-- make project
_make(option.get("kind"))
- -- leave toolchains environment
- environment.leave("toolchains")
-
-- trace
cprint("${color.success}create ok!")
end
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua
index 1168ae3e7..be9b54580 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x.lua
@@ -23,7 +23,6 @@ import("core.base.option")
import("core.project.config")
import("core.project.project")
import("core.platform.platform")
-import("core.platform.environment")
import("core.tool.compiler")
import("core.tool.linker")
import("vs201x_solution")
@@ -247,9 +246,6 @@ function make(outputdir, vsinfo)
-- ensure to enter project directory
os.cd(project.directory())
- -- enter environment (maybe check flags by calling tools)
- environment.enter("toolchains")
-
-- save targets
for targetname, target in pairs(project.targets()) do
if not target:isphony() then
@@ -277,9 +273,6 @@ function make(outputdir, vsinfo)
_make_targetheaders(mode, arch, target, mode_idx == #vsinfo.modes and arch_idx == 2)
end
end
-
- -- leave environment
- environment.leave("toolchains")
end
end
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index cbfbf13d9..5beb69e62 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -26,7 +26,6 @@ import("core.project.config")
import("core.project.cache")
import("core.project.project")
import("core.platform.platform")
-import("core.platform.environment")
import("core.tool.compiler")
import("core.tool.linker")
import("lib.detect.find_tool")
@@ -300,9 +299,6 @@ function main(outputdir, vsinfo)
-- ensure to enter project directory
os.cd(project.directory())
- -- enter environment (maybe check flags by calling tools)
- environment.enter("toolchains")
-
-- save targets
for targetname, target in pairs(project.targets()) do
if not target:isphony() then
@@ -333,9 +329,6 @@ function main(outputdir, vsinfo)
_target.deps = table.unique(table.join(_target.deps or {}, table.keys(target:deps()), nil))
end
end
-
- -- leave environment
- environment.leave("toolchains")
end
end