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

Unified Diff: build/android/gyp/javac.py

Issue 1213433007: Add -bootclasspath argument to javac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase path Created 5 years, 5 months 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/all.gyp ('k') | build/android/tests/multiple_proguards/AndroidManifest.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/javac.py
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index c8f0dae9bd19e3535e037b2bf1beed3bfda17f8b..4a9b9cdac58b3c1d51facf378fcfc96f9cd12d6c 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -66,7 +66,7 @@ ERRORPRONE_OPTIONS = [
]
def DoJavac(
- classpath, classes_dir, chromium_code,
+ bootclasspath, classpath, classes_dir, chromium_code,
use_errorprone_path, java_files):
"""Runs javac.
@@ -91,6 +91,10 @@ def DoJavac(
'-target', '1.7',
'-classpath', ':'.join(classpath),
'-d', classes_dir]
+
+ if bootclasspath:
+ javac_args.extend(['-bootclasspath', ':'.join(bootclasspath)])
+
if chromium_code:
# TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed.
javac_args.extend(['-Xlint:unchecked'])
@@ -181,6 +185,12 @@ def main(argv):
default=[],
help='List of srcjars to include in compilation.')
parser.add_option(
+ '--bootclasspath',
+ action='append',
+ default=[],
+ help='Boot classpath for javac. If this is specified multiple times, '
+ 'they will all be appended to construct the classpath.')
+ parser.add_option(
'--classpath',
action='append',
help='Classpath for javac. If this is specified multiple times, they '
@@ -223,6 +233,10 @@ def main(argv):
if options.main_class and not options.jar_path:
parser.error('--main-class requires --jar-path')
+ bootclasspath = []
+ for arg in options.bootclasspath:
+ bootclasspath += build_utils.ParseGypList(arg)
+
classpath = []
for arg in options.classpath:
classpath += build_utils.ParseGypList(arg)
@@ -236,7 +250,7 @@ def main(argv):
src_gendirs = build_utils.ParseGypList(options.src_gendirs)
java_files += build_utils.FindInDirectories(src_gendirs, '*.java')
- input_files = classpath + java_srcjars + java_files
+ input_files = bootclasspath + classpath + java_srcjars + java_files
with build_utils.TempDir() as temp_dir:
classes_dir = os.path.join(temp_dir, 'classes')
os.makedirs(classes_dir)
@@ -259,6 +273,7 @@ def main(argv):
if len(java_files) != 0:
DoJavac(
+ bootclasspath,
classpath,
classes_dir,
options.chromium_code,
« no previous file with comments | « build/all.gyp ('k') | build/android/tests/multiple_proguards/AndroidManifest.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698