summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-19 09:37:00 +0800
committerGitHub <[email protected]>2021-05-19 09:37:00 +0800
commit16a421fdcae87814b8ca5fbb53c63ddfcd688380 (patch)
tree7ebed040cd7a4fc5f9b250731b8ffc4ba4a3f058 /xmake/modules
parent376b206b27edafec967e965ffd72f220f604e609 (diff)
parentfb789657a2b0512eac5a09531288f2d5130c5a48 (diff)
Merge pull request #1416 from xmake-io/archlinux
add archlinux ci
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/tools/autoconf.lua6
-rw-r--r--xmake/modules/private/async/runjobs.lua13
2 files changed, 18 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 768ee20db..4536580ae 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -139,6 +139,7 @@ function buildenvs(package, opt)
local asflags = table.copy(table.wrap(package:build_getenv("asflags")))
local ldflags = table.copy(table.wrap(package:build_getenv("ldflags")))
local shflags = table.copy(table.wrap(package:build_getenv("shflags")))
+ local arflags = table.copy(table.wrap(package:build_getenv("arflags")))
local defines = package:build_getenv("defines")
local includedirs = package:build_getenv("includedirs")
local sysincludedirs = package:build_getenv("sysincludedirs")
@@ -177,7 +178,7 @@ function buildenvs(package, opt)
envs.CFLAGS = table.concat(cflags, ' ')
envs.CXXFLAGS = table.concat(cxxflags, ' ')
envs.ASFLAGS = table.concat(asflags, ' ')
- envs.ARFLAGS = table.concat(table.wrap(package:build_getenv("arflags")), ' ')
+ envs.ARFLAGS = table.concat(arflags, ' ')
envs.LDFLAGS = table.concat(ldflags, ' ')
envs.SHFLAGS = table.concat(shflags, ' ')
if package:is_plat("mingw") then
@@ -204,6 +205,9 @@ function buildenvs(package, opt)
elseif package:is_plat("cross") then
-- only for cross-toolchain
envs.CXX = package:build_getenv("cxx")
+ if not envs.ARFLAGS or envs.ARFLAGS == "" then
+ envs.ARFLAGS = "-cr"
+ end
end
end
local ACLOCAL_PATH = {}
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua
index 487d11798..ed007291c 100644
--- a/xmake/modules/private/async/runjobs.lua
+++ b/xmake/modules/private/async/runjobs.lua
@@ -73,6 +73,14 @@ function main(name, jobs, opt)
progress_helper = progress.new(nil, opt)
end
+ -- isolate environments
+ local is_isolated = false
+ local co_running = scheduler.co_running()
+ if co_running and opt.isolate then
+ is_isolated = co_running:is_isolated()
+ co_running:isolate(true)
+ end
+
-- run timer
local stop = false
local running_jobs_indices = {}
@@ -235,6 +243,11 @@ function main(name, jobs, opt)
-- wait all jobs exited
scheduler.co_group_wait(group_name)
+ -- restore isolated environments
+ if co_running and opt.isolate then
+ co_running:isolate(is_isolated)
+ end
+
-- stop timer
stop = true