Commit 95734dc8 authored by brettw@chromium.org's avatar brettw@chromium.org

Use ~/.gyp/include.gypi in GN build.

This also fixes the goma toolchain definition. My conditions syntax was missing a set of [].

R=scottmg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/140763006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245371 0039d316-1c4b-4281-b951-d872f2087c98
parent a3d61a1c
...@@ -129,6 +129,28 @@ def GetArgsStringForGN(supplemental_files): ...@@ -129,6 +129,28 @@ def GetArgsStringForGN(supplemental_files):
"""Returns the args to pass to GN. """Returns the args to pass to GN.
Based on a subset of the GYP variables that have been rewritten a bit.""" Based on a subset of the GYP variables that have been rewritten a bit."""
# Find the .gyp directory in the user's home directory.
home_dot_gyp = os.environ.get('GYP_CONFIG_DIR', None)
if home_dot_gyp:
home_dot_gyp = os.path.expanduser(home_dot_gyp)
if not home_dot_gyp:
home_vars = ['HOME']
if sys.platform in ('cygwin', 'win32'):
home_vars.append('USERPROFILE')
for home_var in home_vars:
home = os.getenv(home_var)
if home != None:
home_dot_gyp = os.path.join(home, '.gyp')
if not os.path.exists(home_dot_gyp):
home_dot_gyp = None
else:
break
if home_dot_gyp:
include_gypi = os.path.join(home_dot_gyp, "include.gypi")
if os.path.exists(include_gypi):
supplemental_files += [include_gypi]
vars_dict = GetGypVarsForGN(supplemental_files) vars_dict = GetGypVarsForGN(supplemental_files)
gn_args = '' gn_args = ''
......
...@@ -29,10 +29,10 @@ if (is_gyp) { ...@@ -29,10 +29,10 @@ if (is_gyp) {
# generator set. # generator set.
gyp_header = gyp_header =
"'conditions':" + "'conditions':" +
"['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" + "[['\"<(GENERATOR)\"==\"ninja\"', { 'make_global_settings': [" +
make_global_settings + make_global_settings +
make_goma_global_settings + make_goma_global_settings +
"]}]," "]}]],"
} else { } else {
gyp_header = "'make_global_settings': [" + make_global_settings + "]," gyp_header = "'make_global_settings': [" + make_global_settings + "],"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment