Merge pull request #13681 from EngJay/13678-fix-ti-cgt-support

Fix TI C2000 support
pull/7855/merge
Jussi Pakkanen 2 weeks ago committed by GitHub
commit 1feb771f06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      mesonbuild/backend/ninjabackend.py
  2. 4
      mesonbuild/compilers/mixins/clike.py
  3. 3
      mesonbuild/linkers/linkers.py

@ -3555,6 +3555,17 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
for t in target.link_depends])
elem = NinjaBuildElement(self.all_outputs, outname, linker_rule, obj_list, implicit_outs=implicit_outs)
elem.add_dep(dep_targets + custom_target_libraries)
# Compiler args must be included in TI C28x linker commands.
if linker.get_id() in {'c2000', 'c6000', 'ti'}:
compile_args = []
for for_machine in MachineChoice:
clist = self.environment.coredata.compilers[for_machine]
for langname, compiler in clist.items():
if langname in {'c', 'cpp'} and compiler.get_id() in {'c2000', 'c6000', 'ti'}:
compile_args += self.generate_basic_compiler_args(target, compiler)
elem.add_item('ARGS', compile_args)
elem.add_item('LINK_ARGS', commands)
self.create_target_linker_introspection(target, linker, commands)
return elem

@ -1034,8 +1034,8 @@ class CLikeCompiler(Compiler):
elif env.machines[self.for_machine].is_cygwin():
shlibext = ['dll', 'dll.a']
prefixes = ['cyg'] + prefixes
elif self.id.lower() == 'c6000' or self.id.lower() == 'ti':
# TI C6000 compiler can use both extensions for static or dynamic libs.
elif self.id.lower() in {'c6000', 'c2000', 'ti'}:
# TI C28x compilers can use both extensions for static or dynamic libs.
stlibext = ['a', 'lib']
shlibext = ['dll', 'so']
else:

@ -26,6 +26,9 @@ class StaticLinker:
def __init__(self, exelist: T.List[str]):
self.exelist = exelist
def get_id(self) -> str:
return self.id
def compiler_args(self, args: T.Optional[T.Iterable[str]] = None) -> CompilerArgs:
return CompilerArgs(self, args)

Loading…
Cancel
Save