diff options
| author | ruki <[email protected]> | 2023-01-16 22:47:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-16 22:47:18 +0800 |
| commit | 503e32aa9f2b40e3f5c3167e67d732c79ec26440 (patch) | |
| tree | 46891ab47b1422fb15e66f110feb73d46b9aacea /xmake/modules/core | |
| parent | 525cc07aac1c9663f86078cb6c5af88576ede25b (diff) | |
fix check flags
Diffstat (limited to 'xmake/modules/core')
| -rw-r--r-- | xmake/modules/core/tools/c51.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/c51.lua b/xmake/modules/core/tools/c51.lua index fd3f3db26..803d6f3c0 100644 --- a/xmake/modules/core/tools/c51.lua +++ b/xmake/modules/core/tools/c51.lua @@ -29,6 +29,23 @@ import("core.project.policy") function init(self) end +-- make the optimize flag +function nf_optimize(self, level) + local kind = self:kind() + print("kind", kind) + print("level", level) + if language.sourcekinds()[kind] then + local maps = { + fast = "OT(8,SPEED)" + , faster = "OT(9,SPEED)" + , fastest = "OT(10,SPEED)" + , smallest = "OT(10,SIZE)" + , aggressive = "OT(11,SPEED)" + } + return maps[level] + end +end + -- make the includedir flag function nf_includedirs(self, dirs) local paths = {} @@ -53,7 +70,7 @@ function compargv(self, sourcefile, objectfile, flags) end -- compile the source file -function compile(self, sourcefile, objectfile, dependinfo, flags) +function compile(self, sourcefile, objectfile, dependinfo, flags, opt) os.mkdir(path.directory(objectfile)) try |
