deprecated `meson.get_cross_property`

It's a pure subset of `get_external_property`, and has odd behavior in
host == build configurations. `get_external_property` is clear, and uses
the standard `native : bool` syntax to control host vs build properties
pull/8427/head
Dylan Baker 4 years ago
parent 542dea2571
commit aa4efc709e
  1. 2
      docs/markdown/Cross-compilation.md
  2. 6
      docs/markdown/Reference-manual.md
  3. 5
      docs/markdown/snippets/deprecated_get_cross_property.md
  4. 1
      mesonbuild/interpreter.py

@ -315,7 +315,7 @@ somekey = 'somevalue'
then you can access that using the `meson` object like this:
```meson
myvar = meson.get_cross_property('somekey')
myvar = meson.get_external_property('somekey')
# myvar now has the value 'somevalue'
```

@ -1979,9 +1979,9 @@ the following methods.
the "native" compiler if we're not.
- `get_cross_property(propname, fallback_value)`:
*Consider `get_external_property()` instead*. Returns the given
property from a cross file, the optional fallback_value is returned
if not cross compiling or the given property is not found.
*Deprecated since 0.58.0, use `get_external_property()` instead*.
Returns the given property from a cross file, the optional fallback_value
is returned if not cross compiling or the given property is not found.
- `get_external_property(propname, fallback_value, native: true/false)`
*(since 0.54.0)*: returns the given property from a native or cross file.

@ -0,0 +1,5 @@
## `meson.get_cross_property()` has been deprecated
It's a pure subset of `meson.get_external_property`, and works strangely in
host == build configurations, since it would be more accurately described as
`get_host_property`.

@ -2241,6 +2241,7 @@ class MesonMain(InterpreterObject):
@noArgsFlattening
@permittedKwargs({})
@FeatureDeprecated('meson.get_cross_property', '0.58.0', 'Use meson.get_external_property() instead')
def get_cross_property_method(self, args, kwargs) -> str:
if len(args) < 1 or len(args) > 2:
raise InterpreterException('Must have one or two arguments.')

Loading…
Cancel
Save