Add src root support for chromium_src overrides.
This commit is contained in:
@@ -9,6 +9,7 @@ IS_WIN32 = sys.platform == 'win32'
|
||||
|
||||
def main():
|
||||
args = sys.argv[1:]
|
||||
append_root_src_include(args)
|
||||
brave_path = replace_cc_arg(args)
|
||||
if 'CC_WRAPPER' in os.environ:
|
||||
args = [os.environ['CC_WRAPPER']] + args
|
||||
@@ -22,6 +23,13 @@ def main():
|
||||
return cc_retcode
|
||||
|
||||
|
||||
def append_root_src_include(args):
|
||||
for arg in args:
|
||||
if arg.startswith('-I') and arg.endswith('brave/chromium_src'):
|
||||
args.append(arg + '/../../..')
|
||||
return
|
||||
|
||||
|
||||
def replace_cc_arg(args):
|
||||
# Interested in -c <path>.cc
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user