diff options
| author | ruki <[email protected]> | 2015-06-05 13:38:12 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-05 13:38:12 +0800 |
| commit | ce6af9d93717a57792fc7d371f0fea9c40878c2f (patch) | |
| tree | ad68f1ea18284b12fdc3a364f88350b0ffed7c58 /xmake/scripts/tools | |
| parent | 9c4c565ef5cba3c668b338ed0066cff0d58e8caa (diff) | |
fix verbose for makefile
Diffstat (limited to 'xmake/scripts/tools')
| -rw-r--r-- | xmake/scripts/tools/clang.lua | 26 | ||||
| -rw-r--r-- | xmake/scripts/tools/echo.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/tools/verbose.lua | 2 |
3 files changed, 17 insertions, 13 deletions
diff --git a/xmake/scripts/tools/clang.lua b/xmake/scripts/tools/clang.lua index c11eb822e..0e2ac3dbd 100644 --- a/xmake/scripts/tools/clang.lua +++ b/xmake/scripts/tools/clang.lua @@ -45,20 +45,17 @@ function clang.init(name) else flags_arch = "-arch " .. arch end - -- init cflags - clang.cflags = flags_arch + -- init cxflags + clang.cxflags = flags_arch - -- init cxxflags - clang.cxxflags = flags_arch - - -- init mflags - clang.mflags = flags_arch - - -- init mxxflags - clang.mxxflags = flags_arch + -- init mxflags + clang.mxflags = flags_arch .. " -fmessage-length=0 -pipe -fpascal-strings" + .. " \"-DIBOutlet=__attribute__((iboutlet))\"" + .. " \"-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))\"" + .. " \"-DIBAction=void)__attribute__((ibaction)\"" -- init asflags - clang.asflags = flags_arch + clang.asflags = flags_arch -- init ldflags clang.ldflags = flags_arch @@ -66,6 +63,13 @@ function clang.init(name) -- init shflags clang.shflags = flags_arch .. " -dynamiclib" + -- suppress warning for the ccache bug + local ccache = config.get("ccache") + if ccache and ccache == "y" then + clang.cxflags = clang.cxflags:append("-Qunused-arguments", " ") + clang.mxflags = clang.mxflags:append("-Qunused-arguments", " ") + end + end -- make the compile command diff --git a/xmake/scripts/tools/echo.lua b/xmake/scripts/tools/echo.lua index 197cebedc..d9ee8f872 100644 --- a/xmake/scripts/tools/echo.lua +++ b/xmake/scripts/tools/echo.lua @@ -32,7 +32,7 @@ function echo.main(...) -- echo all for _, v in ipairs(...) do - io.write(string.format("%s ", v:gsub("%%20", " "))) + io.write(string.format("%s ", v:gsub("%%20", " "):gsub("%%3d", "="):gsub("%%22", "\""))) end io.write("\n") diff --git a/xmake/scripts/tools/verbose.lua b/xmake/scripts/tools/verbose.lua index a5fa6e606..fdcfb3e46 100644 --- a/xmake/scripts/tools/verbose.lua +++ b/xmake/scripts/tools/verbose.lua @@ -33,7 +33,7 @@ function verbose.main(...) -- verbose all if xmake._OPTIONS.verbose then for _, v in ipairs(...) do - io.write(string.format("%s ", v:gsub("%%20", " "))) + io.write(string.format("%s ", v:gsub("%%20", " "):gsub("%%3d", "="):gsub("%%22", "\""))) end io.write("\n") end |
