diff options
| author | ruki <[email protected]> | 2020-10-06 23:59:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-06 23:59:02 +0800 |
| commit | 0e6d98d453674e52d676e80a3378e6e74b4250fa (patch) | |
| tree | 8b229f400de2f4856d66a21fd31b1f4c7d21193f /xmake/modules/core/tools/gcc.lua | |
| parent | 17b71915bd116b542447a9243dd9210beff1ccab (diff) | |
add set_fpmodels
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 22efda1fd..352153e57 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -117,6 +117,19 @@ function nf_warning(self, level) return maps[level] end +-- make the fp-model flag +function nf_fpmodel(self, level) + local maps = + { + precise = "" --default + , fast = "-ffast-math" + , strict = {"-frounding-math", "-ftrapping-math"} + , except = "-ftrapping-math" + , noexcept = "-fno-trapping-math" + } + return maps[level] +end + -- make the optimize flag function nf_optimize(self, level) local maps = |
