aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Adding toolchain provider and function to Skylark.Gravatar John Cater2017-04-07
| | | | | Change-Id: Ied06efd4bc68f604975b1e8e3fc70817a577d563 PiperOrigin-RevId: 152412538
* Update incremental dexing helper flag defaultsGravatar kmb2017-04-06
| | | | | | RELNOTES: none PiperOrigin-RevId: 152340847
* Add missing @Test annotations to JUnit 4 tests, reduce the visibility of ↵Gravatar Googler2017-04-06
| | | | | | | | | | | | test helper methods to prevent them from being confused for tests, or add @Ignore to purposely disabled tests. This paves the way for unknown commit, which will cause Blaze to complain when methods that look like test methods are not annotated with @Test. For more details and FAQs please see:[] Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 152309039
* Move ConfigSetting into rules/config.Gravatar mstaib2017-04-06
| | | | | | | | | | | | | | | ConfigSetting was previously in analysis/config, where it was slightly out of place (as it is a rule, not an integral part of the analysis backend). This is also necessary to integrate it with ConfigFeatureFlag, as otherwise this would be a circular dependency (analysis/config <-> rules/config). ConfigFeatureFlagRule itself has been moved into ConfigRuleClasses, where it can use the ConfigBaseRule and the nonconfigurable reason from the other configuration rules. RELNOTES: None. PiperOrigin-RevId: 152275823
* Expose platform-related providers to Skylark.Gravatar John Cater2017-04-06
| | | | | Change-Id: I7615d3e6e33e0c48f18b2506a135f45ce3705a38 PiperOrigin-RevId: 152256914
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Remove jack support and make jack/jill attributes of android_sdk optional.Gravatar ajmichael2017-04-04
| | | | | | | | | Closes https://github.com/bazelbuild/bazel/issues/1391. RELNOTES: Removed --experimental_use_jack_for_dexing and libname.jack output of android_library. PiperOrigin-RevId: 152131075
* Rename the ToolchainProvider to a more accurate name (and free up the name ↵Gravatar jcater2017-04-03
| | | | | | | | for the new ToolchainProvider). Change-Id: I3537e1ed924c598707759c4a7040d5ba00de559c PiperOrigin-RevId: 151853764
* Add flag to compress all Java resources before bundling them into the APK.Gravatar ajmichael2017-04-03
| | | | | | | RELNOTES: Add --experimental_android_compress_java_resources flag to store java resources as compressed inside the APK. PiperOrigin-RevId: 151825809
* Strict proto deps: handle direct protos in external repositories.Gravatar carmi2017-03-31
| | | | | | RELNOTES: None PiperOrigin-RevId: 151786403
* Build android_binary APKs with Singlejar by default.Gravatar ajmichael2017-03-31
| | | | | | | | | This will improve android_binary build times and allow Bazel to remove a dependency on our forked version of the deprecated ApkBuilderMain. RELNOTES: None PiperOrigin-RevId: 151749709
* Add the config_feature_flag rule.Gravatar mstaib2017-03-31
| | | | | | | | | | | | | | This rule allows users to define flags as part of the Bazel configuration. These flags will be select-able through a new attribute on config_setting, and settable through transitions within certain special rules. This rule is currently not supported by any other rules, not even config_setting, and its values cannot be set; accordingly, it's not very useful yet. RELNOTES: None. PiperOrigin-RevId: 151746523
* Automated g4 rollback of commit 05300b5945286f6063afbf1d16c9c8e5621c4828.Gravatar jmmv2017-03-31
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks inclusion of C++ system headers. *** Original change description *** Extract --sysroot flag from blaze and move it into crosstool RELNOTES: None. PiperOrigin-RevId: 151742077
* Move ResourceFilter into AndroidConfigurationGravatar Googler2017-03-31
| | | | | | | | | Once the ResourceFilter object is in AndroidConfiguration, we can start tweaking it using dynamic configuration (next review). RELNOTES: none PiperOrigin-RevId: 151737284
* Remove RuleContext from ResourceFilter stateGravatar Googler2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RuleContext object is not available when creating dynamic configuration transitions. Removing it from ResourceFilter's state allows us to work with ResourceFilter objects while creating those transitions. If we didn't do this, we'd need to seperate the rest of ResourceFilter's state into a seperate class so that we could work with it as part of doing dynamic configurations. In the next reviews, I'll start actually creating dynamic configurations based on ResourceFilter state. Also, create a withAttrsFrom method that can be used in dynamic configuration transitions, and generally migrate methods that work with attributes from RuleContext to AttributeMap when practical. To support these changes: No longer keep the parsed lists of FolderConfiguration and Density objects as fields of the ResourceFilter, instead, write functions that get them when needed. We want to have access to a RuleContext when we initialize them to avoid errors, and we don't have one in the withAttrsFrom method which will be called as part of transitioning with dynamic configurations. We no longer have those parsed lists to represent whether the object filters during execution or analysis, so replace them with a seperate enum field for filter behavior. Include a FILTER_IN_ANALYSIS_WITH_DYNAMIC_CONFIGURATION option, even though it won't fully be used until the dynamic configuration transition is taken advantage of in the next few reviews. RELNOTES: none PiperOrigin-RevId: 151715400
* Extract --sysroot flag from blaze and move it into crosstoolGravatar hlopko2017-03-31
| | | | | | RELNOTES: None. PiperOrigin-RevId: 151688820
* Partial rollback of commit 5e1a420f1b385382a2df5359faf3ae773aa8d61e.Gravatar Googler2017-03-31
| | | | | | | | | | *** Reason for rollback *** Breaks tests that expected previous id generation order. RELNOTES: None. PiperOrigin-RevId: 151638886
* Init absent action configs for CppCompile actionsGravatar hlopko2017-03-29
| | | | | | | | | | | So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 151575045
* A flag to control the outputs that cc_proto_library expects from proto-compiler.Gravatar Carmi Grushko2017-03-28
| | | | | | -- PiperOrigin-RevId: 151381769 MOS_MIGRATED_REVID=151381769
* Rename ToolchainLookup rule to ToolchainType, to better explain the usage ofGravatar John Cater2017-03-28
| | | | | | | | | | | | | | | | | | | | the rule. Example: tools/newlang/BUILD: toolchain_type(name = "toolchain_type") Allows users to refer to //tools/newlang:toolchain_type when discussing the newlang toolchain. The previous usage: tools/newlang/BUILD: toolchain_lookup(name = "lookup") Lead to labels like //tools/newlang:lookup, which was unclear that each language's toolchain needs one unique instance of toolchain_(lookup|type). -- PiperOrigin-RevId: 151326827 MOS_MIGRATED_REVID=151326827
* Move -Wl,--gdb-index into crosstoolGravatar Marcel Hlopko2017-03-27
| | | | | | -- PiperOrigin-RevId: 151302418 MOS_MIGRATED_REVID=151302418
* introduce hidden flag to configure bytecode optimizersGravatar Kevin Bierhoff2017-03-27
| | | | | | -- PiperOrigin-RevId: 151170448 MOS_MIGRATED_REVID=151170448
* Un-rollback and fix bugs in resource density filteringGravatar Googler2017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rollback of commit df366408188f0451bae9b2ed079c795a4beb2e2b. In addition to undoing the rollback of my previous change, fix the bugs it introduced and add tests for those bugs. Always ignore empty filters. Empty filters are always useless or counterproductive. Before the original change, empty filters as a single item within the list of filters (e.g., ["en", ""]) were ignored, but empty filters as a portion of a string in the list (e.g., ["en,"]) were not. I can't imagine any reason people would actually want the empty filter (if it were handled correctly, it would effectively tell Bazel to just ignore every other filter the user passed in). Since it makes more sense with the new code, represent the stringified filters as a list of strings, rather than a single string of comma-seperated values. Manually trim whitespace from each token. Before the original change, the code trimmed whitespace following commas (e.g., ["en, es"] -> ["en,es"]) but not otherwise. If we're allowing whitespace in filter strings anyway, there doesn't seem to be any reason to allow it in some places but not others. -- PiperOrigin-RevId: 151128685 MOS_MIGRATED_REVID=151128685
* Rollback of commit bd40871283a54268945dcb0c47c0326645ffda18.Gravatar Googler2017-03-24
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the correct changes to the AndroidResourceMergingAction. Tested manually. *** Original change description *** Automated [] rollback of commit a58f245a4b40c0ef961b1f30d96b16a9349711c3. *** Reason for rollback *** broke over 100k targets, in the depot, see [] *** Original change description *** Move library R generation to a separate action, ensuring the merging happens off the java critical path. -- PiperOrigin-RevId: 151087737 MOS_MIGRATED_REVID=151087737
* FlagSet.with_feature can be used to condition the application of the FlagSet ↵Gravatar Cal Peyser2017-03-24
| | | | | | | | on the presence of features. -- PiperOrigin-RevId: 151038811 MOS_MIGRATED_REVID=151038811
* Rollback of commit 1e18045ed9d6ab9c945cec69286a7d8bd288a507.Gravatar Tobias Werth2017-03-23
| | | | | | -- PiperOrigin-RevId: 151000602 MOS_MIGRATED_REVID=151000602
* Add an optional coverage_files argument to cc_toolchainGravatar Googler2017-03-22
| | | | | | | | | | | | Allow toolchains to specify precisely the files required to run code coverage tools (e.g. gcov). If not specifed, default to the existing behaviour of supplying the whole crosstool. RELNOTES[NEW]: Optional coverage_files attribute to cc_toolchain -- PiperOrigin-RevId: 150878146 MOS_MIGRATED_REVID=150878146
* Filter android_binary resources by screen density in the analysis phaseGravatar Googler2017-03-22
| | | | | | | | | | | | | | In addition to filtering android_binary resources by resource_configuration_filters, we also filter by densities. Doing this in analysis rather than execution should also result in a speed-up as there's no need to copy files unwanted for actions to use. This behavior is controlled by the same object and flags that already control resource configuration filtering, simplifying the code. -- PiperOrigin-RevId: 150871620 MOS_MIGRATED_REVID=150871620
* Open source AndroidLibraryTestGravatar Adam Michael2017-03-22
| | | | | | -- PiperOrigin-RevId: 150764277 MOS_MIGRATED_REVID=150764277
* Rollback of commit 65a9bc9a79a660291210719862bc194a87311943.Gravatar Googler2017-03-22
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Root cause for issue addressed in unknown commit so rolling back rollback. *** Original change description *** Automated [] rollback of commit e450c00bf487c711f9b0615e9eb89980c5732b4a. *** Reason for rollback *** Breaks nightly, see []. *** Original change description *** Inject aidl_lib only to android_library targets that have idl_srcs -- PiperOrigin-RevId: 150751650 MOS_MIGRATED_REVID=150751650
* RELNOTES[NEW]: If grte_top is a label, it can now follow non-configurable ↵Gravatar Googler2017-03-21
| | | | | | | | redirects. -- PiperOrigin-RevId: 150647389 MOS_MIGRATED_REVID=150647389
* Define the ConfigFeatureFlagConfiguration fragment.Gravatar Michael Staib2017-03-21
| | | | | | | | | | | | This will eventually be used to store the values of user-defined configuration flags, once such a rule is added. Because this rule does not exist yet, this fragment is currently not part of the rule class provider. This will have to be done when that rule is turned on. -- PiperOrigin-RevId: 150638292 MOS_MIGRATED_REVID=150638292
* Support aliases in the --experimental_stl attribute.Gravatar Lukacs Berki2017-03-20
| | | | | | -- PiperOrigin-RevId: 150610613 MOS_MIGRATED_REVID=150610613
* Fix AndroidBinaryTest on Windows.Gravatar Adam Michael2017-03-20
| | | | | | -- PiperOrigin-RevId: 150501599 MOS_MIGRATED_REVID=150501599
* Open source some tests for android_binary.Gravatar Adam Michael2017-03-20
| | | | | | -- PiperOrigin-RevId: 150484382 MOS_MIGRATED_REVID=150484382
* Open source ApkManifestActionTest.Gravatar Adam Michael2017-03-20
| | | | | | -- PiperOrigin-RevId: 150468384 MOS_MIGRATED_REVID=150468384
* Refactor scheduling of LTO Backend actions into CppLinkActionBuilderGravatar Googler2017-03-14
| | | | | | | | | | | | This was suggested in the review for unknown commit, which adds ThinLTO support to another client of CppLinkActionBuilder. The change required changing the constructor to take a FdoSupportProvider object instead of a FdoSupport object, so required changes to all callers. -- PiperOrigin-RevId: 150060046 MOS_MIGRATED_REVID=150060046
* Open-source AndroidCommonTest.java.Gravatar Adam Michael2017-03-14
| | | | | | -- PiperOrigin-RevId: 150019297 MOS_MIGRATED_REVID=150019297
* Add the remote_execution_properties attribute to the platform() rule. Gravatar John Cater2017-03-12
| | | | | | | | | | Part of #2219. -- Change-Id: Id82bdd5b3dfab1d2ea781d27dd98020966ce8fac Reviewed-on: https://cr.bazel.build/9271 PiperOrigin-RevId: 149782572 MOS_MIGRATED_REVID=149782572
* Add java_common.create_provider to allow creating a java_common.provider Gravatar Irina Iancu2017-03-10
| | | | | | | | | | from already compiled jars. Progress on #2614. -- PiperOrigin-RevId: 149750579 MOS_MIGRATED_REVID=149750579
* Make Bazel build with MSVC-default-toolchain Bazel Gravatar Yun Peng2017-03-08
| | | | | | | | | | | | | After this change, a msys bazel can be built with a MSVC-default Bazel by adding --cpu=x64_windows_msys --host=x64_windows_msys See https://github.com/bazelbuild/bazel/issues/2627 -- Change-Id: Iaa82bf4dd911c5740b98d3b2739dfccca6203f79 Reviewed-on: https://cr.bazel.build/9293 PiperOrigin-RevId: 149532274 MOS_MIGRATED_REVID=149532274
* Introduce strip_debug_symbols feature to crosstoolGravatar Marcel Hlopko2017-03-08
| | | | | | | | | This cl removes hard coded -Wl,-S flag from Blaze and moves it to the crosstool. -- PiperOrigin-RevId: 149525225 MOS_MIGRATED_REVID=149525225
* Do not create symlink pointing at itself with ↵Gravatar Marcel Hlopko2017-03-08
| | | | | | | | | | | | | | | strip_include_prefix/include_prefix This cl fixes a bug when strip_include_prefix and include_prefix are used in such a way that the resulting virtual header is be accessible from the same path as the original header and bazel would attempt to create symlink pointing at itself. Fixes #2635 -- PiperOrigin-RevId: 149524480 MOS_MIGRATED_REVID=149524480
* Add platform rule to define a platform as a collection of constraint values.Gravatar John Cater2017-03-02
| | | | | | | | | | Part of ongoing work on #2219. -- Change-Id: Ie4e842a5d8218e47f41a954c2b955ab24237aa65 Reviewed-on: https://cr.bazel.build/9116 PiperOrigin-RevId: 148976893 MOS_MIGRATED_REVID=148976893
* Add constraint_setting and constraint_value rules, to enable defining Gravatar John Cater2017-02-28
| | | | | | | | | | | | platform-related constraints and values. Part of ongoing work on #2219. -- Change-Id: Ice370ee26469f4992faf72c0c95a1a3e51a9f9e7 Reviewed-on: https://cr.bazel.build/9091 PiperOrigin-RevId: 148758190 MOS_MIGRATED_REVID=148758190
* Clean up the semantics of input discovering actions a bit by making ↵Gravatar Lukacs Berki2017-02-28
| | | | | | | | | | | | updateInputs() and inputsKnown() non-overridable and removing setInputs(). This comes at the cost of adding a flag to every action instance that's not used for non-input-discovering actions, but I think that's a deal. Simpler APIs are good, mmmmkay? Also fixed a few pre-existing issues in TestAction and ObjcCompileAction. -- PiperOrigin-RevId: 148749734 MOS_MIGRATED_REVID=148749734
* Move UnixFileSystem to lib.unix, WindowsFileSystem to lib.windowsGravatar Ulf Adams2017-02-28
| | | | | | -- PiperOrigin-RevId: 148749485 MOS_MIGRATED_REVID=148749485
* Provide more reporting options to SkyFunctions Gravatar Klaus Aehlig2017-02-27
| | | | | | | | | | | | | With more specific information to be reported by Skyfunctions, e.g., to inform the build-event protocol on missing files, the EventHandler interface is no longer enough. Therefore, provide an enriched context for reporting events. -- Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8 Reviewed-on: https://cr.bazel.build/8794 PiperOrigin-RevId: 148463437 MOS_MIGRATED_REVID=148463437
* Expose rpath entries as a build variableGravatar Marcel Hlopko2017-02-24
| | | | | | | | Unlike commit e2239cc61ca170ff9a65e1a94c3344d2b272c9e2, this only adds "." to the rpath if isNativeDeps is true. -- PiperOrigin-RevId: 148330144 MOS_MIGRATED_REVID=148330144
* Progress on Skylarkified java_lite_proto_library.Gravatar Irina Iancu2017-02-20
| | | | | | | | | | * Exposed transitive_runtime_jars from the former black-box JavaProvider. * Added support for aliases. * Returned the runfiles from the Skylark rule of java_lite_proto_library. -- PiperOrigin-RevId: 147834471 MOS_MIGRATED_REVID=147834471