diff options
-rw-r--r-- | mesonbuild/compilers/c.py | 7 | ||||
-rwxr-xr-x | run_unittests.py | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index ab62afd..35c71df 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1345,7 +1345,12 @@ class VisualStudioCCompiler(CCompiler): return [] def get_linker_exelist(self): - return ['link'] # FIXME, should have same path as compiler. + # FIXME, should have same path as compiler. + # FIXME, should be controllable via cross-file. + if self.id == 'clang-cl': + return ['lld-link'] + else: + return ['link'] def get_linker_always_args(self): return ['/nologo'] diff --git a/run_unittests.py b/run_unittests.py index 5fbc34c..b780883 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2050,8 +2050,9 @@ int main(int argc, char **argv) { if extra_args is None: extra_args = [] if compiler.get_argument_syntax() == 'msvc': - link_cmd = ['link', '/NOLOGO', '/DLL', '/DEBUG', - '/IMPLIB:' + impfile, '/OUT:' + outfile, objectfile] + link_cmd = compiler.get_linker_exelist() + [ + '/NOLOGO', '/DLL', '/DEBUG', '/IMPLIB:' + impfile, + '/OUT:' + outfile, objectfile] else: extra_args += ['-fPIC'] link_cmd = compiler.get_exelist() + ['-shared', '-o', outfile, objectfile] |