summaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-10-04 21:57:27 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-04 21:57:27 +0300
commit106608bdc2b777ed0483ac0db4c6bc72c1054295 (patch)
tree51e50292798be002f1a48ab7edd65e5a0099a60c /mesonbuild/coredata.py
parentc0c075c1298ad9018a62d75a632af1c0d0d7d0f8 (diff)
downloadmeson-exposewrap.tar.gz
Expose wrap_mode as an option. Closes #4266.exposewrap
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r--mesonbuild/coredata.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 1ab7d72ea..819481b32 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -223,7 +223,6 @@ class CoreData:
self.base_options = {}
self.external_preprocess_args = {} # CPPFLAGS only
self.cross_file = self.__load_cross_file(options.cross_file)
- self.wrap_mode = options.wrap_mode if options.wrap_mode is not None else WrapMode.default
self.compilers = OrderedDict()
self.cross_compilers = OrderedDict()
self.deps = OrderedDict()
@@ -338,7 +337,10 @@ class CoreData:
def get_builtin_option(self, optname):
if optname in self.builtins:
- return self.builtins[optname].value
+ v = self.builtins[optname]
+ if optname == 'wrap_mode':
+ return WrapMode.from_string(v.value)
+ return v.value
raise RuntimeError('Tried to get unknown builtin option %s.' % optname)
def set_builtin_option(self, optname, value):
@@ -616,7 +618,11 @@ builtin_options = {
'install_umask': [UserUmaskOption, 'Default umask to apply on permissions of installed files', '022'],
'auto_features': [UserFeatureOption, "Override value of all 'auto' features", 'auto'],
'optimization': [UserComboOption, 'Optimization level', ['0', 'g', '1', '2', '3', 's'], '0'],
- 'debug': [UserBooleanOption, 'Debug', True]
+ 'debug': [UserBooleanOption, 'Debug', True],
+ 'wrap_mode': [UserComboOption, 'Wrap mode', ['default',
+ 'nofallback',
+ 'nodownload',
+ 'forcefallback'], 'default'],
}
# Special prefix-dependent defaults for installation directories that reside in