summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-07-12 18:50:04 +0800
committerruki <[email protected]>2016-07-12 18:50:04 +0800
commitd572c3be1e4d98e2e0e514e058038253ace8b5e3 (patch)
treee5b75c2583db63aa0739c950a4efc548455ebc36
parent2a95f6e1394c42f166ac4184ab2cf4d77b4ffa7a (diff)
fix check flags bug
-rw-r--r--xmake/core/project/project.lua1
-rwxr-xr-xxmake/tools/cl.lua4
-rwxr-xr-xxmake/tools/gcc.lua4
-rwxr-xr-xxmake/tools/lib.lua6
-rwxr-xr-xxmake/tools/link.lua6
-rwxr-xr-xxmake/tools/ml.lua4
6 files changed, 13 insertions, 12 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 9f9b80547..7fe1c1c1d 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -293,6 +293,7 @@ function project._interpreter()
, "mxflags"
, "mxxflags"
, "ldflags"
+ , "arflags"
, "shflags"
, "options"
, "defines"
diff --git a/xmake/tools/cl.lua b/xmake/tools/cl.lua
index 0ec391e36..96c5cc18a 100755
--- a/xmake/tools/cl.lua
+++ b/xmake/tools/cl.lua
@@ -179,8 +179,8 @@ end
function check(flags)
-- make an stub source file
- local objectfile = path.join(os.tmpdir(), "xmake.cl.obj")
- local sourcefile = path.join(os.tmpdir(), "xmake.cl.c")
+ local objectfile = os.tmpfile() .. ".obj"
+ local sourcefile = os.tmpfile() .. ".c"
io.write(sourcefile, "int main(int argc, char** argv)\n{return 0;}")
-- check it
diff --git a/xmake/tools/gcc.lua b/xmake/tools/gcc.lua
index 02eb1abe5..201ba5517 100755
--- a/xmake/tools/gcc.lua
+++ b/xmake/tools/gcc.lua
@@ -183,8 +183,8 @@ end
function check(flags)
-- make an stub source file
- local objectfile = path.join(os.tmpdir(), "xmake.gcc.o")
- local sourcefile = path.join(os.tmpdir(), "xmake.gcc.c" .. ifelse(_g.kind == "cxx", "pp", ""))
+ local objectfile = os.tmpfile() .. ".o"
+ 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;}")
diff --git a/xmake/tools/lib.lua b/xmake/tools/lib.lua
index cde70ae69..3a5b4ec53 100755
--- a/xmake/tools/lib.lua
+++ b/xmake/tools/lib.lua
@@ -76,9 +76,9 @@ end
function check(flags)
-- make an stub source file
- local libfile = path.join(os.tmpdir(), "xmake.lib.lib")
- local objfile = path.join(os.tmpdir(), "xmake.lib.obj")
- local srcfile = path.join(os.tmpdir(), "xmake.lib.c")
+ local libfile = os.tmpfile() .. ".lib"
+ local objfile = os.tmpfile() .. ".obj"
+ local srcfile = os.tmpfile() .. ".c"
io.write(srcfile, "int test(void)\n{return 0;}")
-- check it
diff --git a/xmake/tools/link.lua b/xmake/tools/link.lua
index 27ea8363d..316091b81 100755
--- a/xmake/tools/link.lua
+++ b/xmake/tools/link.lua
@@ -124,9 +124,9 @@ end
function check(flags)
-- make an stub source file
- local binaryfile = path.join(os.tmpdir(), "xmake.cl.exe")
- local objectfile = path.join(os.tmpdir(), "xmake.cl.obj")
- local sourcefile = path.join(os.tmpdir(), "xmake.cl.c")
+ local binaryfile = os.tmpfile() .. ".exe"
+ local objectfile = os.tmpfile() .. ".obj"
+ local sourcefile = os.tmpfile() .. ".c"
-- main entry
if flags and flags:lower():find("subsystem:windows") then
diff --git a/xmake/tools/ml.lua b/xmake/tools/ml.lua
index 26233c8ae..ef1514fc0 100755
--- a/xmake/tools/ml.lua
+++ b/xmake/tools/ml.lua
@@ -120,8 +120,8 @@ end
function check(flags)
-- make an stub source file
- local objectfile = path.join(os.tmpdir(), "xmake.ml.obj")
- local sourcefile = path.join(os.tmpdir(), "xmake.ml.asm")
+ local objectfile = os.tmpfile() .. ".obj"
+ local sourcefile = os.tmpfile() .. ".asm"
io.write(sourcefile, "end")
-- check it