aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
...
* Automated rollback of commit 3c5a1098af0c5ae80d4e3b1fc52dd1fef6027d43.Gravatar hlopko2018-03-21
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks bazel ci: https://github.com/bazelbuild/bazel/issues/4894#event-1533040075 *** Original change description *** Add crosstool_lib.bzl and crosstool_utils.bzl These will be used to rewrite current crosstool autoconfiguration into action_configs and features. RELNOTES: None. PiperOrigin-RevId: 189901308
* NDK cc_toolchains: include bundled runtime libraries in cc_toolchain.all_filesGravatar Jingwen Chen2018-03-21
| | | | | | | | | | | | Currently, generated NDK `cc_toolchain.all_files` filegroups do not glob the STL's static and dynamic runtime libraries, which includes important files like `libandroid_support.a` and `libc++.{so, a}`. This introduces sandboxed link time errors as @steeve discovered at https://github.com/bazelbuild/bazel/issues/3923#issuecomment-372750002 This PR adds the two filegroups to the respective toolchain's `all-files` filegroup to make them part of the toolchain's output in the sandbox. This generates a BUILD.bazel file like this: https://gist.github.com/jin/7d9fcf924fa33ab8fbc4c43c97676ab3 Fixes https://github.com/bazelbuild/bazel/issues/4864 Closes #4866. PiperOrigin-RevId: 189900428
* Split PackageProvider to TargetProvider and CachingPackageLocatorGravatar dbabkin2018-03-21
| | | | | | | No need to pass instance of PackageProvider there as two more general interfaces required separately. RELNOTES:none PiperOrigin-RevId: 189895042
* Fix output_file build variable to be correct for fake compile actions.Gravatar hlopko2018-03-21
| | | | | | | | | | | | When this change is released, we can refactor compiler_output_flags feature to use output_file build variable in place of output_object_file, output_preprocess_file, and output_assembly_file for generating -o flag. We still need output_preprocess_file and output_assembly_file to add -S and -E, but we can get rid of output_object_file, and what's better we can stop caring about extension when constructing build variables for compile actions. RELNOTES: None. PiperOrigin-RevId: 189892917
* Assume toolchain supportsDynamicLinker from presence of ↵Gravatar hlopko2018-03-21
| | | | | | | | | | | | | "dynamic_linking_mode" feature Toolchains no longer have to provide linking_mode_flags { mode: DYNAMIC } to state that they support dynamic linking mode. It is enough to provide a feature. This is part of ongoing work to get rid of linking_mode_flags from the CROSSTOOL. RELNOTES: None. PiperOrigin-RevId: 189890583
* Add crosstool_lib.bzl and crosstool_utils.bzlGravatar hlopko2018-03-21
| | | | | | | | These will be used to rewrite current crosstool autoconfiguration into action_configs and features. RELNOTES: None. PiperOrigin-RevId: 189888171
* Allow android_library rule to also accept rules that provide the JavaInfoGravatar Googler2018-03-20
| | | | | | | provider as an input. RELNOTES: PiperOrigin-RevId: 189868401
* Hand-rolls EnumRuntimeCodecGravatar shahan2018-03-20
| | | | PiperOrigin-RevId: 189830623
* Bug fix to allow timeout errors for remote spawns.Gravatar Googler2018-03-20
| | | | | | TESTED=unit RELNOTES: None PiperOrigin-RevId: 189818481
* Add EnumMapCodec. Some hackery necessary to get Class for Enum when map is ↵Gravatar janakr2018-03-20
| | | | | | | | | | empty. Since EnumMap.equals() ignores the key type when the maps are empty [1], we could just return a canonical empty EnumMap, but that seems to depend on implementation details in a hacky and potentially subtly broken way. The Unsafe method will hopefully break spectacularly if it goes wrong. [1] http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/EnumMap.java#l685 PiperOrigin-RevId: 189803280
* Give ConfigurationTransition and implementing classes a getName method for ↵Gravatar juliexxia2018-03-20
| | | | | | easy name access. This is useful for cquery output formatters. PiperOrigin-RevId: 189794125
* Force @SkylarkCallable Params with defaultValue = "None" to be noneable.Gravatar cparsons2018-03-20
| | | | | | | | Previously, usage was fairly inconsistent. From now on, if the @Param is mandatory, use defaultValue = "" instead. RELNOTES: None. PiperOrigin-RevId: 189777905
* Add ability to shallow-freeze individual objectsGravatar brandjon2018-03-20
| | | | | | | | | Clarify that the IMMUTABLE Mutability should only be used for deeply immutable things, not tuples. Created a new SHALLOW_IMMUTABLE Mutability for them. Note that the new shallow-freezing functionality marks things as deeply IMMUTABLE without traversing its contents. I.e., it lies, and it is up to the caller to ensure this doesn't cause problems. RELNOTES: NONE PiperOrigin-RevId: 189767422
* Add more documentation for rule.outputsGravatar brandjon2018-03-20
| | | | | | | | | We want to simplify/remove this API, but let's document it in the meantime. Also fix harmless bug that annoyed me. It used rawTemplate instead of formatStr when there are no placeholders. This would theoretically fail to properly escape % symbols, except that the code path luckily short-circuits later on if there are no placeholders. RELNOTES: PiperOrigin-RevId: 189760809
* @Autocodec a few leftover classes. Also, add @AutoCodec builder support for ↵Gravatar cpeyser2018-03-20
| | | | | | boolean getters in "isFoo" form. PiperOrigin-RevId: 189753768
* Allow path options to use user specific pathsGravatar David Ostrovsky2018-03-20
| | | | | | | | | | | | | | | | | | | | | Fixes #2054. Allow users to be able to specify user specific paths. With this option we can now commit bazel configuration file and force local action cache activation per default: $ cat tools/bazel.rc build --experimental_local_disk_cache_path=~/.gerrit/bazel-cache/cas build --experimental_local_disk_cache build --experimental_strict_action_env Test Plan: $ bazel test //src/test/java/com/google/devtools/build/lib:util_test Closes #4852. PiperOrigin-RevId: 189744599
* Have the Android R class generators add the target label to the class jar.Gravatar tomlu2018-03-20
| | | | | | | This re-enables support for add_deps. RELNOTES: None PiperOrigin-RevId: 189737607
* Make FdoSupport use outputName to generate object file pathGravatar pcloudy2018-03-20
| | | | | | | | | | Object file path will no longer be derived from source file path directly. This is a preparation change for[] Related issue https://github.com/bazelbuild/bazel/issues/4149 RELNOTES: None PiperOrigin-RevId: 189722421
* Automated rollback of commit 72d28f3efc2842510a34cacd930c0204143f7412.Gravatar shreyax2018-03-19
| | | | | | | | | | | | | | | | | | | | | | | | Fix skylark caching to properly include transitive dependencies when there is a diamond-like dependency in the loaded bzl files. Also add guards to make sure we're not attempting to cache skylark files that transitively request a dependency that is in error. *** Reason for rollback *** Looking for source of non-determinism *** Original change description *** Automated rollback of commit 7ba939dfd5df48903929e9c14ebd0449656403e4. *** Reason for rollback *** Likely cause for non-determinism in skyframe *** Original change description *** Cache SkylarkLookupImportValues in memory so that we don't recompute them multiple times. PiperOrigin-RevId: 189686604
* Plumb support for mounting a sandboxfs instance during a build.Gravatar jmmv2018-03-19
| | | | | | | | | | | | | This introduces user-facing options to enable the experimental sandboxfs support and, when enabled, mounts a sandboxfs instance throughout the build. The sandboxfs' process handle is passed to the SandboxActionContextProvider so that the SpawnRunners can later consume it. Note that this does NOT yet provide sandboxfs support for the builds as the SpawnRunners are untouched. RELNOTES: None. PiperOrigin-RevId: 189678732
* Automated rollback of commit e6af9f9178e731a45e552b1d249ded90124945ba.Gravatar janakr2018-03-19
| | | | | | | | | | | | *** Reason for rollback *** See linked bug. *** Original change description *** Add behavior to NestedSetCodec to prevent it from running during testing. PiperOrigin-RevId: 189663863
* Add some testing methods to get ConfiguredTargetAndData more easily, and ↵Gravatar janakr2018-03-19
| | | | | | rename some methods that were still called ConfiguredTargetAndTarget. Move some tests over to using ConfiguredTargetAndData instead of calling ConfiguredTarget#getConfiguration() directly. PiperOrigin-RevId: 189642264
* Make "legacy globber" threads daemon.Gravatar carmi2018-03-19
| | | | | | | This allows an executable that uses PackageFactory (e.g., through PackageLoader) to exit immediately once it's done without waiting for these threads to finish. RELNOTES: None PiperOrigin-RevId: 189634305
* Expose the j2objc configuration fragment, with field dead_code_report, ↵Gravatar cparsons2018-03-19
| | | | | | | matching build flag --j2objc_dead_code_report. RELNOTES: The 'j2objc' configuration fragment is exposed to Skylark. PiperOrigin-RevId: 189630012
* RELNOTES[INC]: Remove //tools/defaults:android_jar. Use ↵Gravatar ajmichael2018-03-19
| | | | | | | | | | @bazel_tools//tools/android:android_jar instead. Bazel 0.11 release notes mentioned deprecating //tools/android:android_jar, and Bazel 0.12 has already been cut. So I think Bazel 0.13 is a reasonable time to remove it. Also, delete the machines for configuration fragments adding rules (not labels) to the //tools/defaults package. //tools/defaults:android_jar was the only user. PiperOrigin-RevId: 189628217
* Add behavior to NestedSetCodec to prevent it from running during testing.Gravatar cpeyser2018-03-19
| | | | PiperOrigin-RevId: 189602622
* Replace =0/=1 with =False/=True in documentation.Gravatar lberki2018-03-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 189568573
* @AutoCodec TemplateExpansionAction. Have to make some anonymous classes ↵Gravatar janakr2018-03-17
| | | | | | concrete. PiperOrigin-RevId: 189467877
* @AutoCodec WriteZipControlFileAction (and ImmutableIterable).Gravatar janakr2018-03-16
| | | | | | Since autocodec library is now a dependency of lib/collect, properly annotate ImmutableSharedKeyMap to boot. PiperOrigin-RevId: 189432552
* Automated rollback of commit 48e205a19bed1cccaa51c7bbfbef6c2fbe47e3de.Gravatar ruperts2018-03-16
| | | | | | | | | | | | | | *** Reason for rollback *** Testing if rollback fixes http://b/75307752, http://b/75309658, and http://b/75312426 *** Original change description *** Modify the Java rules to take in JavaInfo instead of JavaCompilationArgsProvider and JavaPluginInfoProvider. This change facilitates the interaction of Java native and Java Skylark code, avoiding code duplication in the future. PiperOrigin-RevId: 189424668
* Add unit tests for ↵Gravatar janakr2018-03-16
| | | | | | https://github.com/bazelbuild/bazel/commit/f304d2be2e8c26bd85434f1d6ca036f380162fb9 (oops). Also don't use concrete build() methods: there must be an abstract one, and crash explicitly if we don't have a Builder class, rather than with an NPE down the line. And remove non-functional partial handling of iterables. PiperOrigin-RevId: 189422625
* @AutoCodec some expressions that show up in Java configured targets.Gravatar janakr2018-03-16
| | | | PiperOrigin-RevId: 189419493
* Adds codecs for more list variants.Gravatar shahan2018-03-16
| | | | PiperOrigin-RevId: 189417853
* Add @AutoCodec strategy for @AutoValue.Builder.Gravatar janakr2018-03-16
| | | | | | Still missing a lot of features (most notably the ability to construct an iterable element by element), but this is ok for now. PiperOrigin-RevId: 189410898
* Deletes list marshaller and makes map entry marshaller into a runtime codec.Gravatar shahan2018-03-16
| | | | PiperOrigin-RevId: 189390024
* PiperOrigin-RevId: 189372237Gravatar Googler2018-03-16
|
* Propagating remote results, including stdout/err, to Bazel on execution ↵Gravatar olaola2018-03-16
| | | | | | | | | timeouts. The refactoring to have an Exception that contains partial results will also be used in the next CL, in order to propagate and save remote server logs. RELNOTES: None PiperOrigin-RevId: 189344465
* Pass all TreeArtifacts to the ParameterWriteFileAction so they're expanded ↵Gravatar Googler2018-03-16
| | | | | | | | | | | by the time the action runs. Tested: custom_blaze build experimental/users/kmensah/cc_proto_library:libnon_android_example.so --config android_x86 -s RELNOTES: Properly handle tree artifacts on the link command line coming from a cc_library dependency. PiperOrigin-RevId: 189344192
* Refactor DependencyResolver#dependentNodeMap to take in a set of toolchain ↵Gravatar juliexxia2018-03-16
| | | | | | labels instead of the entire toolchain context since that's all the dependency resolver really needs. This will help make cquery transitions outputter easier to implement. PiperOrigin-RevId: 189342812
* Makes leaf level AutoCodec marshallers into runtime codecs.Gravatar shahan2018-03-15
| | | | | | Next change will convert containers. PiperOrigin-RevId: 189261293
* Begins cleanup to allow ActionFS to be injected into all action executions.Gravatar shahan2018-03-15
| | | | PiperOrigin-RevId: 189244665
* Remove unnecessary @VisibleForTestingGravatar michajlo2018-03-15
| | | | | | I imagine it was used at some point, can't find any usages now. PiperOrigin-RevId: 189226615
* Allow optimization related features to be ignored when unsupported as ↵Gravatar Googler2018-03-15
| | | | | | opposed to reporting errors PiperOrigin-RevId: 189201637
* Suppress ThinLTO indexing for linkstatic library in testsGravatar Googler2018-03-15
| | | | | | | | | | This extends the scalability fix in https://github.com/bazelbuild/bazel/commit/8c5e290dfab3cab378a9ca107ecdd6267403cd4b to apply to statically linked libraries linked into dynamically linked tests. Otherwise we are still getting the O(N*M) LTO backend job behavior for those libraries when invoking ThinLTO on many targets. RELNOTES: None PiperOrigin-RevId: 189200150
* Optimize GC churn due to PackageFunction#getContainingDirectory. While I'm ↵Gravatar nharmata2018-03-15
| | | | | | | | | here, also slightly restructure the code in #handleLabelsCrossingSubpackagesAndPropagateInconsistentFilesystemExceptions to make it more readable (and defer PackageIdentifier allocations). Alternatives considered: Add a PathFragment#getParentDirectoryOfRelative(String other) instance method, and use it in PackageFunction#getContainingDirectory. I thought the approach in this CL would be preferable to adding a specialized method like that to PathFragment. RELNOTES: None PiperOrigin-RevId: 189197855
* Modify CTQEnvironment and associated files to handle AliasConfiguredTargets. ↵Gravatar juliexxia2018-03-15
| | | | | | Always handle AliasConfiguredTargets as separate nodes from their "actual" value. This is helpful in understanding certain query results e.g. somepath. PiperOrigin-RevId: 189196863
* Conditionally set the default crosstool based on the major revision by ↵Gravatar jingwen2018-03-15
| | | | | | | | | | | binding //external:android/crosstool to an alias in the NDK BUILD file. This does not change existing behavior until r17 support is released. https://github.com/bazelbuild/bazel/issues/4742 RELNOTES: None. PiperOrigin-RevId: 189195669
* Include object exec path in LTO Backend progress messageGravatar Googler2018-03-15
| | | | | | | | | | With only the filename the LTO Backend objects are hard to distinguish (i.e. many files will share the same base filename, but have different paths. Additionally, this change causes the target specific ".lto" or "shared.nonlto" subdirectory to be included, which is useful for analysis. RELNOTES: None PiperOrigin-RevId: 189194070
* Simplify ClientEnvironmentValue invalidation.Gravatar Benjamin Peterson2018-03-15
| | | | | | | Unconditionally inject the new values, and let skyframe change pruning avoid over-invalidation. Change-Id: I3f478ea756121bde1078e9e79ddcfbeb54951cbb PiperOrigin-RevId: 189156698
* Splits the iterableMarshaller into runtime codecs.Gravatar shahan2018-03-14
| | | | | | Makes NestedSetCodec into a runtime codec instead of a Marshaller. PiperOrigin-RevId: 189110883