aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Prune modules when building modules themselves to reduce build times shortenGravatar Googler2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | critical paths. When the inputs of a module M are reduced to a set S, then that same set S also needs to be supplied to compile something that uses M. To do this, input discovery is divided into two stages. For each CppCompileAction, the first stage discovers the necessary modules (M above). These are then added as inputs to ensure that they are built. The second stage then finds all the modules (S above) that are required to use those and also adds them as inputs. For now, the new behavior is guarded by a new flag --experimental_prune_more_modules. This is currently implemented by reading the .d files of used modules add adding all their module dependencies. There are two noteworthy alternatives: 1. Hack up input discovery to understand modules, e.g. if a modular header is hit, continue scanning from all it's headers. However, this seems very brittle and a lot of additional information would have to be passed to the input discovery. 2. Directly pass the results from input discovery of one CppCompileAction to another one. However, this seems to tightly couple the execution of different CppCompileActions and might lead to a mess of different states, more memory consumption, etc. With the current implementation, there is a bit of runtime overhead of reading the .d files (many times). This could potentially be improved by caching the results. However, even without this caching, the runtime overhead is limited (<10%) for all builds I have tried (I have tried with builds where all the compile results are already in the executor's cache. -- MOS_MIGRATED_REVID=140793217
* Clean up RuleContext's attribute access API.Gravatar Greg Estren2016-12-02
| | | | | | | | | | | | | | | All calls now go through RuleContext.attributes(), which guarantees both native and aspect-supplied attributes are checked. For aspect attributes, only type queries are supported (e.g. "does this attribute exist?", "what is its type?"). Not value queries. This is because the code this is cleaning up accesses aspect attributes through a String->Attribute map, which doesn't include values. If ever needed we could further extend with something more robust. -- MOS_MIGRATED_REVID=140771242
* Move constraint enforcement policy into attribute definitions.Gravatar Greg Estren2016-12-02
| | | | | | | | | This makes is easier to understand and change which attributes are checked. Also turn off checking for "data" and java_* "resources" attributes. -- MOS_MIGRATED_REVID=140771015
* Proto changes required to recognize external artifactsGravatar Googler2016-12-02
| | | | | -- MOS_MIGRATED_REVID=140769347
* Set User-Agent to "Bazel/{{Release Name}}" for http connectionsGravatar Justin Buchanan2016-12-02
| | | | | | | | | | | | | | Previously the java default was used, which was of the format "Java/x.x.x". This caused a problem fetching external dependencies for some websites that block user agents of that format. I initially was going to include the bazel version in the user agent string, but it seems that a version number isn't always baked into the bazel binary. When I compile bazel locally, no "Build label: x.x.x" shows up when I run `bazel version`. Fixes #2131 Closes #2148. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2148 MOS_MIGRATED_REVID=140750146
* Description redacted.Gravatar Googler2016-12-02
| | | | | -- MOS_MIGRATED_REVID=140742419
* Rollback of commit 7c4a8093da6272969c86f22a08c72ddbbf6e8274.Gravatar Kristina Chodorow2016-12-02
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke //src/test/shell/bazel:external_skylark_load_test See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/370/console, for example. *** Original change description *** Remove callerLabel from Environment. It is a Bazel-specific information. -- MOS_MIGRATED_REVID=140742037
* Compute module file compile command line flags right before executing theGravatar Googler2016-12-02
| | | | | | | | | | | | action. This removes flattening of nested sets (for the transitive/top-level header modules) in the analysis phase making it about 10% faster. Also remove the calculation of top-level modules entirely as it doesn't seem to be necessary and doing it might actually lead to unexpected results when actions are restored from cache and thus the module input flags are computed from the actually used inputs (determined from .d files). -- MOS_MIGRATED_REVID=140738461
* Replace UnixGlob's package glob prefetching functionality with anGravatar Googler2016-12-02
| | | | | | | | optional method in FileSystem. Custom FileSystem implementations can use this to provide their own implementation of glob prefetching. -- MOS_MIGRATED_REVID=140736304
* Add --ltoindexopt to pass options to LTO indexing stepGravatar Googler2016-12-02
| | | | | | | This makes it much easier to pass options just to the LTO indexing. Previously these had to be passed via --linkopt, but that also passed the options to the final native link, which causes issues since most useful ThinLTO indexing options are plugin options and gold gives an error when these are passed to native links not involving a plugin. -- MOS_MIGRATED_REVID=140735846
* Description redacted.Gravatar Googler2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140731289
* Rollback of commit 2a2be3907981d9654575493c7012d95d1241f373.Gravatar Googler2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140721733
* Remove callerLabel from Environment.Gravatar Laurent Le Brun2016-12-01
| | | | | | | It is a Bazel-specific information. -- MOS_MIGRATED_REVID=140719791
* Gracefully handle unset JAVA_HOMEGravatar Klaus Aehlig2016-12-01
| | | | | | | | | | | | getenv("JAVA_HOME") may return a null pointer; in this case, the corresponding string is in a state where calling .empty() segfaults. However, there is a legimitate use case for JAVA_HOME not being set; in fact, the default "/usr/local/openjdk8" is usually fine on FreeBSD. -- Change-Id: I4a2ad7d19ef38c79e9f1c62b0f8041e434203c7f Reviewed-on: https://cr.bazel.build/7590 MOS_MIGRATED_REVID=140716748
* Rollback of commit c182908910a370b490e7e027b867e11f9f2fb086.Gravatar Michajlo Matijkiw2016-12-01
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=140687884
* Initial commit of cc_proto_library.Gravatar Carmi Grushko2016-12-01
| | | | | | | RELNOTES: cc_proto_library generates C++ code from proto_library rules. -- MOS_MIGRATED_REVID=140680034
* Overrides BuildConfiguration.equals() for dynamic configs.Gravatar Greg Estren2016-12-01
| | | | | | | | | This makes ConstraintsTest#hostDependenciesNotCheckedNoDistinctHostConfiguration pass with --experimental_dynamic_configs=notrim (the host config is the same as the target config but it's still a separate instance). -- MOS_MIGRATED_REVID=140652716
* Use MessageDigest instead of HashFunction for FingerprintGravatar Michajlo Matijkiw2016-12-01
| | | | | | | | | This allows us to reset and reuse the underlying digest implementation, which guava's HashFunction doesn't allow. We do take the clone-if-possible page out of guava's book. -- MOS_MIGRATED_REVID=140624836
* Re-enable modules pruning for fake compile actions. I think our initialGravatar Googler2016-12-01
| | | | | | | | assessment was wrong and this does work properly now that all the inputs are properly declared. -- MOS_MIGRATED_REVID=140618631
* Description redacted.Gravatar Googler2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140613176
* Move the useHeaderModules member from CppCompilationContext into theGravatar Googler2016-12-01
| | | | | | | | | | | | CppCompileAction. It seems wrong to bind this to a context. Instead, we should be able to determine for each action, whether it can use modules or not. Also allow overwriting the value obtained by the feature configuration in the CppCompileActionBuilder. This can e.g. be used to disable modules in CppSemantics.finalizeCompileActionBuilder(), if modules cannot be supported under certain circumstances. -- MOS_MIGRATED_REVID=140610096
* Allow aspects to specify multiple sets of required providers to match ↵Gravatar Rumou Duan2016-12-01
| | | | | | | against rules. Aspects can attach to a rule if at least one set of required providers are present on the rule. -- MOS_MIGRATED_REVID=140605023
* Start removing flag for rclass generator (make nop)Gravatar Googler2016-12-01
| | | | | | | | | | | | | | Flip option default to true to mirror flag flip and make the option a nop. After that we can remove the flag reference, and then we can remove the actual option. RELNOTES: --{no}experimental_use_rclass_generator is now a nop. It's been on by default for a while, and there are no references, so seems safe to remove. -- MOS_MIGRATED_REVID=140602921
* Allow dicts to contain non-comparable objects as keysGravatar Vladimir Moskva2016-11-30
| | | | | | | | RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept any hashable values (i.e. structs with immutable values) as keys. Iteration order of dictionaries is no longer specified. -- MOS_MIGRATED_REVID=140591710
* Only announce test summaries in BEP if expectedGravatar Klaus Aehlig2016-11-30
| | | | | | | | | | | In some situations, we do not even expect a test summary to appear in the BEP, e.g., if testing is not asked for. Do not announce a test summary in this case. -- Change-Id: Ifd46e3582292b087bb1d37f255a140f631854830 Reviewed-on: https://cr.bazel.build/7373 MOS_MIGRATED_REVID=140589645
* --experimental_android_use_singlejar_for_multidex compresses classes*.dexGravatar Adam Michael2016-11-30
| | | | | | | Currently, setting this flag on a native multidex build results in classes*.dex being stored in the APK uncompressed which is certainly not good. -- MOS_MIGRATED_REVID=140561305
* Default behavior of proto_library's strict-proto-deps is now determined by ↵Gravatar Carmi Grushko2016-11-30
| | | | | | | | | the value of a flag. Used to be hardcoded to "yes, check for strict proto deps" because the value of the "strict_proto_deps" attributes was "true". -- MOS_MIGRATED_REVID=140538461
* Remove private headers from modulemaps generated by objc_ targetsGravatar Dmitry Shevchenko2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140498934
* Support multiple mirror URLs for external reposGravatar Justine Tunney2016-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves upon 4c67807964e37cfd55bbcda4c6374fcc480bcecc. - A urls attribute has been added to the native workspace rules, with the exception of maven_jar and git_repository. The Skylark repository API also supports multiple URLs now. - The earlier mirrors in the list are preferred. Failover will happen automatically in parallel. - The first 32kB of data is checked before choosing a mirror in order to evade captive portals. - If one's Internet goes down or a download times out, then the download will resume automatically where it left off, provided the server supports RFC7233 for that particular file. Please note that GitHub does not support this for archive snapshots. Files should always be mirrored to a CDN, e.g. GCS, because they support this. - A semaphore is now used on downloads so only 8 can happen at once. Fixes #1814 Fixes #2131 Fixes #2008 Fixes #1968 Fixes #1717 Fixes #943 Wont fix #1194 Fixes tensorflow/tensorflow#5933 Fixes tensorflow/tensorflow#5924 Fixes tensorflow/tensorflow#5924 Fixes tensorflow/tensorflow#5432 See #1607 See #821 See tensorflow/tensorflow#5080 See tensorflow/tensorflow#5029 See tensorflow/tensorflow#4583 See tensorflow/tensorflow#4058 RELNOTES: A urls attribute has been added to repository rules to support multiple mirror URLs for reliably downloading files. -- MOS_MIGRATED_REVID=140495736
* Let the sandbox ignore ESTALE errors on remounting file systems.Gravatar Philipp Wollermann2016-11-29
| | | | | | | These may happen when a broken NFS mount is present on the user system. Ideally, that mount should just be fixed or removed, but where this is not possible, it's probably safe to ignore it. -- MOS_MIGRATED_REVID=140476478
* Rename android_studio_ide_info proto and members.Gravatar Googler2016-11-29
| | | | | | | | | android_studio_ide_info -> intellij_ide_info RuleIdeInfo -> TargetIdeInfo Drop "rule" from all sub-ide infos (eg. JavaRuleIdeInfo -> JavaIdeInfo) -- MOS_MIGRATED_REVID=140438983
* Make it easier to use protos in Bazel out of the box.Gravatar Carmi Grushko2016-11-29
| | | | | | | | | java_xxx_proto_library rules now look for toolchains in the external repo @com_google_protobuf_xxx//:xxx_toolchain This still requires getting protobuf's GitHub repository to build with Bazel. -- MOS_MIGRATED_REVID=140420903
* Update ParallelSkyQueryUtils to use QuiescingExecutor instead of ForkJoinPoolGravatar Googler2016-11-29
| | | | | | | | | | | for concurrent visitations. During BFS visitation of rdeps and rbuildfiles, it uses a centralized pool (backed by a LinkedBlockingQueue) to store all pending visits, and a periodically running scheduler to schedule tasks for each pending visit. -- MOS_MIGRATED_REVID=140398162
* Remove isSkylark and eval from Environment.Gravatar Laurent Le Brun2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140371603
* Default flag --experimental_j2objc_annotation_processing to true.Gravatar Rumou Duan2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140369825
* Makes the --test_env command line options available in skylark's rule context.Gravatar Sergio Campama2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140369679
* Minor fix to SpawnAction.BuilderGravatar Jon Brandvein2016-11-29
| | | | | | | useDefaultShellEnvironment is exclusive with clientEnvironmentVariables. -- MOS_MIGRATED_REVID=140366745
* Provide AspectDescriptor to ConfiguredAspect.Gravatar Dmitry Lomov2016-11-29
| | | | | | | | Also clean up the setting of aspect name in ConfiguredAspect and AspectDefintion - it is now obtained from the AspectClass. -- MOS_MIGRATED_REVID=140357052
* Enable run_memleaks ObjcConfiguration in Skylark.Gravatar Sergio Campama2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140356545
* SkylarkCallbackFunction no longer cares about the obsolete 'cfg' parameter.Gravatar Florian Weikert2016-11-29
| | | | | | | | | Depot cleanup is in unknown commit. RELNOTES[INC]: Callback functions in Skylark no longer support the cfg parameter. This is a cleanup and only affects the signatures of callbacks, since the parameter hasn't been set since September 2016. -- MOS_MIGRATED_REVID=140356006
* Rollback of commit eb06c40d10652af258bee1a0277916007eccc69a.Gravatar Adam Michael2016-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** This change was misidentified as the culprit of a user-error bug. *** Original change description *** Automated [] rollback of commit 2eaa31fade12242b7075c2bbac945aeeedf985e8. *** Reason for rollback *** breaks a couple of iPhone targets in nightly, see [] *** Original change description *** Sign app and frameworks in simulator builds. This has become necessary starting with Xcode 8 although we apply the signature in all cases. Signing is done without entitlements and with signing identity "-". -- MOS_MIGRATED_REVID=140353891
* Bazel client: make it compile with MSVCGravatar Laszlo Csomor2016-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | Final modifications to the Bazel client code so we can compile //src/main/cpp/...:all using MSVC. Yay! We still have some dependencies that don't compile with MSVC, namely Ijar, build-runfiles, process-wrapper, and process-tools. Still, this change is a huge success, because now we can add regression tests to prevent people from introducing breaking changes to the client that would break Windows/MSVC compilation. It's important to point out that we can only build this library for now, most functions in file_windows.cc and blaze_util_windows.cc have an empty body (they just call `pdie`). See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140348351
* Bazel client: more platform-specific logicGravatar Laszlo Csomor2016-11-28
| | | | | | | | | | Move terminal-querying functions and GetUserName from blaze_util.cc into blaze_util_<platform>. See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140346402
* Bazel client: platform-specific {Read,Write}FileGravatar Laszlo Csomor2016-11-28
| | | | | | | | | | | | | | | | Move blaze::ReadFile and blaze::WriteFile to file.h and file_platform.h (thus into the blaze_util namespace), and update references. This allows us to implement these methods in a platform-specific way. Also move UnlinkPath. See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140328273
* Use BlazeInterner's chosen concurrency level in InternerWithPresenceCheck's ↵Gravatar Nathan Harmata2016-11-28
| | | | | | | internal ConcurrentMap. -- MOS_MIGRATED_REVID=140253038
* Make Runfiles.SymlinkEntry implement SkylarkValue.Gravatar Eric Dobson2016-11-28
| | | | | | | | | | Fixes #1109 Closes #2126. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2126 MOS_MIGRATED_REVID=140217086
* Bazel client: platform-dependent lock handlingGravatar Laszlo Csomor2016-11-28
| | | | | | | | | | Move blaze::AcquireLock and blaze::ReleaseLock into blaze_util_<platform>. See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140200355
* Bazel client: mock out read/write callsGravatar Laszlo Csomor2016-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | Make blaze::ReadFileDescriptor(int fd, ...) and blaze::WriteFile(int fd, ...) platform-independent by mocking out the read(2) and write(2) calls. Also rename ReadFileDescriptor to ReadFrom and introduce a new WriteTo method that encapsulates WriteFile's prior logic. In particular these functions now take a read_func/write_func function argument instead of a file descriptor, so the read(2)/write(2) calls can be mocked out. This allows us to use these functions on Windows too, where read(2)/write(2) are not implemented, and we can inject a different read_func/write_func. See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140195973
* Be smarter about Content-Encoding: gzip downloadsGravatar Justine Tunney2016-11-25
| | | | | | | | | Fixes #2136 RELNOTES: n/a -- MOS_MIGRATED_REVID=140190547
* Do not flatten nested sets in Variables.Builder.addStringSequenceVariableGravatar Marcel Hlopko2016-11-25
| | | | | -- MOS_MIGRATED_REVID=140181324