Preserve b_ prefix for base option names.

pull/454/head
Jussi Pakkanen 9 years ago
parent ae1f284ade
commit 0c9c29b6b6
  1. 2
      mesonbuild/compilers.py
  2. 9
      mesonbuild/optinterpreter.py

@ -121,7 +121,7 @@ base_options = {'b_lto': coredata.UserBooleanOption('b_lto', 'Use link time opti
'b_lundef': coredata.UserBooleanOption('b_lundef', 'Use -Wl,--no-undefined when linking', True),
'b_pgo': coredata.UserComboOption('b_pgo', 'Use profile guide optimization',
['off', 'generate', 'use'],
'off')
'off'),
}
def sanitizer_compile_args(value):

@ -13,7 +13,7 @@
# limitations under the License.
from . import mparser
from . import coredata, mesonlib
from . import coredata
import os, re
forbidden_option_names = coredata.builtin_options
@ -24,13 +24,16 @@ forbidden_prefixes = {'c_': True,
'objc_': True,
'objcpp_': True,
'vala_': True,
'csharp_': True
'csharp_': True,
'swift_': True,
'b_': True,
}
def is_invalid_name(name):
if name in forbidden_option_names:
return True
if name in forbidden_prefixes:
pref = name.split('_')[0] + '_'
if pref in forbidden_prefixes:
return True
return False

Loading…
Cancel
Save