aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/asm.py
diff options
context:
space:
mode:
authorWu, Zhenyu <wuzhenyu@ustc.edu>2024-12-09 21:41:29 +0800
committerJussi Pakkanen <jpakkane@gmail.com>2025-01-09 14:52:09 +0200
commit910db36e3851f384b4aa2bfb834af92f88b61d77 (patch)
tree08cb6c3518ace0e790b9991ee05e9a16e1721256 /mesonbuild/compilers/asm.py
parent5713f6a7ef2eda8606dd488985b4f74678815cca (diff)
downloadmeson-910db36e3851f384b4aa2bfb834af92f88b61d77.zip
meson-910db36e3851f384b4aa2bfb834af92f88b61d77.tar.gz
meson-910db36e3851f384b4aa2bfb834af92f88b61d77.tar.bz2
Add Linear ASM compiler
Fix #13670
Diffstat (limited to 'mesonbuild/compilers/asm.py')
-rw-r--r--mesonbuild/compilers/asm.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py
index 8cd5e28..d358ca9 100644
--- a/mesonbuild/compilers/asm.py
+++ b/mesonbuild/compilers/asm.py
@@ -7,6 +7,7 @@ from ..mesonlib import EnvironmentException, get_meson_command
from ..options import OptionKey
from .compilers import Compiler
from .mixins.metrowerks import MetrowerksCompiler, mwasmarm_instruction_set_args, mwasmeppc_instruction_set_args
+from .mixins.ti import TICompiler
if T.TYPE_CHECKING:
from ..environment import Environment
@@ -259,6 +260,34 @@ class MasmARMCompiler(Compiler):
return None
+# https://downloads.ti.com/docs/esd/SPRUI04/
+class TILinearAsmCompiler(TICompiler, Compiler):
+ language = 'linearasm'
+
+ def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str,
+ for_machine: MachineChoice, info: MachineInfo,
+ linker: T.Optional[DynamicLinker] = None,
+ full_version: T.Optional[str] = None, is_cross: bool = False):
+ Compiler.__init__(self, ccache, exelist, version, for_machine, info, linker, full_version, is_cross)
+ TICompiler.__init__(self)
+
+ def needs_static_linker(self) -> bool:
+ return True
+
+ def get_always_args(self) -> T.List[str]:
+ return []
+
+ def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]:
+ return []
+
+ def sanity_check(self, work_dir: str, environment: Environment) -> None:
+ if self.info.cpu_family not in {'c6000'}:
+ raise EnvironmentException(f'TI Linear ASM compiler {self.id!r} does not support {self.info.cpu_family} CPU family')
+
+ def get_depfile_suffix(self) -> str:
+ return 'd'
+
+
class MetrowerksAsmCompiler(MetrowerksCompiler, Compiler):
language = 'nasm'