aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-03 15:53:20 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-18 02:37:32 +0530
commit67d3d512ffae9de255c6954451c59816ae8faea9 (patch)
treec227def97b43337dfeee9c138f41dd2d9e27aca8
parent5ee92d5bb0c9ad6b6b5bf4b8847d8533dea24c77 (diff)
downloadmeson-67d3d512ffae9de255c6954451c59816ae8faea9.zip
meson-67d3d512ffae9de255c6954451c59816ae8faea9.tar.gz
meson-67d3d512ffae9de255c6954451c59816ae8faea9.tar.bz2
mesonintrospect: Also print builtins for --buildoptions
This is needed to be able to introspect the value of xxxdir options such as libdir and prefix.
-rw-r--r--mesonbuild/mintro.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index e30500f..2807230 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -111,23 +111,11 @@ def list_target_files(target_name, coredata, builddata):
print(json.dumps(sources))
def list_buildoptions(coredata, builddata):
- buildtype = {'choices': ['plain', 'debug', 'debugoptimized', 'release', 'minsize'],
- 'type': 'combo',
- 'value': coredata.get_builtin_option('buildtype'),
- 'description': 'Build type',
- 'name': 'type'}
- strip = {'value': coredata.get_builtin_option('strip'),
- 'type': 'boolean',
- 'description': 'Strip on install',
- 'name': 'strip'}
- unity = {'value': coredata.get_builtin_option('unity'),
- 'type': 'boolean',
- 'description': 'Unity build',
- 'name': 'unity'}
- optlist = [buildtype, strip, unity]
+ optlist = []
add_keys(optlist, coredata.user_options)
add_keys(optlist, coredata.compiler_options)
add_keys(optlist, coredata.base_options)
+ add_keys(optlist, coredata.builtins)
print(json.dumps(optlist))
def add_keys(optlist, options):