checkout_root = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir))
sys.path.insert(0, os.path.join(checkout_root, 'build'))
-sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
import gyp_chromium
import gyp_helper
import vs_toolchain
sys.path.insert(0, os.path.join(checkout_root, 'tools', 'gyp', 'pylib'))
import gyp
+def GetSupplementalFiles():
+ """Returns a list of the supplemental files that are included in all GYP
+ sources."""
+ # Can't use the one in gyp_chromium since the directory location of the root
+ # is different.
+ return glob.glob(os.path.join(checkout_root, '*', 'supplement.gypi'))
+
if __name__ == '__main__':
args = sys.argv[1:]
# If we didn't get a file, assume 'all.gyp' in the root of the checkout.
if not gyp_file_specified:
- args.append(os.path.join(checkout_root, 'all.gyp'))
+ # Because of a bug in gyp, simply adding the abspath to all.gyp doesn't
+ # work, but chdir'ing and adding the relative path does. Spooky :/
+ os.chdir(checkout_root)
+ args.append('all.gyp')
# There shouldn't be a circular dependency relationship between .gyp files,
args.append('--no-circular-check')
# Enforce gyp syntax checking. This adds about 20% execution time.
args.append('--check')
- supplemental_includes = gyp_chromium.GetSupplementalFiles()
+ supplemental_includes = GetSupplementalFiles()
gn_vars_dict = gyp_chromium.GetGypVars(supplemental_includes)
# Automatically turn on crosscompile support for platforms that need it.