summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-07 22:40:30 +0800
committerruki <[email protected]>2025-11-07 15:01:57 +0800
commitca2cc6d298729b2b060fd08af37a64d5958890f8 (patch)
tree9d86ef14516736a336aaa48675bfc970558c458d /xmake/modules
parentcf31cdc6eacf6a793989df538ecc7a00d48c6457 (diff)
remove builtin async os.rm
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/cl.lua4
-rw-r--r--xmake/modules/core/tools/gcc.lua4
-rw-r--r--xmake/modules/lib/detect/check_cxsnippets.lua4
-rw-r--r--xmake/modules/private/cache/build_cache.lua2
-rw-r--r--xmake/modules/private/tools/vstool.lua8
5 files changed, 11 insertions, 11 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index bec329c77..fa88ab5a4 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -714,7 +714,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- remove preprocess file
local cppfile = _get_cppfile(sourcefile, objectfile)
- os.tryrm(cppfile, {async = true, detach = true})
+ os.tryrm(cppfile)
-- use cl/stdout as errors first from vstool.iorunv()
if type(errors) == "table" then
@@ -777,7 +777,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
if depfile and os.isfile(depfile) then
dependinfo.depfiles_format = "cl_json"
dependinfo.depfiles = io.readfile(depfile)
- os.tryrm(depfile, {async = true, detach = true})
+ os.tryrm(depfile)
elseif outdata then
dependinfo.depfiles_format = "cl"
dependinfo.depfiles = outdata
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 18e549124..6d5f59fac 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -1018,7 +1018,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- remove preprocess file
local cppfile = _get_cppfile(sourcefile, objectfile)
- os.tryrm(cppfile, {async = true, detach = true})
+ os.tryrm(cppfile)
-- parse and strip errors
local lines = errors and tostring(errors):split('\n', {plain = true}) or {}
@@ -1070,7 +1070,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
end
-- remove the temporary dependent file
- os.tryrm(depfile, {async = true, detach = true})
+ os.tryrm(depfile)
end
end
}
diff --git a/xmake/modules/lib/detect/check_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua
index ab767faba..ad0310082 100644
--- a/xmake/modules/lib/detect/check_cxsnippets.lua
+++ b/xmake/modules/lib/detect/check_cxsnippets.lua
@@ -273,8 +273,8 @@ function main(snippets, opt)
}
-- remove some files
- os.tryrm(objectfile, {async = true, detach = true})
- os.tryrm(binaryfile, {async = true, detach = true})
+ os.tryrm(objectfile)
+ os.tryrm(binaryfile)
-- trace
if opt.verbose or option.get("verbose") or option.get("diagnosis") then
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua
index 573d94550..2e7e6be89 100644
--- a/xmake/modules/private/cache/build_cache.lua
+++ b/xmake/modules/private/cache/build_cache.lua
@@ -339,7 +339,7 @@ function build(program, argv, opt)
_g.cache_miss_total_time = (_g.cache_miss_total_time or 0) + (os.mclock() - cache_miss_start_time)
end
end
- os.tryrm(cppinfo.cppfile, {async = true, detach = true})
+ os.tryrm(cppinfo.cppfile)
else
_g.preprocess_error_count = (_g.preprocess_error_count or 0) + 1
end
diff --git a/xmake/modules/private/tools/vstool.lua b/xmake/modules/private/tools/vstool.lua
index f0e2c575b..c4b22883d 100644
--- a/xmake/modules/private/tools/vstool.lua
+++ b/xmake/modules/private/tools/vstool.lua
@@ -77,8 +77,8 @@ function runv(program, argv, opt)
end
-- remove the files
- os.tryrm(outpath, {async = true, detach = true})
- os.tryrm(errpath, {async = true, detach = true})
+ os.tryrm(outpath)
+ os.tryrm(errpath)
-- raise errors
os.raise({errors = errors, stderr = errdata, stdout = outdata})
@@ -122,8 +122,8 @@ function iorunv(program, argv, opt)
local errdata = os.isfile(errpath) and io.readfile(errpath) or nil
-- remove the temporary output and error file
- os.tryrm(outpath, {async = true, detach = true})
- os.tryrm(errpath, {async = true, detach = true})
+ os.tryrm(outpath)
+ os.tryrm(errpath)
-- failed?
if ok ~= 0 then