Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: tools/gn.py

Issue 2476343004: GN: Add an option to build against the Debian wheezy sysroot (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/linux/sysroot_scripts/install-sysroot.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn.py
diff --git a/tools/gn.py b/tools/gn.py
index d1d6656090463de1b1f8bd447982819fd68f2839..0a385f3ce87334444b23abb86be9bfde683358f3 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -113,11 +113,15 @@ def to_gn_args(args, mode, arch, target_os):
gn_args['is_asan'] = args.asan and gn_args['is_clang']
- if args.target_sysroot:
- gn_args['target_sysroot'] = args.target_sysroot
+ # Setup the user-defined sysroot.
+ if gn_args['target_os'] == 'linux' and args.wheezy:
+ gn_args['dart_use_wheezy_sysroot'] = True
+ else:
+ if args.target_sysroot:
+ gn_args['target_sysroot'] = args.target_sysroot
- if args.toolchain_prefix:
- gn_args['toolchain_prefix'] = args.toolchain_prefix
+ if args.toolchain_prefix:
+ gn_args['toolchain_prefix'] = args.toolchain_prefix
goma_dir = os.environ.get('GOMA_DIR')
goma_home_dir = os.path.join(os.getenv('HOME', ''), 'goma')
@@ -197,12 +201,16 @@ def ide_switch(host_os):
# Environment variables for default settings.
DART_USE_ASAN = "DART_USE_ASAN"
-
+DART_USE_WHEEZY = "DART_USE_WHEEZY"
def use_asan():
return DART_USE_ASAN in os.environ
+def use_wheezy():
+ return DART_USE_WHEEZY in os.environ
+
+
def parse_args(args):
args = args[1:]
parser = argparse.ArgumentParser(description='A script to run `gn gen`.')
@@ -234,6 +242,14 @@ def parse_args(args):
help='Disable ASAN',
dest='asan',
action='store_false')
+ parser.add_argument('--wheezy',
+ help='Use the Debian wheezy sysroot on Linux',
+ default=use_wheezy(),
+ action='store_true')
+ parser.add_argument('--no-wheezy',
+ help='Disable the Debian wheezy sysroot on Linux',
+ dest='wheezy',
+ action='store_false')
parser.add_argument('--goma',
help='Use goma',
default=True,
« no previous file with comments | « build/linux/sysroot_scripts/install-sysroot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698