summaryrefslogtreecommitdiff
path: root/xmake/core/platform/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-03-28 13:04:24 +0800
committerruki <[email protected]>2016-03-28 13:04:24 +0800
commit7edb31caaa3d1a0d58737324b6af85cb3b2d2c75 (patch)
treee041e67878bdaef387742986debb08b639274995 /xmake/core/platform/compiler.lua
parentf86b3d2ae37f1bb0633246f7d1cea81f996b7d48 (diff)
optimizate option menu
Diffstat (limited to 'xmake/core/platform/compiler.lua')
-rw-r--r--xmake/core/platform/compiler.lua52
1 files changed, 26 insertions, 26 deletions
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 = {}