summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2014-05-02 17:45:16 +0000
committerthakis@chromium.org <thakis@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2014-05-02 17:45:16 +0000
commitc2f33dbfd5b14c40f8c344788f2966fae3a764da (patch)
tree7d9690104ede697f13cd14cdea0e5489fdf68d77
parent152521d7f30794d72674e56e1a03271991b9c423 (diff)
downloadgyp-c2f33dbfd5b14c40f8c344788f2966fae3a764da.tar.gz
Append src path to compiler path retrieved from build configuration.
BUG=chromium:369487 TEST=./build/gyp_chromium succeeds in detecting include paths for eclipse generator on chromeos,linux using built in clang. Review URL: https://codereview.chromium.org/261063005/ Patch from Robert Flack <flackr@chromium.org>! git-svn-id: http://gyp.googlecode.com/svn/trunk@1912 78cadc50-ecff-11dd-a971-7dbc132099af
-rw-r--r--pylib/gyp/generator/eclipse.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pylib/gyp/generator/eclipse.py b/pylib/gyp/generator/eclipse.py
index 8d08f57e..718eb5d3 100644
--- a/pylib/gyp/generator/eclipse.py
+++ b/pylib/gyp/generator/eclipse.py
@@ -165,7 +165,7 @@ def GetAllIncludeDirectories(target_list, target_dicts,
return all_includes_list
-def GetCompilerPath(target_list, data):
+def GetCompilerPath(target_list, data, options):
"""Determine a command that can be used to invoke the compiler.
Returns:
@@ -173,13 +173,12 @@ def GetCompilerPath(target_list, data):
the compiler from that. Otherwise, see if a compiler was specified via the
CC_target environment variable.
"""
-
# First, see if the compiler is configured in make's settings.
build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
make_global_settings_dict = data[build_file].get('make_global_settings', {})
for key, value in make_global_settings_dict:
if key in ['CC', 'CXX']:
- return value
+ return os.path.join(options.toplevel_dir, value)
# Check to see if the compiler was specified as an environment variable.
for key in ['CC_target', 'CC', 'CXX']:
@@ -304,7 +303,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
eclipse_langs = ['C++ Source File', 'C Source File', 'Assembly Source File',
'GNU C++', 'GNU C', 'Assembly']
- compiler_path = GetCompilerPath(target_list, data)
+ compiler_path = GetCompilerPath(target_list, data, options)
include_dirs = GetAllIncludeDirectories(target_list, target_dicts,
shared_intermediate_dirs, config_name,
params, compiler_path)