Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
| 8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
| 9 | 9 |
| 10 assert(is_android) | 10 assert(is_android) |
| (...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1499 _supports_android = invoker.supports_android | 1499 _supports_android = invoker.supports_android |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 _enable_errorprone = use_errorprone_java_compiler | 1502 _enable_errorprone = use_errorprone_java_compiler |
| 1503 if (!_chromium_code) { | 1503 if (!_chromium_code) { |
| 1504 _enable_errorprone = false | 1504 _enable_errorprone = false |
| 1505 } else if (defined(invoker.enable_errorprone)) { | 1505 } else if (defined(invoker.enable_errorprone)) { |
| 1506 _enable_errorprone = invoker.enable_errorprone | 1506 _enable_errorprone = invoker.enable_errorprone |
| 1507 } | 1507 } |
| 1508 | 1508 |
| 1509 _provider_configurations = [] | |
| 1510 if (defined(invoker.provider_configurations)) { | |
| 1511 _provider_configurations = invoker.provider_configurations | |
| 1512 } | |
| 1513 | |
| 1514 _processors = [] | |
| 1515 _enable_iterface_jars_javac = true | |
| 1516 if (defined(invoker.processors_javac)) { | |
| 1517 _processors = invoker.processors_javac | |
| 1518 _enable_iterface_jars_javac = false | |
|
agrieve
2016/06/01 16:51:43
nit: _enable_iterface_jars_javac = _processors ==
| |
| 1519 } | |
| 1520 | |
| 1521 _processor_args = [] | |
| 1522 if (defined(invoker.processor_args_javac)) { | |
| 1523 _processor_args = invoker.processor_args_javac | |
| 1524 } | |
| 1525 | |
| 1509 if (defined(invoker.enable_incremental_javac_override)) { | 1526 if (defined(invoker.enable_incremental_javac_override)) { |
| 1510 # Use invoker-specified override. | 1527 # Use invoker-specified override. |
| 1511 _enable_incremental_javac = invoker.enable_incremental_javac_override | 1528 _enable_incremental_javac = invoker.enable_incremental_javac_override |
| 1512 } else { | 1529 } else { |
| 1513 # Default to build arg if not overridden. | 1530 # Default to build arg if not overridden. |
| 1514 _enable_incremental_javac = enable_incremental_javac | 1531 _enable_incremental_javac = enable_incremental_javac |
| 1515 } | 1532 } |
| 1516 | 1533 |
| 1517 _manifest_entries = [] | 1534 _manifest_entries = [] |
| 1518 if (defined(invoker.manifest_entries)) { | 1535 if (defined(invoker.manifest_entries)) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1561 ] | 1578 ] |
| 1562 sources = _java_files + _java_srcjars | 1579 sources = _java_files + _java_srcjars |
| 1563 inputs = [ | 1580 inputs = [ |
| 1564 _build_config, | 1581 _build_config, |
| 1565 ] | 1582 ] |
| 1566 | 1583 |
| 1567 _rebased_java_srcjars = rebase_path(_java_srcjars, root_build_dir) | 1584 _rebased_java_srcjars = rebase_path(_java_srcjars, root_build_dir) |
| 1568 _rebased_depfile = rebase_path(depfile, root_build_dir) | 1585 _rebased_depfile = rebase_path(depfile, root_build_dir) |
| 1569 args = [ | 1586 args = [ |
| 1570 "--depfile=$_rebased_depfile", | 1587 "--depfile=$_rebased_depfile", |
| 1571 "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)", | |
| 1572 "--jar-path=$_rebased_jar_path", | 1588 "--jar-path=$_rebased_jar_path", |
| 1573 "--java-srcjars=$_rebased_java_srcjars", | 1589 "--java-srcjars=$_rebased_java_srcjars", |
| 1574 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", | 1590 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", |
| 1575 ] | 1591 ] |
| 1592 if (_enable_iterface_jars_javac) { | |
| 1593 args += [ "--classpath=@FileArg($_rebased_build_config:javac:interface_cla sspath)" ] | |
| 1594 } else { | |
| 1595 args += [ "--classpath=@FileArg($_rebased_build_config:javac:classpath)" ] | |
| 1596 } | |
| 1576 if (_enable_incremental_javac) { | 1597 if (_enable_incremental_javac) { |
| 1577 args += [ "--incremental" ] | 1598 args += [ "--incremental" ] |
| 1578 deps += [ "//third_party/jmake" ] | 1599 deps += [ "//third_party/jmake" ] |
| 1579 inputs += [ "$root_out_dir/bin/jmake" ] | 1600 inputs += [ "$root_out_dir/bin/jmake" ] |
| 1580 outputs += [ "${_javac_jar_path}.pdb" ] | 1601 outputs += [ "${_javac_jar_path}.pdb" ] |
| 1581 } | 1602 } |
| 1582 if (_supports_android) { | 1603 if (_supports_android) { |
| 1583 if (defined(invoker.alternative_android_sdk_ijar)) { | 1604 if (defined(invoker.alternative_android_sdk_ijar)) { |
| 1584 deps += [ invoker.alternative_android_sdk_ijar_dep ] | 1605 deps += [ invoker.alternative_android_sdk_ijar_dep ] |
| 1585 _android_sdk_ijar = invoker.alternative_android_sdk_ijar | 1606 _android_sdk_ijar = invoker.alternative_android_sdk_ijar |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 1597 if (_chromium_code) { | 1618 if (_chromium_code) { |
| 1598 args += [ "--chromium-code=1" ] | 1619 args += [ "--chromium-code=1" ] |
| 1599 } | 1620 } |
| 1600 if (_enable_errorprone) { | 1621 if (_enable_errorprone) { |
| 1601 deps += [ "//third_party/errorprone:chromium_errorprone" ] | 1622 deps += [ "//third_party/errorprone:chromium_errorprone" ] |
| 1602 args += [ | 1623 args += [ |
| 1603 "--use-errorprone-path", | 1624 "--use-errorprone-path", |
| 1604 "bin/chromium_errorprone", | 1625 "bin/chromium_errorprone", |
| 1605 ] | 1626 ] |
| 1606 } | 1627 } |
| 1628 foreach(e, _provider_configurations) { | |
| 1629 args += [ "--provider-configuration=" + rebase_path(e, root_build_dir) ] | |
| 1630 } | |
| 1631 foreach(e, _processors) { | |
| 1632 args += [ "--processor=" + e ] | |
| 1633 } | |
| 1634 foreach(e, _processor_args) { | |
| 1635 args += [ "--processor-arg=" + e ] | |
| 1636 } | |
| 1607 args += rebase_path(_java_files, root_build_dir) | 1637 args += rebase_path(_java_files, root_build_dir) |
| 1608 } | 1638 } |
| 1609 | 1639 |
| 1610 process_java_prebuilt(_process_prebuilt_target_name) { | 1640 process_java_prebuilt(_process_prebuilt_target_name) { |
| 1611 forward_variables_from(invoker, [ "jar_excluded_patterns" ]) | 1641 forward_variables_from(invoker, [ "jar_excluded_patterns" ]) |
| 1612 build_config = _build_config | 1642 build_config = _build_config |
| 1613 input_jar_path = _javac_jar_path | 1643 input_jar_path = _javac_jar_path |
| 1614 output_jar_path = _process_prebuilt_jar_path | 1644 output_jar_path = _process_prebuilt_jar_path |
| 1615 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { | 1645 if (defined(invoker.proguard_preprocess) && invoker.proguard_preprocess) { |
| 1616 proguard_preprocess = invoker.proguard_preprocess | 1646 proguard_preprocess = invoker.proguard_preprocess |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1774 compile_java(_compile_java_target) { | 1804 compile_java(_compile_java_target) { |
| 1775 forward_variables_from(invoker, | 1805 forward_variables_from(invoker, |
| 1776 [ | 1806 [ |
| 1777 "alternative_android_sdk_ijar", | 1807 "alternative_android_sdk_ijar", |
| 1778 "alternative_android_sdk_ijar_dep", | 1808 "alternative_android_sdk_ijar_dep", |
| 1779 "dist_jar_path", | 1809 "dist_jar_path", |
| 1780 "enable_errorprone", | 1810 "enable_errorprone", |
| 1781 "enable_incremental_javac_override", | 1811 "enable_incremental_javac_override", |
| 1782 "jar_excluded_patterns", | 1812 "jar_excluded_patterns", |
| 1783 "manifest_entries", | 1813 "manifest_entries", |
| 1814 "processors_javac", | |
| 1815 "processor_args_javac", | |
| 1784 "proguard_config", | 1816 "proguard_config", |
| 1785 "proguard_preprocess", | 1817 "proguard_preprocess", |
| 1818 "provider_configurations", | |
| 1786 ]) | 1819 ]) |
| 1787 jar_path = _jar_path | 1820 jar_path = _jar_path |
| 1788 build_config = _build_config | 1821 build_config = _build_config |
| 1789 java_files = _java_files | 1822 java_files = _java_files |
| 1790 srcjar_deps = _srcjar_deps | 1823 srcjar_deps = _srcjar_deps |
| 1791 srcjars = _srcjars | 1824 srcjars = _srcjars |
| 1792 chromium_code = _chromium_code | 1825 chromium_code = _chromium_code |
| 1793 supports_android = _supports_android | 1826 supports_android = _supports_android |
| 1794 emma_instrument = _emma_instrument | 1827 emma_instrument = _emma_instrument |
| 1795 deps = _accumulated_deps | 1828 deps = _accumulated_deps |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2314 | 2347 |
| 2315 args = [ | 2348 args = [ |
| 2316 "--depfile", | 2349 "--depfile", |
| 2317 rebase_path(depfile, root_build_dir), | 2350 rebase_path(depfile, root_build_dir), |
| 2318 "--script-output-path", | 2351 "--script-output-path", |
| 2319 rebase_path(generated_script, root_build_dir), | 2352 rebase_path(generated_script, root_build_dir), |
| 2320 ] | 2353 ] |
| 2321 args += test_runner_args | 2354 args += test_runner_args |
| 2322 } | 2355 } |
| 2323 } | 2356 } |
| OLD | NEW |