diff options
| -rw-r--r-- | xmake/modules/core/tools/clang.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua index 692fc559c..67b271da6 100644 --- a/xmake/modules/core/tools/clang.lua +++ b/xmake/modules/core/tools/clang.lua @@ -36,3 +36,21 @@ function init(self) _super._g.mxflags = {"-Qunused-arguments"} _super._g.asflags = {"-Qunused-arguments"} end + +-- make the optimize flag +function nf_optimize(self, level) + + -- the maps + local maps = + { + none = "-O0" + , fast = "-O1" + , faster = "-O2" + , fastest = "-O3" + , smallest = "-Oz" -- smaller than -Os + , aggressive = "-Ofast" + } + + -- make it + return maps[level] +end |
