From 7edb31caaa3d1a0d58737324b6af85cb3b2d2c75 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 28 Mar 2016 13:04:24 +0800 Subject: optimizate option menu --- xmake/core/platform/compiler.lua | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'xmake/core/platform/compiler.lua') diff --git a/xmake/core/platform/compiler.lua b/xmake/core/platform/compiler.lua index d37ed06c1..e703ef933 100644 --- a/xmake/core/platform/compiler.lua +++ b/xmake/core/platform/compiler.lua @@ -175,7 +175,7 @@ function compiler._addflags_from_platform(self, flags, flagnames) end end - +-- TODO optimize speed, cache it -- add flags from the target function compiler._addflags_from_target(self, flags, flagnames, target) @@ -188,37 +188,37 @@ function compiler._addflags_from_target(self, flags, flagnames, target) end -- add the symbols flags from the current project - table.join2(flags, compiler._getflags(self, target:get("symbols"), { debug = "-g" - , hidden = "-fvisibility=hidden" - })) + table.join2(flags, compiler._getflags(self, target:get("symbols"), { debug = "-g" + , hidden = "-fvisibility=hidden" + })) -- add the warning flags from the current project - table.join2(flags, compiler._getflags(self, target:get("warnings"), { none = "-w" - , less = "-W1" - , more = "-W3" - , all = "-Wall" - , error = "-Werror" - })) + table.join2(flags, compiler._getflags(self, target:get("warnings"), { none = "-w" + , less = "-W1" + , more = "-W3" + , all = "-Wall" + , error = "-Werror" + })) -- add the optimize flags from the current project - table.join2(flags, compiler._getflags(self, target:get("optimize"), { none = "-O0" - , fast = "-O1" - , faster = "-O2" - , fastest = "-O3" - , smallest = "-Os" - , aggressive = "-Ofast" - })) + table.join2(flags, compiler._getflags(self, target:get("optimize"), { none = "-O0" + , fast = "-O1" + , faster = "-O2" + , fastest = "-O3" + , smallest = "-Os" + , aggressive = "-Ofast" + })) -- add the vector extensions flags from the current project - table.join2(flags, compiler._getflags(self, target:get("vectorexts"), { mmx = "-mmmx" - , sse = "-msse" - , sse2 = "-msse2" - , sse3 = "-msse3" - , ssse3 = "-mssse3" - , avx = "-mavx" - , avx2 = "-mavx2" - , neon = "-mfpu=neon" - })) + table.join2(flags, compiler._getflags(self, target:get("vectorexts"), { mmx = "-mmmx" + , sse = "-msse" + , sse2 = "-msse2" + , sse3 = "-msse3" + , ssse3 = "-mssse3" + , avx = "-mavx" + , avx2 = "-mavx2" + , neon = "-mfpu=neon" + })) -- add the language flags from the current project local languages = {} -- cgit v1.3.1