3 # This script is wrapper for NaCl that adds some support for how GYP
4 # is invoked by NaCl beyond what can be done it the gclient hooks.
11 print 'Updating projects from gyp files...'
15 except ImportError, e:
16 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]),
17 '..', '..', 'tools', 'gyp', 'pylib'))
20 if __name__ == '__main__':
23 # If we didn't get a file, check an env var, and then fall back to
24 # assuming 'src/build/all.gyp'
26 args += shlex.split(os.environ.get('NACL_GYP_FILE',
27 'native_client/build/all.gyp'))
29 # Add settings that are only included in the standalone NaCl Gyp
30 # build and won't get included when NaCl is built as part of another
31 # project, such as Chrome. configs.gypi includes compiler
32 # configuration that arguably should be built into Gyp; Chrome
33 # provides its own conflicting version in its common.gypi.
34 args += ['-I', 'native_client/build/configs.gypi']
35 # Enable warnings that we don't necessarily want to enable for
36 # Chrome source that is built as NaCl untrusted code.
37 args += ['-I', 'native_client/build/standalone_flags.gypi']
39 # Pick depth explicitly.
40 args += ['--depth', '.']
42 # Building NaCl as standalone (not as part of Chrome)
43 args += ['-D', 'nacl_standalone=1']
46 sys.exit(gyp.main(args))