nasm: Fix get_optimization_args()

pull/10994/head
Ole André Vadla Ravnås 2 years ago committed by Xavier Claessens
parent 97ec20e901
commit fa86a9d96d
  1. 12
      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:

Loading…
Cancel
Save