aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* C++: Rename CcCompilationInfo to CcCompilationContextInfo.Gravatar plf2018-04-03
| | | | | | | | | This is done so that the name CcCompilationInfo can be used for the C++ provider that will wrap all providers for compilation, similar to JavaInfo in Java. RELNOTES:none PiperOrigin-RevId: 191445120
* Add methods to parse resources without assetsGravatar asteinb2018-04-03
| | | | | | | | | | | | | | - Add ParsedAndroidResources to wrap AndroidResources and resource parsing output. - Implement parse() method in AndroidResources, and support for it elsewhere - Move some supporting methods to the right place (setting up an aapt2 sdk for tests goes to the base test rule, and creating a dummy DataBinding zip goes to the DataBinding class). - Tests for new parse() method, including support for getting a test RuleContext instance RELNOTES: none PiperOrigin-RevId: 191436027
* Remove CcToolchainProvider#getEnvironment() and all the supporting ↵Gravatar lberki2018-04-03
| | | | | | | | | | | infrastructure. This was added in unknown commit to provide a different environment to Apple toolchains, then its use removed in unknown commit in favor of getting the environment variables from the CToolchain proto. I haven't done my research if that's a better approach, but it looks like it (the less hard-coded stuff we have in Java, the better), but worst of all is surely to have *two* such mechanisms. RELNOTES: None. PiperOrigin-RevId: 191411878
* Remove Android jar from android_local_test bootclasspathGravatar ajmichael2018-04-02
| | | | | | | | | Instead, treat it as a regular compile-time library dependency. This fixes Java8 compilation in android_local_test. RELNOTES: None PiperOrigin-RevId: 191359834
* Serialize PythonUtils#GET_INIT_PY_FILES as a singleton so that object equalityGravatar cpeyser2018-04-02
| | | | | | holds in the check in Runfiles.Builder#merge. PiperOrigin-RevId: 191341008
* Automated rollback of commit 9bfbefc13f2b6ae9a86fd46a8470e3b4cd8efd1a.Gravatar asteinb2018-04-02
| | | | | | | | | | | | | | *** Reason for rollback *** Roll forward with fix and test - turns out I didn't distinguish properly between list and item seperators. *** Original change description *** Rollback "Allow Merge action to take an interface as primary, not just ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191322706
* Deduplicate the list of valid CPUsGravatar Googler2018-04-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 191320863
* Rollback "Allow Merge action to take an interface as primary, not just ↵Gravatar cparsons2018-04-02
| | | | | | | ResourceContainer", as it breaks some android rule integration tests. RELNOTES: none PiperOrigin-RevId: 191304264
* Create proguard.txt in android_library AAR output.Gravatar ajmichael2018-04-02
| | | | | | | | | The proguard.txt is the concatenation of the proguard_specs on the android_library rule itself. Note that it does not include transitively defined proguard_specs. Fixes https://github.com/bazelbuild/bazel/issues/4467 RELNOTES: android_library AAR output now contains proguard.txt PiperOrigin-RevId: 191302610
* Change profiling to only accept strings for its "description" argument. ↵Gravatar janakr2018-04-01
| | | | | | Profiling can hold onto objects for the duration of the build, and some of those objects may be temporary that should not be persisted. In particular, UnixGlob and its inner classes should not outlive loading and analysis. For the most part, care was taken in this CL to only use strings that required no additional construction, mainly to minimize garbage (retaining references to newly created strings is not as great a concern since only the strings corresponding to the slowest K tasks are retained, for some relatively small values of K). Action descriptions for actually executing actions are eagerly expanded because that work is minimal compared to the work of actually executing an action. PiperOrigin-RevId: 191251488
* Enforce @SkylarkCallable must have a non-empty doc string or explicitly be ↵Gravatar cparsons2018-03-30
| | | | | | | documented=false. RELNOTES: None. PiperOrigin-RevId: 191112140
* Remove category checking from incompatible changes.Gravatar ccalvarin2018-03-30
| | | | | | | String categories are deprecated, replace this special-cased value with a specific OptionMetadata tag, TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES. RELNOTES: None. PiperOrigin-RevId: 191069412
* Allow Merge action to take an interface as primary, not just ResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | | | | | In future reviews, we will use this to be able to pass assets and resources individually. Introduce replacement for ResourceContainerConverter that can handle generics and should be about as flexible. To support that replacement, slightly improve how CustomCommandLine handles generics. RELNOTES: none PiperOrigin-RevId: 190970298
* Pass resources and assets seperately into parse and compile actionsGravatar asteinb2018-03-29
| | | | | | | | | | | This will eventually allow us to parse or compile assets and resources separately. Also, remove a no-op null check that was making the code confusing, and some unneeded resource filtering that was doing the same. RELNOTES: none PiperOrigin-RevId: 190951667
* Fixing issue with external j2objc protos (reattempt at #4058)Gravatar Mike Lewis2018-03-29
| | | | | | | | | | | | | | | | | | This is a re-attempt at https://github.com/bazelbuild/bazel/pull/4058 which got reverted via https://github.com/bazelbuild/bazel/issues/4780 #4780 was being caused because cc plugin and j2objc plugin used different paths for outputs. I also manually verified that this works for both external cc_proto_librarys and external j2objc java_proto_libraries. The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. cc @c-parsons @pmbethe09 Closes #4793. PiperOrigin-RevId: 190950452
* Rename LocalResourceContainer to AndroidResources and remove asset code from itGravatar asteinb2018-03-29
| | | | | | | | | | | | | As part of decoupling Android resources and assets, rename LocalResourceContainer to AndroidResources and remove asset code from it. Some general asset and manfiest code still remains and will be dealt with in future changes. Remove LocalResourceContainer from the ParsingActionBuilder, since it's always used to build the ResourceContainer that is subsequently passed in. RELNOTES: none PiperOrigin-RevId: 190945260
* Split AndroidAssets class out of LocalResourceContainerGravatar asteinb2018-03-29
| | | | | | | | | | AndroidAssets will be the new home for asset-related code (including, in the future, from ResourceContainer). This is the first step towards decoupling Android asset and resource processing. LocalResourceContainer will be replaced with resource-specific code in the next change. RELNOTES: none PiperOrigin-RevId: 190936954
* C++: Remove headers from input to linking action.Gravatar plf2018-03-29
| | | | | | | | | Headers were made an input to the linking action simply to get an error when we have a src-less cc_library with declared but missing headers. Since there was no compilation action, the headers were not an input to any action and there was no error when the files were missing. After discussing it with the team, it was decided that this is not needed anymore. Files can be missing as long as they are not consumed. RELNOTES:none PiperOrigin-RevId: 190915591
* Rename Blaze -> Bazel in Cpp optionsGravatar andy g scott ?2018-03-29
| | | | | | Closes #4909. PiperOrigin-RevId: 190895706
* Remove BuildConfiguration from ConfiguredTarget.Gravatar janakr2018-03-28
| | | | PiperOrigin-RevId: 190804641
* Remove `--swift_whole_module_optimization` flag.Gravatar allevato2018-03-28
| | | | | | Users should instead pass `--swiftcopt=-whole-module-optimization`, which has the same effect. PiperOrigin-RevId: 190800123
* Make deprecated ObjcProvider fields return empty sets when ↵Gravatar cparsons2018-03-28
| | | | | | | | | --incompatible_disable_objc_provider_resources is true. This involves propagating SkylarkSemantics to all ObjcProvider constructors. RELNOTES: Introduce --incompatible_disable_objc_provider_resources to turn off all resource-related fields of the Objc provider. PiperOrigin-RevId: 190778491
* Add a skylark-compatible alternative to MessageBundleProviderGravatar cushon2018-03-28
| | | | PiperOrigin-RevId: 190775527
* Remove categories from Bazel options.Gravatar ccalvarin2018-03-28
| | | | | | | | | These have all had a chance to be categorized with the OptionDocumentationCategory enum, and the help output already uses the enum-grouped format. The "incompatible changes" category has meaning for --all_incompatible_changes and will be removed separately. RELNOTES: None. PiperOrigin-RevId: 190773778
* Delete the ios_device rule from bazel.Gravatar kaipi2018-03-28
| | | | PiperOrigin-RevId: 190771926
* Move strip and compile build variables into separate classesGravatar hlopko2018-03-28
| | | | | | | | Working on link build variables I see they cannot stay in a single file, they're too big and complicated. This will make the followup cl smaller. RELNOTES: None. PiperOrigin-RevId: 190771072
* Inline ObjectFilePathHelperGravatar pcloudy2018-03-28
| | | | | | | Since it's not used anywhere else outside of CcCompilationHelper.java RELNOTES: PiperOrigin-RevId: 190755588
* ObjcLibrary.java: Use objectFilesCollector to get object filesGravatar pcloudy2018-03-28
| | | | | | | This can avoid passing targetBuilder to CompilationSupport.java RELNOTES: None PiperOrigin-RevId: 190743994
* Expose j2objc.dead_code_report as a configuration field instead of a basic ↵Gravatar cparsons2018-03-27
| | | | | | | struct field on the j2objc fragment. RELNOTES: None. PiperOrigin-RevId: 190672475
* C++: Fixes Blaze crashing on CLIF in toolchains that don't need PICGravatar plf2018-03-27
| | | | | | | | | | | | | | | | | | | | For CLIF it doesn't matter whether we use PIC or no-PIC, the important thing is we get an output protobuf. Before https://github.com/bazelbuild/bazel/commit/35773928532c132e3229b490ad98f4ebfd3e5770, using no-PIC was hardcoded. In this CL it was decided to generate PIC instead because the toolchains used by CLIF targets appeared to all have needsPic. In b/73955395 it has been shown not to be the case. In this CL I'm changing the logic again to use no-PIC for CLIF and to circumvent the logic that checks what the configuration and the toolchain say. At the same time, SWIG also used the method setGenerateNoPic() after the variable onlySingleOutput was removed in https://github.com/bazelbuild/bazel/commit/4e9c9f93b15dd2594097644c6b9ca5a579c712fb. In this CL I use the enum to apply PIC and no-PIC in the same cases as before for SWIG. This CL also refactors the methods and boolean variables used to determine whether to use PIC or not, hopefully making it clearer. RELNOTES:none PiperOrigin-RevId: 190615548
* Remove optional_*_flag fields from crosstoolGravatar hlopko2018-03-27
| | | | | | | | | They are not used anyway. optional_compiler_flag will be removed once internal migration is finished. RELNOTES: CppRules: Remove optional_*_flag fields from CROSSTOOL, they are not used, and could be expressed using features. PiperOrigin-RevId: 190600731
* Avoid using ObjectFilePathHelper in CompilationSupport.javaGravatar pcloudy2018-03-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 190591828
* Isolate C++ compile build variablesGravatar hlopko2018-03-27
| | | | | | | | | | | | | | This is a preparation work to expose Variables instance for all compile actions to Skylark. I didn't do linking variables in this cl, because this cl is already too big. But they're coming shortly in a separate cl. This is also in line with our goal to make build variables more discoverable and better document. RELNOTES: None. PiperOrigin-RevId: 190591080
* Simplify Executor.getSpawnActionContext() by removing mnemonic: spawn is enough.Gravatar Googler2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190544948
* Enable params files for DexMapper.Gravatar ahumesky2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190516662
* Prohibit using Java serialization for protos.Gravatar cpeyser2018-03-26
| | | | PiperOrigin-RevId: 190500851
* Simplified ActionContextConsumer by having it operate on a new class which ↵Gravatar Googler2018-03-26
| | | | | | holds a variety of strategy/context maps. PiperOrigin-RevId: 190491357
* Remove the unused label //tools/defaults:coverage .Gravatar lberki2018-03-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 190434178
* @AutoCodec some more classes needed for large Java builds.Gravatar janakr2018-03-25
| | | | PiperOrigin-RevId: 190392567
* @AutoCodec ProtoCompileActionBuilder$LazyCommandLineExpansion and ↵Gravatar janakr2018-03-24
| | | | | | $LazyLangPluginFlag. PiperOrigin-RevId: 190349246
* @AutoCodec map functions in ProtoCompileActionBuilder.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190293560
* @AutoCodec JavaRunfilesProvider.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190277450
* Expose mergeManifests method in SkylarkGravatar asteinb2018-03-23
| | | | | RELNOTES: none PiperOrigin-RevId: 190253911
* RELNOTES: Move (c/cxx)opts from legacy_compile_flags to user_compile_flagsGravatar Googler2018-03-23
| | | | PiperOrigin-RevId: 190224987
* Fix test flakiness due to the filesystem mutations done during the 'fetch' ↵Gravatar nharmata2018-03-23
| | | | | | | | | work done by BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader. We fix this flakiness by _not_ having RepositoryDelegatorFunction unconditionally 'fetch' local repos. We then have to make a change to BazelPackageLoader test to reinstate these mutations, since it was only working before due to the unconditional filesystem mutations done here :p RELNOTES: None PiperOrigin-RevId: 190222830
* Shorten object file pathGravatar pcloudy2018-03-23
| | | | | | | | | | | | | | | | | | | | | | | Closes #4781. Fix https://github.com/bazelbuild/bazel/issues/4149 RELNOTES: Users can now pass --experimental_shortened_obj_file_path=true to have a shorter object file path, the object file paths (and all other related paths) will be constructed as following: If there's no two or more source files with the same base name: <bazel-bin>/<target_package_path>/_objs/<target_name>/<source_base_name>.<extension> otherwise: <bazel-bin>/<target_package_path>/_objs/<target_name>/N/<source_base_name>.<extension> N = the file?s order among the source files with the same basename, starts from 0. Examples: 1. Output names for ["lib1/foo.cc", "lib2/bar.cc"] are ["foo", "bar"] 2. Output names for ["foo.cc", "bar.cc", "foo.cpp", "lib/foo.cc"] are ["0/foo", "bar", "1/foo", "2/foo"] The default value of --experimental_shortened_obj_file_path option is false, but we plan to flip it to true and eventually remove this option. You shouldn't depend on the format of generated object file path, but if you do and this change breaks you, please use --experimental_shortened_obj_file_path=false to work around it. PiperOrigin-RevId: 190214375
* Victory lap: Remove all code that used to support the three-argument form of ↵Gravatar lberki2018-03-23
| | | | | | | vardef(). RELNOTES: None. PiperOrigin-RevId: 190196933
* Add AndroidManifest and related classes for new manifest merging implementationGravatar asteinb2018-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | AndroidManifest represents a new class to handle decoupled Android manifest processing (as opposed to the existing ApplicationManifest, which handles manifests, resources, and assets all together). This new manifest processing pipeline will be used by the Skylark Android Data API. AndroidManifest wraps the manifest and related information, so we don't just pass around untyped Artifacts all the time. Additionally, the StampedAndroidManifest subclass explicitly states that a manifest has been stamped with the correct package (previous confusion between passing around the stamped and unstamped manifests has led to bugs in Blaze). Unlike the old manifest processing pipeline, AndroidManifest: - Does not support the old legacy manifest merger - Is decoupled from resource and asset processing - Does incremental merges - Always has the package defined at analysis time - Can be run without an input manifest (for rules which don't specify their own manifest but either inherit manifests that should be merged or to provide a dummy manifest for tooling) RELNOTES: none PiperOrigin-RevId: 190119992
* Create AndroidManifestInfo providerGravatar asteinb2018-03-22
| | | | | | | | | This provider is the first part of the Skylark Android Data API. This provider is not yet used by the native android_* rules, and is subject to change if needed to implement the rest of the Skylark Android data API. RELNOTES: none PiperOrigin-RevId: 190078860
* Ensure -fPIC set on shared non-LTO backends as neededGravatar Googler2018-03-22
| | | | | | | | | | | | | | Set the usePicForLtoBackend bit on the link action builder when we create static link actions. Before https://github.com/bazelbuild/bazel/commit/8c5e290dfab3cab378a9ca107ecdd6267403cd4b this wasn't required for static library link actions, as the LTO backend actions weren't created until the dependent binary's link action, which set this flag for the binary static link. However, with that change, we now create shared non-LTO backend actions early, when creating the library link action, for use later when we create the binary link action. So that flag needs to be set properly on the static library link action to get the -fPIC flag set as needed on the shared non-LTO backends. RELNOTES: None PiperOrigin-RevId: 190074918