aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Extract --sysroot flag from blaze and move it into crosstoolGravatar hlopko2017-03-31
| | | | | | RELNOTES: None. PiperOrigin-RevId: 151688820
* Drop loading-phase values if --discard_analysis_cache is true and we're not ↵Gravatar janakr2017-03-31
| | | | | | keeping incremental state. PiperOrigin-RevId: 151639711
* 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
* Actually clear the per-build syscall cache after loading. Setting it to null ↵Gravatar janakr2017-03-31
| | | | | | doesn't work because the PackageFactory keeps a reference to it. PiperOrigin-RevId: 151632473
* BuildView#getConfiguredTargetForTesting respects null transitions.Gravatar mstaib2017-03-31
| | | | | | | | RuleTransitionFactory#buildTransitionFor is @Nullable, but the SkyframeExecutor expects a non-null Transition. If the factory returns null, the SkyframeExecutor should be passed NONE, not null. PiperOrigin-RevId: 151615724
* Make Bazel resilient to files in /sdk/system-images.Gravatar ajmichael2017-03-31
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2739. RELNOTES: None PiperOrigin-RevId: 151592983
* Clone the remote execution implementation into a new classGravatar ulfjack2017-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new RemoteExecutionClient class only performs remote execution, and nothing else; all higher-level functions, local rety, etc. will live outside of the client. In order to add unit tests, I had to add another layer of indirection between the Grpc{RemoteExecutor,ActionCache} and GRPC, since GRPC generates final, non-mockable classes. While a testing approach that uses a fake server can also get some test coverage (as in GrpcActionCacheTest), it doesn't allow us to test the full range of bad things that can happen at the GRPC layer. The cloned implementation uses a single GRPC channel, as was recommended to me by Jakob, who worked on GRPC. A single channel should be sufficiently scalable, it's thread-safe, and it performs chunking internally. On the server-side, the requests from a single channel can be dispatched to a thread pool, so this should not be a blocker for server-side parallelism. I also changed it to throw an exception whenever anything bad happens - this makes it much more obvious if there's still bug in this code; the old code silently swallows many errors, falling back to local execution, which papers over many issues. Furthermore, we now return a RemoteExecutionResult to indicate whether the action ran at all (regardless of exit code), as well as the exit code. All in all, this implementation is closer to the production code we're using internally, although quite a few things are still missing. The cloned implementation is not hooked up to RemoteSpawnStrategy yet. It also does not support combining remote caching with local execution, but note that RemoteSpawnStrategy regressed in that respect and currently also does not support that mode. PiperOrigin-RevId: 151578409
* 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
* fix typo in Bazel documentationGravatar steren2017-03-29
| | | | PiperOrigin-RevId: 151574562
* Resolve special provider names when checking for mandatory providersGravatar vladmos2017-03-29
| | | | | | | | | | If a rule requires a special provider that's (maybe) not provided explicitly but nevertheless available from a target, i.e. "files", the mandatory providers check should pass. Fixes #1490 PiperOrigin-RevId: 151571187
* Change print(artifact) to return "File" instead of "Artifact"Gravatar vladmos2017-03-29
| | | | | | | | | RELNOTES[INC]: Converting artifacts to strings and printing them now return "File" instead of "Artifact" to be consistent with the type name. Fixes #2715 PiperOrigin-RevId: 151563252
* Stop returning JavaSourceJarsProvider from java_libraryGravatar elenairina2017-03-29
| | | | | | since it's already returned via JavaProvider. PiperOrigin-RevId: 151550286
* Add JavaRunfilesProvider to JavaProvider.Gravatar elenairina2017-03-29
| | | | PiperOrigin-RevId: 151547892
* Clear AspectValues when discarding analysis cache, along with ↵Gravatar janakr2017-03-29
| | | | | | | | ConfiguredTargetValues. Also clear transitive packages for both, even for top-level targets. This is not expected to save significant memory, but is expected to reduce the number of references to Packages, allowing them to be dropped more easily when discarding analysis cache and running in batch mode. PiperOrigin-RevId: 151508877
* Fix downloader so reset connections can resumeGravatar jart2017-03-29
| | | | | | RELNOTES: A downloader bug was fixed that prevented RFC 7233 Range connection resumes from working with certain HTTP servers PiperOrigin-RevId: 151508000
* Remove configurability of abrupt exit code behavior.Gravatar ccalvarin2017-03-29
| | | | | | | | Ability to configure this was added to provide an easy correction in case writing the exit code to a file proved problematic. This feature has been out for 3 months with no reported issues, no reason to keep the extraneous flag. PiperOrigin-RevId: 151496431
* Log the server pid to java logging.Gravatar janakr2017-03-29
| | | | PiperOrigin-RevId: 151489034
* Split out the InvocationPolicy parser from the enforcer.Gravatar ccalvarin2017-03-29
| | | | | | The encapsulation was off, since the format in which we accept policy has nothing to do with how we then enforce the policy. PiperOrigin-RevId: 151471747
* Actions arising from experimental_objc_library in opt mode do not use "-g0" ifGravatar cpeyser2017-03-29
| | | | | | --apple_generate_dsym is set, as in the legacy case. PiperOrigin-RevId: 151468688
* Apple binary configures actions not just with it's child's config and provider,Gravatar Cal Peyser2017-03-28
| | | | | | | | but also its toolchain. -- PiperOrigin-RevId: 151444602 MOS_MIGRATED_REVID=151444602
* Dump the classpaths in a separate file and read the classpaths from that ↵Gravatar Kush Chakraborty2017-03-28
| | | | | | | | | | file, so that each test run can have the latest version of the Classpaths. This does not tackle the case where runfiles are not present, such as windows. -- PiperOrigin-RevId: 151440999 MOS_MIGRATED_REVID=151440999
* Refactor simple distributed caching support Gravatar Alpha Lam2017-03-28
| | | | | | | | | | | | | | | | | | | The simple distributed caching in Bazel used ConcurrentMap as a blob store. It is incorrect to use an overloaded interface for this purpose. This change defines a SimpleBlobStore interface that only has put(), get() and containsKey() methods and allows a simple implementation of a blob store as remote cache for Bazel. Also updated documentation to summarize the options available in the remote spwan strategy. There is no functional change. TESTED=shell integration tests -- Change-Id: Iedff0bc4f06c4a93c398c53801014d998c3df13b Reviewed-on: https://cr.bazel.build/9330 PiperOrigin-RevId: 151439467 MOS_MIGRATED_REVID=151439467
* Description redacted.Gravatar Adam Michael2017-03-28
| | | | | | -- PiperOrigin-RevId: 151407958 MOS_MIGRATED_REVID=151407958
* Sign all android_binarys with both the v1 and v2 signature schemes by default.Gravatar Adam Michael2017-03-28
| | | | | | | | RELNOTES: All android_binarys are now signed with both Apk Signature V1 and V2. See https://source.android.com/security/apksigning/v2.html for more details. -- PiperOrigin-RevId: 151404899 MOS_MIGRATED_REVID=151404899
* 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
* Genrules only depend on the C++ toolchain if they have C++ make variables. Gravatar Greg Estren2017-03-28
| | | | | | | | | | e.g.: cmd = "$(CC) foo.cc > $@" Fixes #2729 -- PiperOrigin-RevId: 151369889 MOS_MIGRATED_REVID=151369889
* BEP: Unconditionally report ExtraActions Gravatar Klaus Aehlig2017-03-28
| | | | | | | | | | | | ...irrespective of their success status. While a build typically contains too many successful actions to report them all, extra actions included in a build are worth reporting. -- Change-Id: I6b20935895aa7b16836d6271f456176a7113317e Reviewed-on: https://cr.bazel.build/9519 PiperOrigin-RevId: 151328633 MOS_MIGRATED_REVID=151328633
* 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
* Clarify InvocationPolicy origins.Gravatar Chloe Calvarin2017-03-28
| | | | | | | | | Some policies can come from the module API, and some come from the user via startup argument. Clarify which one is which. -- PiperOrigin-RevId: 151324618 MOS_MIGRATED_REVID=151324618
* Move -Wl,--gdb-index into crosstoolGravatar Marcel Hlopko2017-03-27
| | | | | | -- PiperOrigin-RevId: 151302418 MOS_MIGRATED_REVID=151302418
* BEP: Also report options Gravatar Klaus Aehlig2017-03-27
| | | | | | | | | | | | Additionally to reporting on the originally received command line, also report it in a parsed form. This, in particular, includes reconstructing the options originally provided by the user. -- Change-Id: I5a1c6ed57874f1d37d10bf11d597256d63bc5516 Reviewed-on: https://cr.bazel.build/9459 PiperOrigin-RevId: 151288656 MOS_MIGRATED_REVID=151288656
* turn on --experimental_incremental_dexing_error_on_missed_jars by default.Gravatar Kevin Bierhoff2017-03-27
| | | | | | | | | This has no effect unless --incremental_dexing is used. RELNOTES: turn on --experimental_incremental_dexing_error_on_missed_jars by default. -- PiperOrigin-RevId: 151198031 MOS_MIGRATED_REVID=151198031
* sandbox: Pass config flags to linux-sandbox on the command-line.Gravatar Philipp Wollermann2017-03-27
| | | | | | | | | | | The linux-sandbox no longer requires extensive configuration via flags, so the command-line arguments will easily fit into the allowed length. This simplifies the code and gets rid of some I/O. -- PiperOrigin-RevId: 151176551 MOS_MIGRATED_REVID=151176551
* sandbox: Enable the process-wrapper + symlink tree sandbox on FreeBSD.Gravatar Philipp Wollermann2017-03-27
| | | | | | | | | | | Extract the process-wrapper + symlink tree sandbox strategy into its own class and allow its use in FreeBSD. RELNOTES: Bazel can now use the process-wrapper + symlink tree based sandbox implementation in FreeBSD. -- PiperOrigin-RevId: 151171652 MOS_MIGRATED_REVID=151171652
* introduce hidden flag to configure bytecode optimizersGravatar Kevin Bierhoff2017-03-27
| | | | | | -- PiperOrigin-RevId: 151170448 MOS_MIGRATED_REVID=151170448
* sandbox: Show the actual running sandbox strategy for actions.Gravatar Philipp Wollermann2017-03-27
| | | | | | | | | | This allows us to see for example whether an action ran using the "process wrapper + symlink tree" sandbox or the real "PID and mount namespaces" Linux sandbox. -- PiperOrigin-RevId: 151165170 MOS_MIGRATED_REVID=151165170
* sandbox: Clean up comments / code in SandboxRunner#run.Gravatar Philipp Wollermann2017-03-27
| | | | | | -- PiperOrigin-RevId: 151160662 MOS_MIGRATED_REVID=151160662
* Add a GenerateJ2objcHeaderMap action to generate the J2ObjC header mapping.Gravatar Rumou Duan2017-03-27
| | | | | | | | | | The header mapping used to be generated by J2ObjcTranspilationAction and consumed by dependent J2ObjcTranspilationActions. This setup led to chained J2ObjcTranspilationActions and long critical path build time. With GenerateJ2objcHeaderMap action, we break that chain and shorten the critical path build time. This feature is guarded behind a new build flag, --experimental_j2objc_header_map. -- PiperOrigin-RevId: 151149906 MOS_MIGRATED_REVID=151149906
* Stop setting -isystem for gcc builtin include directories.Gravatar Adam Michael2017-03-27
| | | | | | | | | | | Note that this is not quite a no-op. Setting -isystem puts these directories at the beginning of the search list, whereas not setting them results in them being near the end. However, this code is unnecessary and confusing and caused a bug with the clang toolchains so it is best to remove it. -- PiperOrigin-RevId: 151140445 MOS_MIGRATED_REVID=151140445
* Deja-vu: Using an ActionInputFileCache for SHA1 digests used with remote ↵Gravatar Ola Rozenfeld2017-03-27
| | | | | | | | | | | | | execution. If you're feeling like you've already seen this, that's correct, these were the exact contents of commit e860316559eac366d47923a8eb4b5489a661aa35... and then, on Nov 15, something unclear happened and the code disappeared! Perhaps it was the result of a faulty sync. In any case, nobody noticed, and the CL went in. It was later rolloed back and resubmitted, but the crucial code changes were gone. TESTED=local server with profiling for SHA1 specifically RELNOTES: n/a -- PiperOrigin-RevId: 151139685 MOS_MIGRATED_REVID=151139685
* Remove BuildingState, since it only has one field. Instead, keep the ↵Gravatar Janak Ramakrishnan2017-03-27
| | | | | | | | | | signaledDeps field directly in InMemoryNodeEntry. Should save ~24 bytes per freshly evaluating node entry (I haven't calculated object alignment for InMemoryNodeEntry now, so could be more or less). Also might save some memory for re-evaluating node entries, since the BuildingState class had to be padded out to a multiple of 8 bytes before the DirtyBuildingState fields could start. Don't actually know if that was happening. -- PiperOrigin-RevId: 151138224 MOS_MIGRATED_REVID=151138224
* sandbox: Refactor sandbox strategies to use a common exec method.Gravatar Philipp Wollermann2017-03-27
| | | | | | -- PiperOrigin-RevId: 151130566 MOS_MIGRATED_REVID=151130566
* Unit tests respect top-level rule-class transitions.Gravatar Cal Peyser2017-03-27
| | | | | | -- PiperOrigin-RevId: 151129669 MOS_MIGRATED_REVID=151129669
* 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
* sandbox: Make /tmp and /dev/shm writable by default on Linux.Gravatar Philipp Wollermann2017-03-27
| | | | | | | | | | | | | | Also refactor the way we compute writable dirs so that they're computed only once per running action, not twice. Fixes #2056, fixes #1973, fixes #1460. RELNOTES: /tmp and /dev/shm are now writable by default inside the Linux sandbox. -- PiperOrigin-RevId: 151123543 MOS_MIGRATED_REVID=151123543
* BuildEventStreamerModule: catch early build events Gravatar Klaus Aehlig2017-03-27
| | | | | | | | | | | | | | Abusing the checkEnvironment method, register early on the event bus and catch all events till the time we are supposed to process the options. This solves the problem that events relevant to the build event stream are posted (e.g., the GotOptions event) before(!) we know if a BuildEventStreamer is required. -- Change-Id: Iac63302351b862772638791932bcaa58b60b22fb Reviewed-on: https://cr.bazel.build/9457 PiperOrigin-RevId: 151123359 MOS_MIGRATED_REVID=151123359
* sandbox: Improve the check whether the Linux sandbox is supported.Gravatar Philipp Wollermann2017-03-27
| | | | | | | | | | | | | | | | | | | Try to run /bin/true as a test of whether the Linux sandbox works, instead of just trying to create a bunch of namespaces as a proxy. This helps resolve issues on Linux distros where the earlier check worked, but then the sandbox ultimately failed due to other operations being unsupported. As an example, Debian Jessie and certain Docker versions seem to allow the creation of PID namespaces, but forbid mounting a new proc on top of /proc (see #1972). This resulted in Bazel thinking that sandboxing works fine, when it actually didn't. The improved check correctly catches this situation and disabled sandboxing. -- PiperOrigin-RevId: 151116894 MOS_MIGRATED_REVID=151116894
* sandbox: No longer change the user to 'nobody' by default.Gravatar Philipp Wollermann2017-03-24
| | | | | | | | | | | | | | | | | | | This can be reactivated by passing the --sandbox_fake_username flag to Bazel. Reasoning: 'nobody' has a non-existent home directory on many Linux distros, leading to issues when tools try to stat / read / write to the home directory. Related to #2688. RELNOTES: The Linux sandbox no longer changes the user to 'nobody' by default, instead the current user is used as is. The old behavior can be restored via the --sandbox_fake_username flag. -- PiperOrigin-RevId: 151115218 MOS_MIGRATED_REVID=151115218
* sandbox: No longer require a temporary "sandbox" directory.Gravatar Philipp Wollermann2017-03-24
| | | | | | | | | | | | | By removing the --sandbox_block_path feature in an earlier change and taking advantage of the fact that in a mount namespace we can actually "remount" mount points to be read-only without bind mounting them to some other place beforehand, this is no longer necessary. The code becomes much simpler due to this, for example we no longer need to chroot. -- PiperOrigin-RevId: 151111360 MOS_MIGRATED_REVID=151111360
* sandbox: Remove the flag --sandbox_block_path.Gravatar Philipp Wollermann2017-03-24
| | | | | | | | | | | | | | | | | | It is in the way of optimizing the performance of the sandbox, because it requires us to create two helper files (an unreadable file and an unreadable directory) which are bind-mounted on top of paths specified via this flag. These two helper files were created on a tmpfs mounted by the sandbox until now, which ensured that they were automatically deleted on exit. However, mounting tmpfs on /dev/shm or /tmp causes issues like #2686 or #1882. By removing this flag, we can get rid of the two helper files, which means we can also remove the reliance on a "sandbox temp directory" completely in the next change. -- PiperOrigin-RevId: 151107496 MOS_MIGRATED_REVID=151107496