summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
-rw-r--r--xmake/scripts/base/compiler.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua
index f078c598f..23796d403 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/scripts/base/compiler.lua
@@ -24,6 +24,7 @@
local compiler = compiler or {}
-- load modules
+local io = require("base/io")
local path = require("base/path")
local rule = require("base/rule")
local utils = require("base/utils")
@@ -328,7 +329,7 @@ function compiler.check_include(opt, include, srcpath, objpath)
assert(opt and srcpath and objpath)
-- open the checking source file
- local srcfile = io.open(srcpath, "w")
+ local srcfile = io.openmk(srcpath)
if not srcfile then return end
-- make include
@@ -402,7 +403,7 @@ function compiler.check_function(opt, interface, srcpath, objpath)
assert(opt and interface)
-- open the checking source file
- local srcfile = io.open(srcpath, "w")
+ local srcfile = io.openmk(srcpath)
if not srcfile then return end
-- get the compiler