diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-01-06 12:22:13 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-01-07 00:51:29 +0200 |
commit | a8caf988c6bd0fb6678b4dedfcc5d7466b137858 (patch) | |
tree | 677df326dc17cfaaeec496d627ca704070c3985a /mesonbuild/environment.py | |
parent | 7ec3af95e5b93845e5d757bfc3b8bab53ce895b1 (diff) | |
download | meson-a8caf988c6bd0fb6678b4dedfcc5d7466b137858.zip meson-a8caf988c6bd0fb6678b4dedfcc5d7466b137858.tar.gz meson-a8caf988c6bd0fb6678b4dedfcc5d7466b137858.tar.bz2 |
environment: Fix detection of icc on macOS
Which wouldn't call the function to detect c_args and friends.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index cc726ce..77fc1ae 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -837,8 +837,8 @@ class Environment: v = search_version(o) linker = LLVMDynamicLinker(compiler, for_machine, 'lld', comp_class.LINKER_PREFIX, override, version=v) - # first is for apple clang, second is for real gcc - elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e: + # first is for apple clang, second is for real gcc, the third is icc + elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option:' in e: if isinstance(comp_class.LINKER_PREFIX, str): _, _, e = Popen_safe(compiler + [comp_class.LINKER_PREFIX + '-v'] + extra_args) else: @@ -1054,10 +1054,7 @@ class Environment: info, exe_wrap, linker=linker) if '(ICC)' in out: cls = IntelCCompiler if lang == 'c' else IntelCPPCompiler - if self.machines[for_machine].is_darwin(): - l = AppleDynamicLinker(compiler, for_machine, 'APPLE ld', cls.LINKER_PREFIX, [], version=version) - else: - l = self._guess_nix_linker(compiler, cls, for_machine) + l = self._guess_nix_linker(compiler, cls, for_machine) return cls( ccache + compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=l) |