blabla idc about commit messages. tell me what you like it to say and ill push that after codes been approved.

pull/14175/head
Greg Williamson 1 month ago
parent 0b9baf573b
commit f96016377c
No known key found for this signature in database
GPG Key ID: A355E1DB51C3BF41
  1. 5
      mesonbuild/compilers/c.py
  2. 10
      mesonbuild/compilers/detect.py
  3. 3
      mesonbuild/linkers/linkers.py

@ -551,10 +551,7 @@ class IntelClCCompiler(IntelVisualStudioLikeCompiler, VisualStudioLikeCCompilerM
def get_options(self) -> 'MutableKeyedOptionDictType': def get_options(self) -> 'MutableKeyedOptionDictType':
opts = super().get_options() opts = super().get_options()
key = self.form_compileropt_key('std') key = self.form_compileropt_key('std')
# To shut up mypy. std_opt = opts.get(key)
if isinstance(opts, dict):
raise RuntimeError('This is a transitory issue that should not happen. Please report with full backtrace.')
std_opt = opts.get_value_object(key)
assert isinstance(std_opt, options.UserStdOption), 'for mypy' assert isinstance(std_opt, options.UserStdOption), 'for mypy'
std_opt.set_versions(['c89', 'c99', 'c11']) std_opt.set_versions(['c89', 'c99', 'c11'])
return opts return opts

@ -195,7 +195,7 @@ def detect_static_linker(env: 'Environment', compiler: Compiler) -> StaticLinker
for linker in trials: for linker in trials:
linker_name = os.path.basename(linker[0]) linker_name = os.path.basename(linker[0])
if any(os.path.basename(x) in {'lib', 'lib.exe', 'llvm-lib', 'llvm-lib.exe', 'xilib', 'xilib.exe'} for x in linker): if os.getenv('FORCE_MSVC_ARFLAGS') or any(os.path.basename(x) in {'lib', 'lib.exe', 'llvm-lib', 'llvm-lib.exe', 'xilib', 'xilib.exe'} for x in linker):
arg = '/?' arg = '/?'
elif linker_name in {'ar2000', 'ar2000.exe', 'ar430', 'ar430.exe', 'armar', 'armar.exe', 'ar6x', 'ar6x.exe'}: elif linker_name in {'ar2000', 'ar2000.exe', 'ar430', 'ar430.exe', 'armar', 'armar.exe', 'ar6x', 'ar6x.exe'}:
arg = '?' arg = '?'
@ -483,7 +483,9 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
target = 'x86' if 'IA-32' in err else 'x86_64' target = 'x86' if 'IA-32' in err else 'x86_64'
cls = c.IntelClCCompiler if lang == 'c' else cpp.IntelClCPPCompiler cls = c.IntelClCCompiler if lang == 'c' else cpp.IntelClCPPCompiler
env.coredata.add_lang_args(cls.language, cls, for_machine, env) env.coredata.add_lang_args(cls.language, cls, for_machine, env)
linker = linkers.XilinkDynamicLinker(for_machine, [], version=version) linker_exe = env.lookup_binary_entry(for_machine, 'c_ld')
linker_exelist = [linker_exe] if linker_exe else None
linker = linkers.XilinkDynamicLinker(for_machine, [], version=version, exelist=linker_exelist)
return cls( return cls(
compiler, version, for_machine, is_cross, info, target, compiler, version, for_machine, is_cross, info, target,
linker=linker) linker=linker)
@ -492,7 +494,9 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
target = 'x86' if 'IA-32' in err else 'x86_64' target = 'x86' if 'IA-32' in err else 'x86_64'
cls = c.IntelLLVMClCCompiler if lang == 'c' else cpp.IntelLLVMClCPPCompiler cls = c.IntelLLVMClCCompiler if lang == 'c' else cpp.IntelLLVMClCPPCompiler
env.coredata.add_lang_args(cls.language, cls, for_machine, env) env.coredata.add_lang_args(cls.language, cls, for_machine, env)
linker = linkers.XilinkDynamicLinker(for_machine, [], version=version) linker_exe = env.lookup_binary_entry(for_machine, 'c_ld')
linker_exelist = [linker_exe] if linker_exe else None
linker = linkers.XilinkDynamicLinker(for_machine, [], version=version, exelist=linker_exelist)
return cls( return cls(
compiler, version, for_machine, is_cross, info, target, compiler, version, for_machine, is_cross, info, target,
linker=linker) linker=linker)

@ -1433,7 +1433,8 @@ class XilinkDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker):
prefix: T.Union[str, T.List[str]] = '', prefix: T.Union[str, T.List[str]] = '',
machine: str = 'x86', version: str = 'unknown version', machine: str = 'x86', version: str = 'unknown version',
direct: bool = True): direct: bool = True):
super().__init__(['xilink.exe'], for_machine, '', always_args, version=version) super().__init__(exelist or ['xilink.exe'], for_machine,
prefix, always_args, machine=machine, version=version, direct=direct)
def get_win_subsystem_args(self, value: str) -> T.List[str]: def get_win_subsystem_args(self, value: str) -> T.List[str]:
return self._apply_prefix([f'/SUBSYSTEM:{value.upper()}']) return self._apply_prefix([f'/SUBSYSTEM:{value.upper()}'])

Loading…
Cancel
Save