aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorur4t <ur4t@protonmail.com>2020-02-16 19:39:02 +0800
committerJussi Pakkanen <jpakkane@gmail.com>2020-02-29 00:43:00 +0200
commit9787de59d4ae28a1d8aedf255d98a432c6bb6045 (patch)
treea1a06b826f603a47bb24bb1f6ceb966fbe6c9f91
parent7b050a9eeb7f1e266d4e72e760839954069e517e (diff)
downloadmeson-9787de59d4ae28a1d8aedf255d98a432c6bb6045.zip
meson-9787de59d4ae28a1d8aedf255d98a432c6bb6045.tar.gz
meson-9787de59d4ae28a1d8aedf255d98a432c6bb6045.tar.bz2
Fixed linker detecting on windows. Added comments about linker detecting for further debugging and refactoring.
-rw-r--r--mesonbuild/build.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 0a8ca45..89fd86a 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1263,6 +1263,8 @@ You probably should put it in link_with instead.''')
if dl != linker.language:
stdlib_args += all_compilers[dl].language_stdlib_only_link_flags()
added_languages.add(dl)
+ # Type of var 'linker' is Compiler.
+ # Pretty hard to fix because the return value is passed everywhere
return linker, stdlib_args
m = 'Could not get a dynamic linker for build target {!r}'
@@ -1290,9 +1292,9 @@ You probably should put it in link_with instead.''')
2. If the target contains only objects, process_compilers guesses and
picks the first compiler that smells right.
'''
- linker, _ = self.get_clink_dynamic_linker_and_stdlibs()
+ compiler, _ = self.get_clink_dynamic_linker_and_stdlibs()
# Mixing many languages with MSVC is not supported yet so ignore stdlibs.
- if linker and linker.get_id() in {'msvc', 'clang-cl', 'intel-cl', 'llvm', 'dmd', 'nvcc'}:
+ if compiler and compiler.get_linker_id() in {'link', 'lld-link', 'xilink', 'optlink'}:
return True
return False