From ab5ea9e8b60f043551a2920f70d6f3a1532d5bf8 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 26 Nov 2019 12:29:12 -0800 Subject: environment: unify platform detection logic I noticed this while I was here, it's not much, just a small cleanup to the platform detection logic. --- mesonbuild/environment.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 47fb9f1..83c6935 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -1418,8 +1418,7 @@ class Environment: if 'LLVM D compiler' in out: # LDC seems to require a file - m = self.machines[for_machine] - if m.is_windows() or m.is_cygwin(): + if info.is_windows() or info.is_cygwin(): # Getting LDC on windows to give useful linker output when # not doing real work is painfully hard. It ships with a # version of lld-link, so unless we think the user wants @@ -1443,8 +1442,7 @@ class Environment: full_version=full_version, linker=linker) elif 'The D Language Foundation' in out or 'Digital Mars' in out: # DMD seems to require a file - m = self.machines[for_machine] - if m.is_windows() or m.is_cygwin(): + if info.is_windows() or info.is_cygwin(): if is_msvc: linker_cmd = ['link'] elif arch == 'x86': -- cgit v1.1