aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Tests + cleanup + docs for ctx.actions.declare_{file,directory}Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160273273
* Add 'ctx.actions.declare_directory'Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160267763
* Add 'ctx.actions' and implement 'ctx.action.declare_file'.Gravatar dslomov2017-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 160264501
* LLVM FDO zipped profiles contain the LLVM raw profile file whose contentsGravatar Googler2017-06-27
| | | | | | | | | | | | | are named fdocontrolz_gen_profile.profraw. LLVM zipped profiles are obtained via fdocontrolz which names the raw profile file fdocontrol_gen_profile.profraw. Previously, this file was named to be identical to the zip file but that had to be changed as users want to retain the ability to rename the zip file. RELNOTES[NEW]: Change to handle LLVM FDO zipped profile contents correctly. PiperOrigin-RevId: 160230719
* Add idl_preprocessed field to android_library.Gravatar Googler2017-06-27
| | | | | RELNOTES: Add idl_preprocessed attribute to android_library, so that preprocessed aidl files can be passed to android_library for compiling PiperOrigin-RevId: 160185474
* Add the ability to provide source_jars to java_common.create_providerGravatar Googler2017-06-27
| | | | | | | | This should allow macros using 'custom rule' + java_import to move the full java_import logic into their rule implementation. Also, fix the definition so that the default values work and the keyword args can be omitted. PiperOrigin-RevId: 160167191
* Add JavaSkylarkApiProvider to aar_import rule.Gravatar Googler2017-06-26
| | | | | | | Without this, aar_import targets will not have java attribute in skylark, therefore not able to generate any ide info by intellij_info_aspect in intellij_info.bzl. RELNOTES: None. PiperOrigin-RevId: 160146803
* Enabling Aapt2 processing:Gravatar corysmith2017-06-26
| | | | | | | | | | | | * Add a new aapt_version attribute to android_binary * Add a new android_aapt_version flag to control the version of aapt used. * Add a new implicit output for aapt2 produced static libraries. * Add a new implicit output for aapt2 produced .flat files zip. RELNOTES: New property on android_sdk: aapt2 Choose the version of aapt on android_binary PiperOrigin-RevId: 160145530
* Remove usage of --ios_cpu from Bazel.Gravatar cpeyser2017-06-26
| | | | PiperOrigin-RevId: 160143322
* ResourceFilter properly handles special language qualifiersGravatar Googler2017-06-26
| | | | | | | | | | | | | | | | | | | | Two special types of language qualifiers are commonly used: Serbian can be written in Latin or Cyrillic characters. Serbian in Latin characters is referred to as sr-Latn (or, with a misplaced region prefix, sr-rLatn, or with the permutation common in some code for the old verions of regions supported by Aapt, sr_Latn). Spanish spoken across Latin America and the Caribbean can be represented by es-419 (or, using the permutation for old qualifier formats, es_419). For both of these, transform the resource qualifier into an appropriate BCP-47 representation that can be handled by FolderConfiguration. Also, add attribute warnings when these qualifiers are used in their specially-handled form (instead of in BCP-47 form). RELNOTES: none PiperOrigin-RevId: 160143247
* Remove remaining xcodegen references.Gravatar schmitt2017-06-26
| | | | | | | Deletes last code references to xcodegen tool as well as tool itself. RELNOTES: None. PiperOrigin-RevId: 160137807
* Automated rollback of commit 68b9a7e2dc17e32b194238d287e79bee1ba035b9.Gravatar cushon2017-06-26
| | | | | | | | | *** Reason for rollback *** The depot is fixed RELNOTES: None. PiperOrigin-RevId: 160115070
* Add apple_stub_binary rule.Gravatar allevato2017-06-26
| | | | | | | | This rule will be used by the Skylark bundling rules for product types that use stub binaries copied out of the SDK instead of user-built binaries. RELNOTES: None. PiperOrigin-RevId: 159998782
* Fix NullPointerException when enable_data_binding is omitted.Gravatar gregce2017-06-26
| | | | | | | | | DataBinding.isEnabled has outdated logic that enabled data binding for a rule even if only its deps use data binding. It's now required for all rules up the dependency chain to explictily enable data binding. RELNOTES: None. PiperOrigin-RevId: 159998478
* Remove last traces of experimental_obj_libraryGravatar cparsons2017-06-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 159990790
* Remove last implicit dep on //tools/objc:xcodegenGravatar schmitt2017-06-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 159837451
* Expose the correct JavaSkylarkApiProvider from JavaProtoAspect.Gravatar tomlu2017-06-26
| | | | | | To unblock, regression tests for the breakage will come in a follow-up CL. PiperOrigin-RevId: 159829368
* Do not use link_dynamic_library.sh when toolchain doesn't support interface ↵Gravatar hlopko2017-06-26
| | | | | | | | | | | | | | | libraries Before, Bazel would always use link_dynamic_library.sh, even though the toolchain doesn't support interface libraries and therefore its arguments would always be "no ignored ignored ignored". And since link_dynamic_library.sh is a shell script, it unnecessarily complicates the Windows toolchain. This cl also removes the script as a dependency of the toolchain (so it won't be set as an input of c++ actions). RELNOTES: None. PiperOrigin-RevId: 159827038
* Make FakeCppCompileAction.LOG lowercaseGravatar hlopko2017-06-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 159811352
* Make Metadata fields privateGravatar ulfjack2017-06-22
| | | | | | | | | | | | | Adjust the interface of Metadata to match the interface of FileArtifactValue. These classes are almost the same, but not quite, so we currently have to create and return new objects whenever the MetadataHandler is called; by making the interfaces identical, we can just return a FileArtifactValue instead (in a future change). This is in preparation for merging the ActionInputFileCache and MetadataHandler interfaces. PiperOrigin-RevId: 159802834
* Fix LIPO to ThinLTO mapping to work with AutoFDO.Gravatar Googler2017-06-22
| | | | | | | | LIPO to ThinLTO mapping was added in https://github.com/bazelbuild/bazel/commit/c61f86f56b86e442369725ad79299ccc5519b000. This fixes a bug to ignore lipo context when compiler is LLVM. RELNOTES:None PiperOrigin-RevId: 159776286
* Fix source jars no longer being exposed to Skylark from java_library.Gravatar tomlu2017-06-22
| | | | | | | | | | Regression test added for java_library. Unfortunately, due to the nature of the skylark provider, similar regression tests should probably be added to every Java providing rule. In the long term, the better solution is to expose JavaProvider directly and remove JavaSkylarkApiProvider. Fixes #3238 PiperOrigin-RevId: 159748655
* In the Blaze Query implementation, use Set and Map implementations backed by ↵Gravatar nharmata2017-06-22
| | | | | | | the same KeyExtractor used that the Uniquifier implementation uses. This fixes a hypothetical issue where we were previously relying on Target#equals/hashCode. RELNOTES: None PiperOrigin-RevId: 159741545
* Add back --sysroot argument for objc compile actions when grte_top is specified.Gravatar rduan2017-06-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 159740106
* Use tool from action_config for link-executable and link-dynamic-lib actionsGravatar hlopko2017-06-21
| | | | | | | | | | This cl finishes the last bit of c++ linking actions migration to crosstool's action_configs. From now on, the action_config { tool_path: ... } will be used, instead of top level tool { path: ... }. RELNOTES: Bazel now uses tools from action_configs in Crosstool by default (as oposed to using top level tools). PiperOrigin-RevId: 159677525
* Introduce --incompatible_depset_is_not_iterableGravatar laurentlb2017-06-21
| | | | | | | RELNOTES: Iterating on a `depset` object is deprecated. If you need an iterable, call the `.to_list()` method first. PiperOrigin-RevId: 159672887
* Fix Android data binding for rules with no direct resources.Gravatar gregce2017-06-21
| | | | | | | | | | | | | | This essentially works by activating the annotation processor over such rules, even though technically that's unnecessary (since there are no new resources to process). But running the annotation processor guarantees we still process deps' resources, which guarantees the Java compiler references any Java classes mentioned in those resources. This prevents JavaBuilder's ---reduce_classpath from pruning these files out of the compilation classpath because "they were never used". PiperOrigin-RevId: 159597671
* Move WrappingProviderHelper into static class in WrappingProvider.Gravatar Googler2017-06-20
| | | | | | Cuts down on file count and makes it easier to find these methods. PiperOrigin-RevId: 159560422
* Document JavaSkylarkApiProvider static factory methods and remove one ↵Gravatar Googler2017-06-20
| | | | | | constructor. PiperOrigin-RevId: 159557168
* Use ProtoJavaApiInfoAspectProvider.merge instead of ad-hoc method.Gravatar carmi2017-06-20
| | | | | RELNOTES: None PiperOrigin-RevId: 159553343
* Introduce is_cc_test build variable so we can migrate away from ↵Gravatar hlopko2017-06-20
| | | | | | | | | | | | | is_not_cc_test_link_action If only hlopko@ used brain when he introduced is_not_cc_test_link_action he would realize that the current values make it impossible to migrate away from them. This cl introduces new build variable with boolean value. Then I can update internal crosstools to use expand_if_true/false, and then I can remove is_not_cc_test_link_action. RELNOTES: None. PiperOrigin-RevId: 159549814
* TestAttempt: remove unused constructorsGravatar aehlig2017-06-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 159537816
* apple_binary "dylibs" attribute depends on AppleDynamicFrameworkProviderGravatar cparsons2017-06-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 159496805
* Roll back ↵Gravatar cushon2017-06-20
| | | | | | | | | | | | https://github.com/bazelbuild/bazel/commit/4929ad79865f8c13ef3b33c827040f4a037e4afe And use params files for turbine actions with transitive classpaths For actions where direct deps cannot be used, turbine spawns should always use params files. The transitive classpath may exceed the command line length limit. PiperOrigin-RevId: 159473987
* Create a general WrappingProvider concept and use for java_proto_library and ↵Gravatar Googler2017-06-20
| | | | | | | | | | | | friends. The wrapping provider contains its own provider map containing any providers that may conflict. This can be used generally for any aspect that wants to override its base providers (during migration), and due to the generality we should be able to cut down on code size and complexity. Once we have this, we can more easily and uniformly bind aspects to Skylark for aspect-on-aspect functionality. The Skylark providers can be instantiated with a wrapping provider if one is present, or fall through to the base target if they aren't. We will also likely save a bit of memory from cutting down on wrapping classes. PiperOrigin-RevId: 159461325
* Pass the unsigned apk and the keystore to ApkProvider.Gravatar Googler2017-06-20
| | | | | RELNOTES: None PiperOrigin-RevId: 159460633
* All java_xxx_proto_library to provide JavaProvider ("java_common").Gravatar carmi2017-06-20
| | | | | RELNOTES: None PiperOrigin-RevId: 159438707
* Rule functions should return None instead of internal Rule objectsGravatar vladmos2017-06-20
| | | | PiperOrigin-RevId: 159438112
* Extract ActionContext to a top-level classGravatar ulfjack2017-06-19
| | | | PiperOrigin-RevId: 159423459
* Rewrite the Executor/ActionExecutionContext splitGravatar ulfjack2017-06-19
| | | | | | | Move everything to ActionExecutionContext, and drop Executor whereever possible. This clarifies the API, makes it simpler to test, and simplifies the code. PiperOrigin-RevId: 159414816
* Roll forward R generation for Robolectric behind a flag to enable testingGravatar Googler2017-06-19
| | | | | RELNOTES: none PiperOrigin-RevId: 159263527
* Automated g4 rollback of commit 923d7df521f67d031b288180560848bd35e20976.Gravatar brandjon2017-06-19
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks dozens of targets in the nightly with Tool Failure errors *** Original change description *** Clean up turbine action creation Support disabling javac fallback for actions without a direct classpath, and only use the 'JavacTurbine' mnemonic for spawns that require javac-turbine due to annotation processing to make it easier to collect metrics on that. Finally, remove --java_header_compilation_direct_classpath now that it has been productionized and enabled by default. PiperOrigin-RevId: 159260596
* Ban the combination of buildfiles/loadfiles and --output=location.Gravatar nharmata2017-06-19
| | | | | | RELNOTES[INC]: The --output=location flag to 'bazel query' cannot be used with query expressions that involve the 'buildfiles' or 'loadfiles' operators. This also applies to 'genquery' rules. PiperOrigin-RevId: 159259061
* ResourceFilter persists ordering of resources when filteringGravatar Googler2017-06-19
| | | | | | | | | | | | Before this change, resource filtering by densities could rearrange the ordering of resources. However, resource merging behavior is dependant on resource ordering, so changing the order could lead to changed merge results. Instead, ensure that the filtered resources appear in the same order as they did in the original list of resources. RELNOTES: none PiperOrigin-RevId: 159219647
* Fix duplication and re-ordering issues in ExternalPackageUtil.Gravatar John Cater2017-06-16
| | | | | Change-Id: Ie0e64b2e03f5208bc3a6d9522f25e7f11ec4dbd5 PiperOrigin-RevId: 159156497
* Automated g4 rollback of commit da56606563ee9df438db93392f681bf2abb4ac97.Gravatar brandjon2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | NO_SQ=Only failing TAP targets in our project are from an unrelated bug. *** Reason for rollback *** Initially we thought this broke just a few builds that were fixed in the depot. The scope is wider than that, affecting at least these two targets: [] [] There are hundreds of other failures in the TGP results that we haven't traced to a cause yet, but it's troubling that this CL was implicated twice in the small sampling I did. [] *** Original change description *** Use JavaCompilationArtifacts instead of JavaCompilationArgs to store Java compilation artifacts. Round-tripping through JavaCompilationArgs loses dependency information that upstream compilations use to optimize compile time classpaths. PiperOrigin-RevId: 159154375
* Rollback the copt-changing functionality of the extension_safe attributeGravatar cparsons2017-06-16
| | | | | | | | | | This change impacted build times of builds with libraries that needed to be built both extension-safe and non-extension-safe. This also caused duplicate symbol issues in such builds. The extension_safe attribute will now be a no-op, with subsequent removal to follow. RELNOTES: The extension_safe attribute of apple_binary no longer validates transitive dependencies are compiled against extension_safe APIs. PiperOrigin-RevId: 159142000
* Fix resource filtering bug in interaction between densities and API versionGravatar Googler2017-06-16
| | | | | | | | | | | | | | | | | | | | ResourceFilter, following Aapt's behavior, ignored the 'version' qualifier. However, ResourceFilter also filters by densities, which is not supposed to ignore the version qualifier. Change ResourceFilter to only ignore the version qualifier when filtering by resource_configuration_filters, not densities. Without this change, when filtering by density, ResourceFilter would treat, for example, res-hdpi-v4/foo.png and res-hdpi-v11/foo.png as identical, even though they have different versions, and only use one of them when building the newly filtered list of resources. Instead, they should both be included. Also include a unit test that covers this behavior. Rather than add this in AndroidBinaryTest, create a new ResourceFilterTest class. To support that, move ResourceFilter from using the test-unfriendly RuleContext class to the easy-to-fake RuleErrorConsumer whenever possible. RELNOTES: none PiperOrigin-RevId: 159122507
* Add more methods to ExternalPackageUtil to load all rules of a specificGravatar John Cater2017-06-16
| | | | | | | rule class. Change-Id: Iaa830658a62de661f16e100d24b2d1a3e66af638 PiperOrigin-RevId: 159104714