summaryrefslogtreecommitdiff
path: root/xmake/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/tools/gcc.lua')
-rw-r--r--xmake/tools/gcc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/tools/gcc.lua b/xmake/tools/gcc.lua
index a3f40b4b0..d4dc2d930 100644
--- a/xmake/tools/gcc.lua
+++ b/xmake/tools/gcc.lua
@@ -340,7 +340,7 @@ function _compile1(sourcefile, objectfile, incdepfile, flags)
-- translate it
local results = {}
- local incdeps = io.read(tmpfile)
+ local incdeps = io.readfile(tmpfile)
for includefile in string.gmatch(incdeps, "%s+([%w/%.%-%+_%$%.]+)") do
-- save it if belong to the project
@@ -385,7 +385,7 @@ function check(flags)
local sourcefile = os.tmpfile() .. ".c" .. ifelse(_g.kind == "cxx", "pp", "")
-- make stub code
- io.write(sourcefile, "int main(int argc, char** argv)\n{return 0;}")
+ io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}")
-- check it
os.run("%s -c %s -o %s %s", _g.shellname, ifelse(flags, flags, ""), objectfile, sourcefile)