aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Only allocate some formerly frequently allocated PathFragment objects once.Gravatar nharmata2017-05-02
| | | | | | This reduces both gc churn and retained memory usage. PiperOrigin-RevId: 154718782
* Make Skylark interpreter read Skylark command-line flagsGravatar brandjon2017-04-30
| | | | | | | | | | | This is the second of two CLs for making command line options able to affect the Skylark interpreter. For the main kinds of evaluation contexts -- package loading, .bzl loading, rule analysis, aspect analysis, and computed defaults -- the SkylarkSemanticsOptions object is retrieved from Skyframe and passed along to the Environment builder. For other contexts such as tests, default values of builtin functions, and standalone Skylark, flags are currently not processed. In the future, we may want to split into separate files the options that affect "pure" Skylark vs the options that affect Bazel-flavored Skylark. One possibility is to subclass SkylarkSemanticsOptions into SkylarkBazelSemanticsOptions, and go through an indirection in SkylarkUtils. We could also pass SkylarkSemanticsOptions to the parser, to support --incompatible_* changes that alter Skylark's syntax. I don't think that's needed at the moment. RELNOTES: None PiperOrigin-RevId: 154628391
* Automated g4 rollback of commit a83a5df53ca184ad59a4a46cd9dfa747bf08007a.Gravatar Googler2017-04-30
| | | | | | | | | | | | *** Reason for rollback *** This caused some build breaks. *** Original change description *** Custom module map for j2objc_library PiperOrigin-RevId: 154608761
* Custom module map for j2objc_libraryGravatar Googler2017-04-30
| | | | PiperOrigin-RevId: 154606005
* Automated g4 rollback of commit 6af104a0cf5662d53e4f55b7d5a64255ce470a53.Gravatar ajmichael2017-04-30
| | | | | | | | | | | | | *** Reason for rollback *** Decided that this needs a more gradual rollout, as it has the potential to increase StrictMode violations. *** Original change description *** Make --experimental_android_compress_java_resources true by default. RELNOTES: All java resources are now compressed in android_binary APKs by default. PiperOrigin-RevId: 154594547
* Convert LLVM raw profiles to indexed format if necessary.Gravatar Googler2017-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is what is done today: bazel build -c opt --fdo_optimize=<path_to_profdata_file> //target The .profdata file is the LLVM profiles in indexed format and bazel creates a symlink to it from bazel-fdo/_fdo/... and compiles the target. However, the instrumented binary generates a .profraw file and hence the conversion to .profdata must be done manually using the llvm-profdata binary which is shipped along with the crosstool as: $ llvm-profdata -merge -o <path_to_profdata_file> <path_profraw_file> We are trying to avoid this intermediate step in this change by baking this into bazel. This implementation does the following: * In CppConfiguration.java, adds new tool llvm-profdata. * In CcToolchain.java, in function create, if LLVM instrumented FDO is desired, the profile format is checked and the profile conversion takes place. * FdoSupport.java checks for LLVM instrumented FDO is bypassed. RELNOTES[NEW]: Raw LLVM profiles are now supported. PiperOrigin-RevId: 154569896
* Split transition unconditionally for multiarch apple rulesGravatar cparsons2017-04-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 154569551
* Introduce a base class for AndroidLocalTest, AndroidLocalTestBase. This is a ↵Gravatar Googler2017-04-30
| | | | | | | first step for future Bazel android_local_test rule support. RELNOTES: None PiperOrigin-RevId: 154562617
* Assign otherwise ignored Future return values to local variables.Gravatar Googler2017-04-30
| | | | PiperOrigin-RevId: 154553183
* Refactor to extract the collection of portable proto filters.Gravatar kaipi2017-04-30
| | | | PiperOrigin-RevId: 154549379
* Rollforward attempt 2 of "apple_binary extension_safe attribute results in ↵Gravatar cparsons2017-04-28
| | | | | | | configuration transition on dependencies" RELNOTES: None. PiperOrigin-RevId: 154544751
* Add FILES_TO_COMPILE output group to apple_static_library.Gravatar cpeyser2017-04-28
| | | | PiperOrigin-RevId: 154544281
* Remove stale comment and add back a removed TODO.Gravatar nharmata2017-04-28
| | | | | RELNOTES: None PiperOrigin-RevId: 154543320
* Make --experimental_android_compress_java_resources true by default.Gravatar ajmichael2017-04-28
| | | | | RELNOTES: All java resources are now compressed in android_binary APKs by default. PiperOrigin-RevId: 154542323
* Fix 'Argument list too long' error in :merge_licenses genruleGravatar Jakob Buchgraber2017-04-28
| | | | | | | | | | | We pass every file in //third_party:srcs to merge_licenses.sh and when trying to update protobuf that list grew too large and caused errors on macOS. With xargs we can split the list of files into smaller chunks. Change-Id: I402813f14e35ca6dac393112ff4f3c963e789536 PiperOrigin-RevId: 154536807
* Rename CppCompileCommandLine to CompileCommandLine and move it out from ↵Gravatar hlopko2017-04-28
| | | | | | | | | CppCompileAction Mostly to maintain symmetry between CppCompileAction and CppLinkAction. RELNOTES: None. PiperOrigin-RevId: 154531984
* Extend BlazeModule to support listening to the console outputGravatar Klaus Aehlig2017-04-28
| | | | | | | | | | Besides writing console output to the console and the command log, allow modules to register other places where the output should be recorded to. This will allow the build-event protocol to also report on the console output. Change-Id: Ie700243120b0db7c3c68d192abeb0ab7033dc175 PiperOrigin-RevId: 154528369
* Automated g4 rollback of commit aa7f9307636d38cbb93a03acac8f4c59adfa0ee8.Gravatar ajmichael2017-04-28
| | | | | | | | | *** Reason for rollback *** Broke --experimental_inmemory_dotd_files RELNOTES: None PiperOrigin-RevId: 154477949
* Add support for logging exception details via ErrorMessage.Gravatar philwo2017-04-28
| | | | | | Part of #2855. PiperOrigin-RevId: 154477854
* worker: Do not check if the process is still alive prior to using it.Gravatar philwo2017-04-28
| | | | | | | | | | | | | | | This might sound strange at first, but the reasoning is this: A worker should never simply exit. Bazel controls the lifetime of its subprocesses, so a worker quitting is considered a failure (also because it cannot be distinguished from a crash). With that set, we can improve two things: - Bazel will now only notice that a worker crashed / quit when it tries to use one during a build. This is also the only time when we can print error messages to the user. Earlier we might have noticed that a worker crashed during validation, but had no mechanism to alert the user to this, because this wasn't necessarily during a build. - This also fixes a race condition where a worker is still alive during validation, then quits, then the WorkerSpawnStrategy tries to send a WorkRequest, which fails, triggering an IOException. This fixes the flaky test test_worker_restarts_after_exit (which is now called test_build_fails_when_worker_exits). Part of #2855. RELNOTES: Bazel will no longer gracefully restart workers that crashed / quit, instead this triggers a build failure. PiperOrigin-RevId: 154470257
* Only create the databinding annotation file onceGravatar cushon2017-04-28
| | | | PiperOrigin-RevId: 154462951
* worker: Extract two methods from actuallyExec for better readability.Gravatar philwo2017-04-28
| | | | | | Part of #2855. PiperOrigin-RevId: 154461639
* worker: Small refactoring of RecordingInputStream.Gravatar philwo2017-04-28
| | | | | | | | Prevents it from potentially throwing an UnsupportedEncodingException. Part of #2855. PiperOrigin-RevId: 154446897
* Re-introduce the overall_success field in BEP.Gravatar buchgr2017-04-28
| | | | | | | | Removal of BuildFinished.overall_success broke internal tests and thus we decided to reintroduce the field and deprecate it. RELNOTES: None. PiperOrigin-RevId: 154432961
* Store Skylark command-line flags in SkyframeGravatar brandjon2017-04-28
| | | | | | | | | This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment. This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there. RELNOTES: None PiperOrigin-RevId: 154432058
* Slight tweaks to text formatting of ErrorMessages.Gravatar philwo2017-04-28
| | | | | | Part of #2855. PiperOrigin-RevId: 154427566
* Simplify RecursiveDirectoryTraversalFunction: neither of its use cases were ↵Gravatar janakr2017-04-28
| | | | | | | | using the env variable passed into their visitors' methods, which means that we can stop passing them, and simplify the code a bit. Just a cleanup I noticed. PiperOrigin-RevId: 154426694
* Reformat Bazel crosstools to have consistent 2 spaces indentGravatar hlopko2017-04-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 154426101
* worker: Remove the "retry on failure" feature.Gravatar philwo2017-04-28
| | | | | | | | | | | | | It wasn't a good idea to have in the first place: - It only ever worked in certain random circumstances (e.g. worker returning an unparseable protobuf, but not when it crashed). - No other strategy implements a behavior like this. - Confusing to users and hard to describe what use case this is good for. - Complex and error prone code. Part of #2855. RELNOTES: The flag --worker_max_retries was removed. The WorkerSpawnStrategy no longer retries execution of failed Spawns, the reason being that this just masks compiler bugs and isn't done for any other execution strategy either. PiperOrigin-RevId: 154422561
* BEP: Also show the rule for each targetGravatar Klaus Aehlig2017-04-28
| | | | | | | | | When available, also show the rule in the TargetComplete event. This information might help to better interpret the output groups and the target in general. Change-Id: I36c06b9658fc72605f29e7e34ad7e5c83faa030c PiperOrigin-RevId: 154422414
* Retain target kind in TransitiveTraversalValueGravatar Googler2017-04-28
| | | | | | | | | | | | Introduces two sub-classes to TransitiveTraversalValue to store target references and errors separately. Target kind is retained in the TransitiveTraversalValues for all targets without errors. Interner now interns values for all built-in targets without errors. RELNOTES: None PiperOrigin-RevId: 154421161
* Make JavaCompilationArtifacts an AutoValue. Helpful for debugging.Gravatar Googler2017-04-28
| | | | | | | DELTA=41 (3 added, 29 deleted, 9 changed) DELTA_BY_EXTENSION=java=12 RELNOTES: None. PiperOrigin-RevId: 154418751
* Allow bypassing the automated detection of jobs when --jobs=auto.Gravatar jmmv2017-04-28
| | | | | | | | | | | | | | | | | | This is useful for the Blaze case where builds are cloud-backed. In that case, we need to use a very large number of jobs to handle the remote tasks, as each task is handled by a blocking thread controlled by jobs. We were previously doing this using an invocation policy, but the UI was extremely confusing: "blaze help build" would claim that the default for --jobs was "auto" when, internally, "auto" was being converted to the hardcoded number pretty much silently. However, explicitly specifying --jobs=auto on the command line yielded different behaviors. With this change, --jobs=auto works for both Bazel and Blaze and does sensible things in each case without the user having to know. RELNOTES: None. PiperOrigin-RevId: 154418572
* Use the new ErrorMessage class in WorkerTestStrategy. Also adds a nullGravatar philwo2017-04-28
| | | | | | | | check for the response and shows a helpful error message in that case. Part of #2855. PiperOrigin-RevId: 154416882
* BEP: Report exit code in BuildCompleteEventGravatar Jakob Buchgraber2017-04-27
| | | | | | | | | | | | | We decided to use the exit code as opposed to a status enum as bazel reports the build status as an exit code internally and the number of exit codes is dynamic. That is, a bazel module might add additional exit codes and thus we need to support reporting these. The overall_success field is now redundant and has thus been removed. A build was successfull iff ExitCode.code equals zero. Change-Id: I268db972b09d983f6cd07df34e3a384efb607358 PiperOrigin-RevId: 154413356
* BEP: enforce CommandLine before OptionsParsedGravatar Klaus Aehlig2017-04-27
| | | | | | | | | Add an order constraint the the command-line related events: the commandline should always be reported before the event reporting the completion of the option parsing. Change-Id: Ief1b822e2a8ce2f7d8f63c3b6182832d2bd102ef PiperOrigin-RevId: 154397674
* Init absent action configs for CppCompile actionsGravatar hlopko2017-04-27
| | | | | | | | | | 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: 154397672
* Hide --experimental_android_use_singlejar_for_multidex.Gravatar ajmichael2017-04-27
| | | | | | | This is a no-op so we can stop logging it. RELNOTES: None PiperOrigin-RevId: 154337425
* RELNOTES: Add Skylark stubs needed to remove sysroot from CppConfiguration.Gravatar Googler2017-04-27
| | | | PiperOrigin-RevId: 154334406
* Give RuleContext the ability to add Make VariablesGravatar Googler2017-04-27
| | | | | | This CL also makes CcToolchain responsible for adding the sysroot to CC_FLAGS. PiperOrigin-RevId: 154329746
* Add a way for options classes to mark that they are skyframe-friendlyGravatar brandjon2017-04-27
| | | | | | | You can now use the annotation @UsesOnlyCoreTypes on a subclass of OptionsBase, to indicate that all of its options' types are restricted to a whitelist of immutable and serializable types. Subclasses of the annotated class must also follow the same restriction. RELNOTES: None PiperOrigin-RevId: 154328920
* Add Scala IDE info to Intellij aspect.Gravatar Googler2017-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 154322648
* Automated g4 rollback of commit d5ee3b5397135eebd4b5d5b6bd4a4444093c4df8.Gravatar kchodorow2017-04-26
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** The go rules have tons of transitive dependencies that are not declared in their "local" WORKSPACE files, so this broke lots of projects on ci.bazel.build I'll fix up the go rules, update all of _their_ reverse-dep projects, and resubmit. *** Original change description *** Repositories can only be accessed in projects that define them in their WORKSPACE file This is prep for #1943 - hierarchical workspace loading. RELNOTES[INC]: Remote repositories must define any remote repositories they themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined in @x's WORKSPACE file). PiperOrigin-RevId: 154321845
* Automated g4 rollback of commit bcd23553f38f54fd4846aa507c827a4ee40cfab4.Gravatar ajmichael2017-04-26
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 154315543
* Remove jack and jill attributes of android_sdk.Gravatar ajmichael2017-04-26
| | | | | RELNOTES: Remove jack and jill attributes of the android_sdk rule. PiperOrigin-RevId: 154301683
* Adds a forwarder for instrumented files in AppleBinary.Gravatar kaipi2017-04-26
| | | | PiperOrigin-RevId: 154297741
* Repositories can only be accessed in projects that define them in their ↵Gravatar kchodorow2017-04-26
| | | | | | | | | | | | WORKSPACE file This is prep for #1943 - hierarchical workspace loading. RELNOTES[INC]: Remote repositories must define any remote repositories they themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined in @x's WORKSPACE file). PiperOrigin-RevId: 154295762
* Bazel client, Windows: impl. server->IsStillAliveGravatar Laszlo Csomor2017-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implement proper aliveness check for the Bazel server. This allows detecting a server death that occurs after the Java process started but before it started the gRPC server. On other platforms we open an anonymous pipe, let the server inherit the writing end, close the writing end in the client, and attempt to read non-blockingly in order to check if the server is still alive. This approach fails on Windows because anonymous pipes are always blocking. Named pipes support asynchronous access but it's much simpler to just check if the process exited. GetProcessTimes looks like a reliable way to do so, and that's what we use on Windows now. Fixes https://github.com/bazelbuild/bazel/issues/2817 Change-Id: Ic24577d8440eb0c8188c852e2501ce1e254ba9fd PiperOrigin-RevId: 154283585
* proto_library: Pass exec path to protoc. Fixes #2265Gravatar Jakob Buchgraber2017-04-26
| | | | | | | | When passing the paths of the proto files to protoc we need to use the exec path in order to also have correct paths for generated files. Change-Id: Id85b959829a0b159d30814314af631a90a4bd296 PiperOrigin-RevId: 154272610
* Archiving with --experimental_objc_crosstool=all/library includes precompiledGravatar cpeyser2017-04-26
| | | | | | object files. PiperOrigin-RevId: 154249983