aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
Commit message (Collapse)AuthorAge
...
* Implement OutputGroupInfo provider.Gravatar dslomov2017-05-03
| | | | | | | Work towards #2894. RELNOTES: None. PiperOrigin-RevId: 154829065
* Automated g4 rollback of commit 38b835097f9ae9a6062172b8a33ec2e2d1edde20.Gravatar dmarting2017-05-02
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaking Bazel build on linux, see http://ci.bazel.io/job/bazel-tests/733/ Repro: bazel build //src/test/java/com/google/devtools/build/lib:packages_test Found by bisecting. *** Original change description *** Only allocate some formerly frequently allocated PathFragment objects once. This reduces both gc churn and retained memory usage. RELNOTES: None PiperOrigin-RevId: 154821457
* BuildEventStreamer: support also providing stdout/stderrGravatar Klaus Aehlig2017-05-02
| | | | | | | | | | | | | Extend the build-event streamer to also report about stdout/stderr, if provided. This information is reported in the progress events. At the moment, we only report stdout/stderr in progress events we send anyway, but the interface is generic enough that we could add time-based reporting later, if needed. Also note, that at the end of the build, we report the final progress event, so that all stdout/stderr generated before the build-complete event get also reported in the build-event protocol. Change-Id: If5dbd59c151edbce02d0a9b2e5938b63c0a5dc58 PiperOrigin-RevId: 154811110
* Automated g4 rollback of commit 27a136b9bbb4d73b0a343d407b5da9f890175aea.Gravatar ajmichael2017-05-02
| | | | | | *** Reason for rollback *** PiperOrigin-RevId: 154776438
* Automated g4 rollback of commit d5217515002d468a3095243975e21e89eccc46b7.Gravatar ajmichael2017-05-02
| | | | | | | | | *** Reason for rollback *** Relies on a CL that is being rolled back due to breaking some LIPO builds. RELNOTES: None PiperOrigin-RevId: 154776370
* Remove implicit requirements on --use_singlejar_apkbuilder.Gravatar ajmichael2017-05-02
| | | | | | | The flag is still a no-op without --use_singlejar_apkbuilder. RELNOTES: None PiperOrigin-RevId: 154744739
* apple_static_library passes the correct crosstool to platform-specific compileGravatar cpeyser2017-05-02
| | | | | | and fully linke actions. PiperOrigin-RevId: 154733524
* Support cpufeatures from Android NDK.Gravatar ajmichael2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2499. Example usage: $ cat jni.cc #include "ndk/sources/android/cpufeatures/cpu-features.h" ... AndroidCpuFamily family = android_getCpuFamily(); $ cat BUILD cc_library( name = "jni", srcs = ["jni.cc"], deps = ["@androidndk//:cpufeatures"], ) android_binary( name = "app", manifest = 'AndroidManifest.xml', srcs = glob(["*.java"]), deps = [":jni"], ) $ cat WORKSPACE android_sdk_repository(name = 'androidsdk') android_ndk_repository(name = 'androidndk') RELNOTES: android_ndk_repository now creates a cc_library (@androidndk//:cpufeatures) for the cpufeatures library that is bundled in the Android NDK. See https://developer.android.com/ndk/guides/cpu-features.html for more details. PiperOrigin-RevId: 154732798
* Roll forward of ↵Gravatar Googler2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/bazelbuild/bazel/commit/5f31944b8942818aaf53571c76f5c6a9a9dafc72: Custom module map for j2objc_library Automated g4 rollback of commit e7fe50aa727df9ef0a3d37fa258d017971035515. *** Reason for rollback *** Roll forward. The bzl change is removed because it has to be submitted after next Blaze release. *** Original change description *** Automated g4 rollback of commit 5f31944b8942818aaf53571c76f5c6a9a9dafc72. *** Reason for rollback *** This caused some build breaks. *** Original change description *** Custom module map for j2objc_library PiperOrigin-RevId: 154726197
* Move platform providers to a new package to break cyclic dependencies.Gravatar John Cater2017-05-02
| | | | | | | Part of #2219. Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d PiperOrigin-RevId: 154719063
* 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