aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/asm.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py
index 501d8cd..6149313 100644
--- a/mesonbuild/compilers/asm.py
+++ b/mesonbuild/compilers/asm.py
@@ -7,6 +7,16 @@ from .compilers import Compiler
if T.TYPE_CHECKING:
from ..environment import Environment
+nasm_optimization_args = {
+ 'plain': [],
+ '0': ['-O0'],
+ 'g': ['-O0'],
+ '1': ['-O1'],
+ '2': ['-Ox'],
+ '3': ['-Ox'],
+ 's': ['-Ox'],
+} # type: T.Dict[str, T.List[str]]
+
class NasmCompiler(Compiler):
language = 'nasm'
@@ -38,7 +48,7 @@ class NasmCompiler(Compiler):
return ['-o', outputname]
def get_optimization_args(self, optimization_level: str) -> T.List[str]:
- return [f'-O{optimization_level}']
+ return nasm_optimization_args[optimization_level]
def get_debug_args(self, is_debug: bool) -> T.List[str]:
if is_debug: