diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/environment.py | 2 | ||||
-rw-r--r-- | mesonbuild/linkers.py | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index ece1242..8fa5408 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -793,7 +793,7 @@ class Environment: exelist=compiler, version=search_version(o), direct=invoked_directly) elif 'OPTLINK' in o: # Opltink's stdout *may* beging with a \r character. - return OptlinkDynamicLinker(for_machine, version=search_version(o)) + return OptlinkDynamicLinker(compiler, for_machine, version=search_version(o)) elif o.startswith('Microsoft') or e.startswith('Microsoft'): out = o or e match = re.search(r'.*(X86|X64|ARM|ARM64).*', out) diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index d6ea0c9..83687ad 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -968,15 +968,22 @@ class OptlinkDynamicLinker(VisualStudioLikeLinkerMixin, DynamicLinker): """Digital Mars dynamic linker for windows.""" - def __init__(self, for_machine: mesonlib.MachineChoice, + def __init__(self, exelist: T.List[str], for_machine: mesonlib.MachineChoice, *, version: str = 'unknown version'): # Use optlink instead of link so we don't interfer with other link.exe # implementations. - super().__init__('optlink', ['optlink.exe'], for_machine, '', [], version=version) + super().__init__('optlink', exelist, for_machine, '', [], version=version) def get_allow_undefined_args(self) -> T.List[str]: return [] + def get_debugfile_args(self, targetfile: str) -> T.List[str]: + # Optlink does not generate pdb files. + return [] + + def get_always_args(self) -> T.List[str]: + return [] + class CudaLinker(PosixDynamicLinkerMixin, DynamicLinker): """Cuda linker (nvlink)""" |