From 2b4002e60fd05a11ca6a36395307d27c3dcef6f7 Mon Sep 17 00:00:00 2001 From: Nomura Date: Wed, 13 Sep 2023 20:45:38 +0200 Subject: [PATCH] Metrowerks assembler should not inherit opt args from mixin The Metrowerks assembler does not support optimization flags. However, it received the same opt args as the Metrowerks C and C++ compilers, because it inherits from the 'MetrowerksCompiler' mixin. This broke builds with opt level higher than 0 that used the Metrowerks Assembler, as the latter received unsupported args. This is now fixed. --- mesonbuild/compilers/asm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py index f25473b20..19f7b643b 100644 --- a/mesonbuild/compilers/asm.py +++ b/mesonbuild/compilers/asm.py @@ -306,6 +306,9 @@ class MetrowerksAsmCompiler(MetrowerksCompiler, Compiler): def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]: return [] + def get_optimization_args(self, optimization_level: str) -> T.List[str]: + return [] + def get_pic_args(self) -> T.List[str]: return []