summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-12-04 11:49:37 +0800
committerruki <[email protected]>2015-12-04 11:49:37 +0800
commit6ece8be70e5141a69720f28e4f18b20664142ae3 (patch)
tree9ae6301f68ecec013c6023a2b6d74bd702685f7a /xmake/scripts/tools/gcc.lua
parent7624723775b58c1811287465e6d7c27cede81b31 (diff)
support add_files *.a using ar
Diffstat (limited to 'xmake/scripts/tools/gcc.lua')
-rw-r--r--xmake/scripts/tools/gcc.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/scripts/tools/gcc.lua b/xmake/scripts/tools/gcc.lua
index ee492e134..f1b2f4d55 100644
--- a/xmake/scripts/tools/gcc.lua
+++ b/xmake/scripts/tools/gcc.lua
@@ -41,7 +41,7 @@ function gcc._check(self, flag)
-- check it
local result = flag
- if 0 ~= os.execute(string.format("%s %s -S -o %s -xc %s > %s 2>&1", self._NAME, flag, xmake._NULDEV, xmake._NULDEV, xmake._NULDEV)) then
+ if 0 ~= os.execute(string.format("%s %s -S -o %s -xc %s > %s 2>&1", self.name, flag, xmake._NULDEV, xmake._NULDEV, xmake._NULDEV)) then
result = ""
end
@@ -59,7 +59,7 @@ end
function gcc.init(self, name)
-- save name
- self._NAME = name or "gcc"
+ self.name = name or "gcc"
-- init mxflags
self.mxflags = { "-fmessage-length=0"
@@ -125,7 +125,7 @@ function gcc.command_compile(self, srcfile, objfile, flags, logfile)
if logfile then redirect = string.format(" > %s 2>&1", logfile) end
-- make it
- return string.format("%s -c %s -o %s %s%s", self._NAME, flags, objfile, srcfile, redirect)
+ return string.format("%s -c %s -o %s %s%s", self.name, flags, objfile, srcfile, redirect)
end
-- make the link command
@@ -136,7 +136,7 @@ function gcc.command_link(self, objfiles, targetfile, flags, logfile)
if logfile then redirect = string.format(" > %s 2>&1", logfile) end
-- make it
- return string.format("%s -o %s %s %s%s", self._NAME, targetfile, objfiles, flags, redirect)
+ return string.format("%s -o %s %s %s%s", self.name, targetfile, objfiles, flags, redirect)
end
-- make the define flag