diff options
-rw-r--r-- | cross/linux-mingw-w64-32bit.txt | 1 | ||||
-rw-r--r-- | cross/ubuntu-armhf.txt | 1 | ||||
-rw-r--r-- | mesonbuild/environment.py | 6 | ||||
-rwxr-xr-x | run_unittests.py | 4 | ||||
-rw-r--r-- | test cases/linuxlike/15 ld binary/meson.build | 4 |
5 files changed, 11 insertions, 5 deletions
diff --git a/cross/linux-mingw-w64-32bit.txt b/cross/linux-mingw-w64-32bit.txt index 8707a60..c2ea605 100644 --- a/cross/linux-mingw-w64-32bit.txt +++ b/cross/linux-mingw-w64-32bit.txt @@ -6,6 +6,7 @@ strip = '/usr/bin/i686-w64-mingw32-strip' pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config' windres = '/usr/bin/i686-w64-mingw32-windres' exe_wrapper = 'wine' +ld = '/usr/bin/i686-w64-mingw32-ld' [properties] # Directory that contains 'bin', 'lib', etc diff --git a/cross/ubuntu-armhf.txt b/cross/ubuntu-armhf.txt index a6e1f15..45a272a 100644 --- a/cross/ubuntu-armhf.txt +++ b/cross/ubuntu-armhf.txt @@ -7,6 +7,7 @@ rust = ['rustc', '--target', 'arm-unknown-linux-gnueabihf', '-C', 'linker=/usr/b ar = '/usr/arm-linux-gnueabihf/bin/ar' strip = '/usr/arm-linux-gnueabihf/bin/strip' pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' +ld = '/usr/bin/arm-linux/gnueabihf-ld' [properties] root = '/usr/arm-linux-gnueabihf' diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 122301f..7cc6f5b 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -749,7 +749,7 @@ class Environment: check_args += self.coredata.compiler_options[for_machine][comp_class.language + '_args'].value override = [] # type: T.List[str] - value = self.binaries[for_machine].lookup_entry(comp_class.language + 'ld') + value = self.binaries[for_machine].lookup_entry(comp_class.language + '_ld') if value is not None: override = comp_class.use_linker_args(value[0]) check_args += override @@ -812,7 +812,7 @@ class Environment: check_args = comp_class.LINKER_PREFIX + ['--version'] + extra_args override = [] # type: T.List[str] - value = self.binaries[for_machine].lookup_entry(comp_class.language + 'ld') + value = self.binaries[for_machine].lookup_entry(comp_class.language + '_ld') if value is not None: override = comp_class.use_linker_args(value[0]) check_args += override @@ -1355,7 +1355,7 @@ class Environment: cc = self.detect_c_compiler(for_machine) is_link_exe = isinstance(cc.linker, VisualStudioLikeLinkerMixin) - override = self.binaries[for_machine].lookup_entry('rustld') + override = self.binaries[for_machine].lookup_entry('rust_ld') for compiler in compilers: if isinstance(compiler, str): diff --git a/run_unittests.py b/run_unittests.py index d8c3a1c..79b7018 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4664,7 +4664,7 @@ class WindowsTests(BasePlatformTests): def _check_ld(self, name: str, lang: str, expected: str) -> None: if not shutil.which(name): raise unittest.SkipTest('Could not find {}.'.format(name)) - envvar = mesonbuild.envconfig.BinaryTable.evarMap['{}ld'.format(lang)] + envvar = mesonbuild.envconfig.BinaryTable.evarMap['{}_ld'.format(lang)] with mock.patch.dict(os.environ, {envvar: name}): env = get_fake_env() try: @@ -5945,7 +5945,7 @@ c = ['{0}'] raise unittest.SkipTest('Solaris currently cannot override the linker.') if not shutil.which(check): raise unittest.SkipTest('Could not find {}.'.format(check)) - envvar = mesonbuild.envconfig.BinaryTable.evarMap['{}ld'.format(lang)] + envvar = mesonbuild.envconfig.BinaryTable.evarMap['{}_ld'.format(lang)] with mock.patch.dict(os.environ, {envvar: name}): env = get_fake_env() comp = getattr(env, 'detect_{}_compiler'.format(lang))(MachineChoice.HOST) diff --git a/test cases/linuxlike/15 ld binary/meson.build b/test cases/linuxlike/15 ld binary/meson.build new file mode 100644 index 0000000..987763e --- /dev/null +++ b/test cases/linuxlike/15 ld binary/meson.build @@ -0,0 +1,4 @@ +project('ld binary') + +ld = find_program('ld') +assert(run_command(ld, '--version').returncode() == 0) |