Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrowerks: Minor improvements #13727

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions mesonbuild/compilers/mixins/metrowerks.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,12 @@ def __init__(self) -> None:
self.base_options = {
OptionKey(o) for o in ['b_pch', 'b_ndebug']}

default_warn_args: T.List[str] = []
self.warn_args: T.Dict[str, T.List[str]] = {
'0': ['-w', 'off'],
'1': default_warn_args,
'2': default_warn_args + ['-w', 'most'],
'3': default_warn_args + ['-w', 'all'],
'everything': default_warn_args + ['-w', 'full']}
'0': ['-warnings', 'off'],
'1': [],
'2': ['-warnings', 'on,nocmdline'],
'3': ['-warnings', 'on,all'],
'everything': ['-warnings', 'on,full']}

def depfile_for_object(self, objfile: str) -> T.Optional[str]:
# Earlier versions of these compilers do not support specifying
Expand Down Expand Up @@ -275,6 +274,6 @@ def _unix_args_to_native(cls, args: T.List[str], info: MachineInfo) -> T.List[st
def compute_parameters_with_absolute_paths(self, parameter_list: T.List[str], build_dir: str) -> T.List[str]:
for idx, i in enumerate(parameter_list):
if i[:2] == '-I':
parameter_list[idx] = i[:9] + os.path.normpath(os.path.join(build_dir, i[9:]))
parameter_list[idx] = i[:2] + os.path.normpath(os.path.join(build_dir, i[2:]))

return parameter_list
8 changes: 3 additions & 5 deletions mesonbuild/linkers/linkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,9 +1637,6 @@ def get_allow_undefined_args(self) -> T.List[str]:
def get_accepts_rsp(self) -> bool:
return True

def get_lib_prefix(self) -> str:
return ""

def get_linker_always_args(self) -> T.List[str]:
return []

Expand All @@ -1652,8 +1649,9 @@ def get_search_args(self, dirname: str) -> T.List[str]:
def invoked_by_compiler(self) -> bool:
return False

def rsp_file_syntax(self) -> RSPFileSyntax:
return RSPFileSyntax.GCC
def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str,
suffix: str, soversion: str, darwin_versions: T.Tuple[str, str]) -> T.List[str]:
raise MesonException(f'{self.id} does not support shared libraries.')


class MetrowerksLinkerARM(MetrowerksLinker):
Expand Down
Loading