mesonintrospect: Also print builtins for --buildoptions

This is needed to be able to introspect the value of xxxdir options such
as libdir and prefix.
pull/1356/head
Nirbheek Chauhan 8 years ago
parent 5ee92d5bb0
commit 67d3d512ff
  1. 16
      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):

Loading…
Cancel
Save