diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-10 01:49:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 01:49:16 +0300 |
commit | 06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf (patch) | |
tree | d6e80b4aa73a30e31861d35aa00127fd625fcca8 /mesonbuild/mesonlib.py | |
parent | 6b4b601eafc5320e62060f39da5acad7c3007942 (diff) | |
parent | 6d6af46edcb765d7046533fdad4d03b0c0c9cd64 (diff) | |
download | meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.zip meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.gz meson-06df6e463f3d7f62676f8f9ce0cf81fbb4058eaf.tar.bz2 |
Merge pull request #4010 from Ericson2314/purge-cross-conditional-preview
Purge much `is_cross` and `<things>_cross` without changing user interfaces---includes on #5263
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index e3ddf28..d052a2b 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -463,94 +463,6 @@ def is_dragonflybsd() -> bool: def is_freebsd() -> bool: return platform.system().lower() == 'freebsd' -def _get_machine_is_cross(env, is_cross): - """ - This is not morally correct, but works for now. For cross builds the build - and host machines differ. `is_cross == true` means the host machine, while - `is_cross == false` means the build machine. Both are used in practice, - even though the documentation refers to the host machine implying we should - hard-code it. For non-cross builds `is_cross == false` is passed but the - host and build machines are identical so it doesn't matter. - - Users for `for_*` should instead specify up front which machine they want - and query that like: - - env.machines[MachineChoice.HOST].is_haiku() - - """ - for_machine = MachineChoice.HOST if is_cross else MachineChoice.BUILD - return env.machines[for_machine] - -def for_windows(is_cross, env): - """ - Host machine is windows? - - Deprecated: Please use `env.machines[for_machine].is_windows()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_windows() - -def for_cygwin(is_cross, env): - """ - Host machine is cygwin? - - Deprecated: Please use `env.machines[for_machine].is_cygwin()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_cygwin() - -def for_linux(is_cross, env): - """ - Host machine is linux? - - Deprecated: Please use `env.machines[for_machine].is_linux()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_linux() - -def for_darwin(is_cross, env): - """ - Host machine is Darwin (iOS/OS X)? - - Deprecated: Please use `env.machines[for_machine].is_darwin()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_darwin() - -def for_android(is_cross, env): - """ - Host machine is Android? - - Deprecated: Please use `env.machines[for_machine].is_android()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_android() - -def for_haiku(is_cross, env): - """ - Host machine is Haiku? - - Deprecated: Please use `env.machines[for_machine].is_haiku()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_haiku() - -def for_openbsd(is_cross, env): - """ - Host machine is OpenBSD? - - Deprecated: Please use `env.machines[for_machine].is_openbsd()`. - - Note: 'host' is the machine on which compiled binaries will run - """ - return _get_machine_is_cross(env, is_cross).is_openbsd() - def exe_exists(arglist: List[str]) -> bool: try: if subprocess.run(arglist, timeout=10).returncode == 0: |