aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Remove usages of `+` on dictsGravatar vladmos2018-01-03
| | | | | | | | | The `+` operator on dicts is deprecated and will be removed. This change makes Bazel files compatible with the new behavior. Fixes #4346. PiperOrigin-RevId: 180702882
* @AutoCodec: proper handling of checked exceptions thrown by constructors.Gravatar shahan2018-01-03
| | | | PiperOrigin-RevId: 180697983
* Adds the @AutoCodec.Constructor annotation for selecting constructors.Gravatar shahan2018-01-03
| | | | | | Uses the constructor having the @AutoCodec.Constructor annotation to generate a codec (instead of choosing the first in source code). This annotation is required when a class has more than one constructor. PiperOrigin-RevId: 180685902
* Refactor Windows C++ toolchain selectionGravatar Yun Peng2018-01-03
| | | | | | | | | | | | | | | | | | | We used to have --cpu=x64_windows_msys for selecting msys gcc toolchain, this is a misuse of --cpu flag. Instead, we should use --compiler flag to select C++ toolchain. For example, --compiler=msvc-cl, --compiler=msys-gcc, --compiler=mingw-gcc After this change, we can use mingw gcc toolchain by following steps: 1. In MSYS, install mingw by `pacman -S mingw-w64-x86_64-gcc` 2. Add /mingw64:/mingw64/bin into PATH 3. build with --compiler=mingw-gcc Related: https://github.com/bazelbuild/rules_go/issues/736 Change-Id: I4b5f77ce0698cfcafefe5d2ab17657f9c9e295d3 PiperOrigin-RevId: 180678829
* Expose platform flags for documentation purposes.Gravatar John Cater2018-01-03
| | | | | | | | | Also remove experimental tag from platform and toolchain flags in docs. Fixes #4372. Change-Id: I4e8f29273b52fbaabf9c97d1a7563f817601653f PiperOrigin-RevId: 180678722
* Consolidate calls to AnalysisUtils.getTopLevelTargetsWithConfigs which ↵Gravatar juliexxia2018-01-03
| | | | | | conveniently also makes it unnecessary to pass the entire LoadingResult when doing configured queries post analysis. PiperOrigin-RevId: 180676481
* Rework implementation of --nobuild_runfile_manifests.Gravatar Benjamin Peterson2018-01-03
| | | | | | | | | | | | | When --nobuild_runfile_manifests is passed, don't create runfiles input or output manifests at all. This seems better than creating fake manifest artifacts that are actually a middleman. Fail fast for local tests and the run command when --nobuild_runfiles_manifests is passed. (These cases were failing with obscure errors before under --nobuild_runfile_manifests-I just improved the messaging. See https://github.com/bazelbuild/bazel/issues/4177.) Change-Id: I351d26f746ecbe47016b58e4662768a5b6a72ff2 PiperOrigin-RevId: 180659571
* Fix link to cpp-use-cases.mdGravatar Yves Junqueira2018-01-03
| | | | | | Closes #4352. PiperOrigin-RevId: 180659440
* @AutoCodec: Uses sun.misc.Unsafe to retrieve fields for serialization.Gravatar shahan2018-01-02
| | | | | | | | This is fast (profiles indicate a 9% penalty vs getters) and does not require getters. * Also adds a Marshaller for java.util.regex.Pattern. * Minor fixes for codecs that were broken by this change. PiperOrigin-RevId: 180619680
* Change the default for value for experimental_skyframe_native_filesets now ↵Gravatar kush2018-01-02
| | | | | | | that most Google builds have it set to true. RELNOTES: None PiperOrigin-RevId: 180578926
* Make android_local_test use robolectric's framework manifest parser.Gravatar dannark2018-01-02
| | | | | RELNOTES: None PiperOrigin-RevId: 180562543
* Fix testPlusEqualsOnDictGravatar vladmos2018-01-02
| | | | | | | The said test fails if the --incompatible_disallow_dict_plus flag is flipped by default (e.g. in a .bazelrc file) PiperOrigin-RevId: 180553910
* Use -no-canonical-prefixes when -fno-canonical-system-headers is not availableGravatar ibiryukov2018-01-02
| | | | | | | | | | | | Bazel's autoconf script adds -fno-canonical-system-headers to gcc's crosstool in order to get output in '.d' files that can be properly verified by bazel. To workaround the same issue in clang we have to use a different flag: '-no-canonical-prefixes'. The same issue arises with clang if it resides in the configured repository (e.g., when it is downloaded via 'repository_ctx.download'). PiperOrigin-RevId: 180552155
* test: use bazel_with_jdk in py integration testGravatar Laszlo Csomor2018-01-02
| | | | | | | | | This change avoids the need to inject the user's JAVA_HOME into the test, or to discover the JDK's location on Windows. Change-Id: Icec2f23ff61d52406eabe36367130d00535d8764 PiperOrigin-RevId: 180547577
* Use relative paths for repository-local files in C++ crosstoolGravatar ibiryukov2018-01-02
| | | | | | | | | | | | | | | Generated crosstool previously used absolute paths for everything. However, when using a compiler, local to the repository (e.g., downloaded via 'repository_ctx.download'), relative paths should be used to avoid absolute paths that point into the crosstool repository. Specifically, this patch contains the following changes: 1. Replaces absolute paths in 'cxx_builtin_include' with relative if includes point inside the repository. 2. Removes the '-B<compiler-dir>' from 'compiler_flag' and 'linker_flag' sections when compiler is inside the repository. PiperOrigin-RevId: 180540359
* Add libstdc++-static to the fedora dockerfileGravatar hlopko2018-01-02
| | | | | | | | This fixes //src/test/docker/test_cc_configure-fedora23-fastbuild after https://github.com/bazelbuild/bazel/commit/2aeaeba66857c561dd6d63c79a213f1cabc3650d. RELNOTES: None. PiperOrigin-RevId: 180535604
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* Don't output duplicate srcs when jar and sourcejar are the sameGravatar Auke Schrijnen2018-01-02
| | | | | | | | | | When a source jar is used as maven_jar the filegroup in the generated BUILD.bazel contains duplicate entries. This results in an error when the jar is used as a dependency (... is duplicated in the 'srcs' attribute of rule 'file'). This change simply doesn't write the duplicate entry to the BUILD.bazel file when the filenames are equal. Closes #4333. PiperOrigin-RevId: 180534960
* Enable switching def_parser's Windows target for remote executionGravatar Yun Peng2018-01-02
| | | | | | | | | | | | When --define EXECUTOR=remote is specified in bazel command, embedded tools 'def_parser' will be compiled remotely from source. Because def_parser itself is a cc_binary, if we want to compile it remotely, to avoid cycle dependency it cannot be a dependency of cc_toolchain. Therefore, we make it a dependency of cc rules. Change-Id: I77faf77238f8edd3585d0e5e5c780b14e9782a40 PiperOrigin-RevId: 180534568
* Add android_local_test rule to Bazel.Gravatar dannark2017-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule enables testing android_librarys locally in the jvm (as opposed to on a device). To use this rule with robolectric (robolectric.org), add the following to your WORKSPACE file: http_archive( name = "bazel_android", url = "...", ) load("@bazel_android//:setup_robolectric.bzl", "setup_robolectric") setup_robolectric() and then an android_local_test rule would need to add: "@bazel_android//:robolectric", to its dependencies. android_local_test( name = "MyTest", srcs = ["MyTest.java"], deps = [ "//java/app:lib", "@bazel_android//:robolectric", ], ) RELNOTES[NEW]: New android test rule, android_local_test. PiperOrigin-RevId: 180438995
* Remove obsolete ConfigurationTransition.SPLIT.Gravatar gregce2017-12-28
| | | | PiperOrigin-RevId: 180291093
* Remove synchronization from file system.Gravatar tomlu2017-12-28
| | | | | | | | | | After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The last attempt to do this failed because of races in FileUtils#createDirectoryAndParents on Windows. This method is now gone, replaced by a method from the Java framework that knows how to synchronize. PiperOrigin-RevId: 180290901
* Intern the BuildConfigurationValue.Key instances that we create. Currently ↵Gravatar janakr2017-12-28
| | | | | | | | | | we don't create too many of them, but it'll be nice to have this interning for future work in which there are many more of them. When comparing BuildConfiguration instances, compare their full BuildOptions fields, which can compare quickly due to fingerprint caching, as opposed to their raw options, which is slow. Also intern the map of Fragments that we create as part of a BuildConfiguration. There aren't too many of them either, but it means that equal Fragment sets can be compared using reference equality downstream. PiperOrigin-RevId: 180289334
* AutoCodec: support for ImmutableListMultimap, ImmutableMultimap and ↵Gravatar Googler2017-12-28
| | | | | | ImmutableMap types. PiperOrigin-RevId: 180288965
* Undo change to introduce methods to remove file system instance from Path.Gravatar tomlu2017-12-28
| | | | | | | | I no longer believe that it is worthwhile to remove the file system instance from Path. Measurements indicate that I can simply replace the Path implementation in one go and just leave the instance on the Path class. This CL was done entirely using IDE refactoring, so should be safe. PiperOrigin-RevId: 180287162
* After getting rid of LabelAndConfiguration, simplify some code by providing ↵Gravatar janakr2017-12-28
| | | | | | a ConfiguredTargetKey directly. PiperOrigin-RevId: 180285691
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Fix test that accidentally masked an exceptionGravatar brandjon2017-12-28
| | | | | | | Looks like the test was originally broken (to always pass) by https://github.com/bazelbuild/bazel/commit/01120026dc313ee7ad9ea95069a29252eb19173b and its roll-forward https://github.com/bazelbuild/bazel/commit/950310ff911da6c26339f4dc0b124487adc0cdbb. RELNOTES: None PiperOrigin-RevId: 180272998
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* AutoCodec features.Gravatar Googler2017-12-27
| | | | | | | | * Support for Optional, Iterable, Collection and proto types. * Support for getters that omit 'get' prefix. * Support for constructors that throw exceptions. PiperOrigin-RevId: 180235121
* Fix include scanner's absolute path handling.Gravatar tomlu2017-12-27
| | | | | | | | | When absolute include dirs are used we can discover absolute includes outside any known root. * Fix bug where we try to create an absolute exec path. Instead, make the exec path relative to the root directory '/'. * Reverse the condition we use to filter absolute includes. We can identify these by their fake root ('/') before we create a path and linearly check if it is a system include. PiperOrigin-RevId: 180217154
* Adds ObjectCodecs for FragmentOptions and BuildOptions.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180211710
* Refactor Info classGravatar brandjon2017-12-27
| | | | | | | This simplifies the location field (now non-nullable), removes a couple redundant loc args, and clarifies the type's description and some javadoc. RELNOTES: None PiperOrigin-RevId: 180210943
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Memoize equals and hashCode operations for BuildOptions. Currently, equality ↵Gravatar janakr2017-12-24
| | | | | | is so slow that if we have to compare many of them, the build can basically never finish. This is needed for a follow-up in which BuildOptions are part of many SkyKeys. PiperOrigin-RevId: 180056834
* Stop using AtomicLongMap in AbstractQueueVisitor.Gravatar tomlu2017-12-24
| | | | | | | This class generates tons of garbage. It's better to manually use a ConcurrentHashMap + AtomicLongs. RELNOTES: None PiperOrigin-RevId: 180053164
* @AutoCodec features and refactoring.Gravatar Googler2017-12-23
| | | | | | | | * Features - ImmutableList, Map, ImmutableSortedMap, and ProtocolMessageEnum types. * Refactoring - creates an abstraction, "Marshaller", to replace a big switch over supported types. * Cleanup - implements equals for most of the test classes. PiperOrigin-RevId: 180024241
* Enable local action execution statistics collection for sandboxed actions ↵Gravatar ruperts2017-12-22
| | | | | | | | | | | that use the DarwinSandboxedSpawnRunner. In particular, record metrics for user and system CPU execution time, block I/O and involuntary context switches. This feature is guarded behind a new option, --experimental_collect_local_sandbox_action_metrics. RELNOTES: None. PiperOrigin-RevId: 179980734
* Enable local action execution statistics collection for sandboxed actions ↵Gravatar ruperts2017-12-22
| | | | | | | | | | | | | that use either the LinuxSandboxedSpawnRunner or the ProcessWrapperSandboxedSpawnRunner. In particular, record metrics for user and system CPU execution time, block I/O and involuntary context switches. This feature is guarded behind a new option, --experimental_collect_local_sandbox_action_metrics. Note: We still need to enable execution statistics for the DarwinSandboxedSpawnRunner in a later change. RELNOTES: None. PiperOrigin-RevId: 179976217
* Mark toolchain_test as flaky until we can uncover the cause and fix it.Gravatar jcater2017-12-22
| | | | PiperOrigin-RevId: 179962502
* Fix wrong description library -> binaryGravatar Passw2017-12-22
| | | | | | Closes #4344. PiperOrigin-RevId: 179962459
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Remove some dead code from AndroidIdeInfoProvider.Gravatar ajmichael2017-12-22
| | | | | RELNOTES: None PiperOrigin-RevId: 179947662
* Bump up the max number of changed files we INFO-log to 10.Gravatar nharmata2017-12-22
| | | | | RELNOTES: None PiperOrigin-RevId: 179944277
* PiperOrigin-RevId: 179941785Gravatar Googler2017-12-22
|
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove more dead codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179933248
* PiperOrigin-RevId: 179932935Gravatar ajmichael2017-12-22
|
* Replaces some existing codecs with @AutoCodec.Gravatar Googler2017-12-22
| | | | PiperOrigin-RevId: 179931575
* Tell PackageFunction if it will never be used to do incremental package ↵Gravatar nharmata2017-12-22
| | | | | | | | | | | loading. Have PackageFunction optimize for the non-incremental case by not doing Skyframe [hybrid] globbing. Have AbstractPackageLoader use PackageFunction in non-incremental mode (recall that AbstractPackageLoader, by design, has no incrementality). Since AbstractPackageLoader now doesn't need GlobFunction, it now also doesn't need DirectoryListingFunction and therefore also doesn't need DirectoryListingStateFunction. In the entire Bazel codebase, DirectoryListingStateFunction is only used by DirectoryListingFunction. And DirectoryListingFunction's only use in package loading (in cases currently supported by AbstractPackageLoader*) is GlobFunction. *AndroidRepositoryFunction apparently uses DirectoryListingFunction, but AbstractPackageLoader doesn't yet support all Bazel repository types. We can address this in future changes, if needed. RELNOTES: None PiperOrigin-RevId: 179931359