summaryrefslogtreecommitdiff
path: root/deps/gyp/pylib/gyp/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/pylib/gyp/__init__.py')
-rwxr-xr-xdeps/gyp/pylib/gyp/__init__.py29
1 files changed, 20 insertions, 9 deletions
diff --git a/deps/gyp/pylib/gyp/__init__.py b/deps/gyp/pylib/gyp/__init__.py
index 30edea5675..668f38b60d 100755
--- a/deps/gyp/pylib/gyp/__init__.py
+++ b/deps/gyp/pylib/gyp/__init__.py
@@ -49,7 +49,7 @@ def FindBuildFiles():
def Load(build_files, format, default_variables={},
includes=[], depth='.', params=None, check=False,
- circular_check=True):
+ circular_check=True, duplicate_basename_check=True):
"""
Loads one or more specified build files.
default_variables and includes will be copied before use.
@@ -59,7 +59,6 @@ def Load(build_files, format, default_variables={},
if params is None:
params = {}
- flavor = None
if '-' in format:
format, params['flavor'] = format.split('-', 1)
@@ -69,6 +68,7 @@ def Load(build_files, format, default_variables={},
# named WITH_CAPITAL_LETTERS to provide a distinct "best practice" namespace,
# avoiding collisions with user and automatic variables.
default_variables['GENERATOR'] = format
+ default_variables['GENERATOR_FLAVOR'] = params.get('flavor', '')
# Format can be a custom python file, or by default the name of a module
# within gyp.generator.
@@ -126,6 +126,7 @@ def Load(build_files, format, default_variables={},
# Process the input specific to this generator.
result = gyp.input.Load(build_files, default_variables, includes[:],
depth, generator_input_info, check, circular_check,
+ duplicate_basename_check,
params['parallel'], params['root_targets'])
return [generator] + result
@@ -324,6 +325,16 @@ def gyp_main(args):
parser.add_option('--no-circular-check', dest='circular_check',
action='store_false', default=True, regenerate=False,
help="don't check for circular relationships between files")
+ # --no-duplicate-basename-check disables the check for duplicate basenames
+ # in a static_library/shared_library project. Visual C++ 2008 generator
+ # doesn't support this configuration. Libtool on Mac also generates warnings
+ # when duplicate basenames are passed into Make generator on Mac.
+ # TODO(yukawa): Remove this option when these legacy generators are
+ # deprecated.
+ parser.add_option('--no-duplicate-basename-check',
+ dest='duplicate_basename_check', action='store_false',
+ default=True, regenerate=False,
+ help="don't check for duplicate basenames")
parser.add_option('--no-parallel', action='store_true', default=False,
help='Disable multiprocessing')
parser.add_option('-S', '--suffix', dest='suffix', default='',
@@ -371,7 +382,7 @@ def gyp_main(args):
if options.use_environment:
generate_formats = os.environ.get('GYP_GENERATORS', [])
if generate_formats:
- generate_formats = re.split('[\s,]', generate_formats)
+ generate_formats = re.split(r'[\s,]', generate_formats)
if generate_formats:
options.formats = generate_formats
else:
@@ -493,14 +504,14 @@ def gyp_main(args):
'gyp_binary': sys.argv[0],
'home_dot_gyp': home_dot_gyp,
'parallel': options.parallel,
- 'root_targets': options.root_targets}
+ 'root_targets': options.root_targets,
+ 'target_arch': cmdline_default_variables.get('target_arch', '')}
# Start with the default variables from the command line.
- [generator, flat_list, targets, data] = Load(build_files, format,
- cmdline_default_variables,
- includes, options.depth,
- params, options.check,
- options.circular_check)
+ [generator, flat_list, targets, data] = Load(
+ build_files, format, cmdline_default_variables, includes, options.depth,
+ params, options.check, options.circular_check,
+ options.duplicate_basename_check)
# TODO(mark): Pass |data| for now because the generator needs a list of
# build files that came in. In the future, maybe it should just accept