Commit 82d48393 authored by André Magalhães's avatar André Magalhães Committed by Gustavo Noronha

Allow using a custom sysroot

parent 24a1509f
......@@ -167,6 +167,7 @@ def GetChromiumDefaultArgs():
if platform == 'linux':
defaults['use_sysroot'] = True
defaults['use_custom_sysroot'] = True
if platform == 'windows':
defaults['is_win_fastlink'] = False
......@@ -219,6 +220,7 @@ def GetRecommendedDefaultArgs():
# x86 build only: $ export GYP_DEFINES='target_arch=ia32'
# x86 or x64 build: $ gclient runhooks
result['use_sysroot'] = False
result['use_custom_sysroot'] = False
return result
......@@ -284,6 +286,7 @@ def ValidateArgs(args):
if platform == 'linux':
use_sysroot = GetArgValue(args, 'use_sysroot')
use_custom_sysroot = GetArgValue(args, 'use_custom_sysroot')
if platform == 'windows':
is_win_fastlink = GetArgValue(args, 'is_win_fastlink')
......@@ -304,7 +307,7 @@ def ValidateArgs(args):
assert target_cpu in ('x86', 'x64',
'arm'), 'target_cpu must be "x86", "x64" or "arm"'
if platform == 'linux':
if platform == 'linux' and not use_custom_sysroot:
if target_cpu == 'x86':
assert use_sysroot, 'target_cpu="x86" requires use_sysroot=true'
elif target_cpu == 'arm':
......@@ -491,7 +494,12 @@ def GetAllPlatformConfigs(build_args):
msg('Not generating %s configuration due to missing sysroot directory'
% cpu)
else:
supported_cpus = ['x64']
use_custom_sysroot = GetArgValue(args, 'use_custom_sysroot')
if use_custom_sysroot:
target_cpu = GetArgValue(args, 'target_cpu')
supported_cpus = [target_cpu]
else:
supported_cpus = ['x64']
elif platform == 'windows':
supported_cpus = ['x86', 'x64']
elif platform == 'macosx':
......
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