| Index: pylib/gyp/generator/ninja.py
|
| diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
|
| index 51c288b2164ff2e2b7aa337302ee946764b17be2..fe64461a34ed8ad9d1765d042709811e6dd3153f 100644
|
| --- a/pylib/gyp/generator/ninja.py
|
| +++ b/pylib/gyp/generator/ninja.py
|
| @@ -1672,7 +1672,7 @@ def CommandWithWrapper(cmd, wrappers, prog):
|
|
|
| def GetDefaultConcurrentLinks():
|
| """Returns a best-guess for a number of concurrent links."""
|
| - pool_size = int(os.getenv('GYP_LINK_CONCURRENCY', 0))
|
| + pool_size = int(os.environ.get('GYP_LINK_CONCURRENCY', 0))
|
| if pool_size:
|
| return pool_size
|
|
|
| @@ -1699,7 +1699,7 @@ def GetDefaultConcurrentLinks():
|
| # VS 2015 uses 20% more working set than VS 2013 and can consume all RAM
|
| # on a 64 GB machine.
|
| mem_limit = max(1, stat.ullTotalPhys / (5 * (2 ** 30))) # total / 5GB
|
| - hard_cap = max(1, int(os.getenv('GYP_LINK_CONCURRENCY_MAX', 2**32)))
|
| + hard_cap = max(1, int(os.environ.get('GYP_LINK_CONCURRENCY_MAX', 2**32)))
|
| return min(mem_limit, hard_cap)
|
| elif sys.platform.startswith('linux'):
|
| if os.path.exists("/proc/meminfo"):
|
| @@ -2277,7 +2277,11 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
|
| if flavor == 'mac':
|
| gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec)
|
|
|
| - build_file = gyp.common.RelativePath(build_file, options.toplevel_dir)
|
| + # If build_file is a symlink, we must not follow it because there's a chance
|
| + # it could point to a path above toplevel_dir, and we cannot correctly deal
|
| + # with that case at the moment.
|
| + build_file = gyp.common.RelativePath(build_file, options.toplevel_dir,
|
| + False)
|
|
|
| qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
|
| toolset)
|
|
|