aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers/linkers.py
diff options
context:
space:
mode:
authorWilliam Toohey <wtoohey@tritium.com.au>2022-01-27 12:45:57 +1000
committerJussi Pakkanen <jpakkane@gmail.com>2022-02-02 16:45:05 +0200
commitb4d9b2551c32288754a3008d14895c6fe53f48e2 (patch)
tree0e13c8818bbd8e368ca01069154b8482a047a833 /mesonbuild/linkers/linkers.py
parent316cf3a717744bd849a04de4a1625c06779f90a9 (diff)
downloadmeson-b4d9b2551c32288754a3008d14895c6fe53f48e2.zip
meson-b4d9b2551c32288754a3008d14895c6fe53f48e2.tar.gz
meson-b4d9b2551c32288754a3008d14895c6fe53f48e2.tar.bz2
Genericise TI compiler and add MSP430 support
Diffstat (limited to 'mesonbuild/linkers/linkers.py')
-rw-r--r--mesonbuild/linkers/linkers.py24
1 files changed, 17 insertions, 7 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py
index c8489da..9cc217a 100644
--- a/mesonbuild/linkers/linkers.py
+++ b/mesonbuild/linkers/linkers.py
@@ -288,11 +288,11 @@ class CompCertLinker(StaticLinker):
return [f'-o{target}']
-class C2000Linker(StaticLinker):
+class TILinker(StaticLinker):
def __init__(self, exelist: T.List[str]):
super().__init__(exelist)
- self.id = 'ar2000'
+ self.id = 'ti-ar'
def can_linker_accept_rsp(self) -> bool:
return False
@@ -304,6 +304,11 @@ class C2000Linker(StaticLinker):
return ['-r']
+class C2000Linker(TILinker):
+ # Required for backwards compat with projects created before ti-cgt support existed
+ id = 'ar2000'
+
+
class AIXArLinker(ArLikeLinker):
id = 'aixar'
std_args = ['-csr', '-Xany']
@@ -971,15 +976,15 @@ class CompCertDynamicLinker(DynamicLinker):
install_rpath: str) -> T.Tuple[T.List[str], T.Set[bytes]]:
return ([], set())
-class C2000DynamicLinker(DynamicLinker):
+class TIDynamicLinker(DynamicLinker):
- """Linker for Texas Instruments C2000 compiler."""
+ """Linker for Texas Instruments compiler family."""
- id = 'cl2000'
+ id = 'ti'
def __init__(self, exelist: T.List[str], for_machine: mesonlib.MachineChoice,
*, version: str = 'unknown version'):
- super().__init__(exelist or ['cl2000.exe'], for_machine, '', [],
+ super().__init__(exelist, for_machine, '', [],
version=version)
def get_link_whole_for(self, args: T.List[str]) -> T.List[str]:
@@ -1000,7 +1005,7 @@ class C2000DynamicLinker(DynamicLinker):
return ['-z', f'--output_file={outputname}']
def get_search_args(self, dirname: str) -> 'T.NoReturn':
- raise OSError('cl2000.exe does not have a search dir argument')
+ raise OSError('TI compilers do not have a search dir argument')
def get_allow_undefined_args(self) -> T.List[str]:
return []
@@ -1009,6 +1014,11 @@ class C2000DynamicLinker(DynamicLinker):
return []
+class C2000DynamicLinker(TIDynamicLinker):
+ # Required for backwards compat with projects created before ti-cgt support existed
+ id = 'cl2000'
+
+
class ArmDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
"""Linker for the ARM compiler."""