diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-08-30 17:53:41 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-08-30 23:37:46 +0300 |
commit | 0710ad18d919ba38d00aa5f68444e2fcb47a45ac (patch) | |
tree | af0d16148bac75236b21cdf29152992c74247e4d /test cases/common | |
parent | da1b6d0a9fd723f0cb17a4ce73d5adc51a0c5199 (diff) | |
download | meson-0710ad18d919ba38d00aa5f68444e2fcb47a45ac.zip meson-0710ad18d919ba38d00aa5f68444e2fcb47a45ac.tar.gz meson-0710ad18d919ba38d00aa5f68444e2fcb47a45ac.tar.bz2 |
Be stricter when detecting Windows/Cygwin
This removes the check for "mingw" for platform.system(). The only case I know
where "mingw" is return is if using a msys Python under a msys2 mingw environment.
This combination is not really supported by meson and will result in weird errors,
so remove the check.
The second change is checking sys.platform for cygwin instead of platform.system().
The former is document to return "cygwin", while the latter is not and just
returns uname().
While under Cygwin it uname() always starts with "cygwin" it's not hardcoded in MSYS2
and starts with the environment name. Using sys.platform is safer here.
Fixes #7552
Diffstat (limited to 'test cases/common')
-rwxr-xr-x | test cases/common/215 link custom/custom_stlib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test cases/common/215 link custom/custom_stlib.py b/test cases/common/215 link custom/custom_stlib.py index 0157fb1..6a090f3 100755 --- a/test cases/common/215 link custom/custom_stlib.py +++ b/test cases/common/215 link custom/custom_stlib.py @@ -18,7 +18,7 @@ void flob(void) { def get_pic_args(): platname = platform.system().lower() - if platname in ['windows', 'mingw', 'darwin'] or platname.startswith('cygwin'): + if platname in ['windows', 'darwin'] or sys.platform == 'cygwin': return [] return ['-fPIC'] |