diff options
| author | ruki <[email protected]> | 2016-07-12 18:50:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-12 18:50:04 +0800 |
| commit | d572c3be1e4d98e2e0e514e058038253ace8b5e3 (patch) | |
| tree | e5b75c2583db63aa0739c950a4efc548455ebc36 | |
| parent | 2a95f6e1394c42f166ac4184ab2cf4d77b4ffa7a (diff) | |
fix check flags bug
| -rw-r--r-- | xmake/core/project/project.lua | 1 | ||||
| -rwxr-xr-x | xmake/tools/cl.lua | 4 | ||||
| -rwxr-xr-x | xmake/tools/gcc.lua | 4 | ||||
| -rwxr-xr-x | xmake/tools/lib.lua | 6 | ||||
| -rwxr-xr-x | xmake/tools/link.lua | 6 | ||||
| -rwxr-xr-x | xmake/tools/ml.lua | 4 |
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 |
