summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-16 18:27:00 +0800
committerruki <[email protected]>2015-06-16 18:27:00 +0800
commitd549aaedf96e6d6eb77e9d588dc0a0269cd1ae71 (patch)
tree51d971fe326561b62895743a38a1544af6df2dff /xmake/scripts/base/compiler.lua
parent608602d0de1056f856e0b6bfe33b3f5fbe641b63 (diff)
fix the command is too long for nmake
Diffstat (limited to 'xmake/scripts/base/compiler.lua')
-rw-r--r--xmake/scripts/base/compiler.lua16
1 files changed, 4 insertions, 12 deletions
diff --git a/xmake/scripts/base/compiler.lua b/xmake/scripts/base/compiler.lua
index 9a2f9eb43..0b7c5115d 100644
--- a/xmake/scripts/base/compiler.lua
+++ b/xmake/scripts/base/compiler.lua
@@ -416,7 +416,7 @@ function compiler.get(srcfile)
end
-- make the compile command
-function compiler.make(module, target, srcfile, objfile)
+function compiler.make(module, target, srcfile, objfile, logfile)
-- check
assert(module and target)
@@ -439,7 +439,7 @@ function compiler.make(module, target, srcfile, objfile)
compiler._addflags_from_config(module, flags, flagnames)
-- make the compile command
- return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim())
+ return module:command_compile(srcfile, objfile, table.concat(flags, " "):trim(), logfile)
end
-- check include for the project option
@@ -487,12 +487,8 @@ function compiler.check_include(opt, include, srcpath, objpath)
-- add flags from the configure
compiler._addflags_from_config(module, flags, flagnames)
- -- make the compile command
- local cmd = string.format("%s > %s 2>&1", module:command_compile(srcpath, objpath, table.concat(flags, " "):trim()), xmake._NULDEV)
- if not cmd then return end
-
-- execute the compile command
- return module:main(cmd)
+ return module:main(module:command_compile(srcpath, objpath, table.concat(flags, " "):trim(), xmake._NULDEV))
end
-- check function for the project option
@@ -552,12 +548,8 @@ function compiler.check_function(opt, interface, srcpath, objpath)
-- add flags from the configure
compiler._addflags_from_config(module, flags, flagnames)
- -- make the compile command
- local cmd = string.format("%s > %s 2>&1", module:command_compile(srcpath, objpath, table.concat(flags, " "):trim()), xmake._NULDEV)
- if not cmd then return end
-
-- execute the compile command
- return module:main(cmd)
+ return module:main(module:command_compile(srcpath, objpath, table.concat(flags, " "):trim(), xmake._NULDEV))
end
-- return module: compiler