| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Working towards: https://github.com/bazelbuild/bazel/issues/3311
When building dynamic library on Windows, Bazel builds an import library
and a DLL.
Bazel provides a feature called windows_export_all_symbols, if this
feature is enabled(and no_windows_export_all_symbols is not) for a
cc_library, then Bazel parses object files of that cc_library to generate
a DEF file that will be used during linking time to export symbols from
DLL. This feature can be specified at crosstool, package, target and
command line level.
A few differences from Unix platforms:
1. We don't build the shared library on Windows by default, users have to
specifiy --output_groups=dynamic_library for building dynamic libraries.
This output group is also available on other platforms.
2. By default, cc_test is dynamically linked on Unix, but it will be
statically linked on Windows by default. (meaning the default value of
linkstatic in cc_test is 1 on Windows, and 0 on other platforms)
3. For global data symbols, __declspec(dllimport) must still be used in
source files.
Remaining issues:
1. Extensions for import library and DLL are not correct yet.
2. DLLs are not guaranteed to be available during runtime yet.
3. Diamond problem
If a cc_library A is specified as linkstatic=0, then no dynamic library
will be built for it, so if another cc_library B depends on it, A will
be statically linked into B, and if a cc_binary C depends on B, A will
also be statically linked into C and B will be dynamically linked to C.
This is wrong because A is duplicated in both B and C.
It is essentially a diamond problem describled in C++ Transitive Library.
(https://docs.google.com/document/d/1-tv0_79zGyBoDmaP_pYWaBVUwHUteLpAs90_rUl-VY8/edit?usp=sharing)
Hopefully, we can avoid this by using cc_shared_library rule in future.
Change-Id: I23640d4caf8afe65d60b1522af6368536d7a8408
PiperOrigin-RevId: 168829958
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks Bazel building itself on FreeBSD, also #3739.
*** Original change description ***
Introduce empty "toolchain_category" rule for labels that will be used as
categories of toolchains for the purpose of toolchain selection.
Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm.
PiperOrigin-RevId: 168810566
|
|
|
|
| |
PiperOrigin-RevId: 168802886
|
|
|
|
|
|
| |
This is necessary for the upcoming Skylark implementation of param files.
PiperOrigin-RevId: 168744486
|
|
|
|
|
|
|
|
| |
support into the bargain).
Equality checking isn't that important since there's only one instance per Blaze server, but it keeps serialization semantics reasonable.
PiperOrigin-RevId: 168735669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new flag, --use_top_level_targets_for_symlinks.
Configuration-specific convenience symlinks (i.e., (prefix)bin,
(prefix)genfiles, (prefix)testlogs) previously pointed at the one top-level
target configuration. If there were multiple top-level target configurations,
which could only happen when --experimental_multi_cpu was used, then no symlinks
would be created, though they would not be deleted either.
With the flag on, the output directories of the configurations actually used by
the top-level targets (after rule class transitions etc.) are compared. If all
targets with non-null configurations have the same configuration (or, more
specifically, if all targets with non-null configurations have configurations
with the same output directory), then a symlink is created pointing at it.
Otherwise, the symlink is deleted, to avoid confusion with stale symlinks from
old builds.
Known changes in behavior WITHOUT the flag turned on:
* In the --experimental_multi_cpu case, non-configuration-specific
convenience symlinks (i.e., (prefix)(workspace) and (prefix)out) will always
be created, even though they previously wouldn't have been created at all in
this case. (should be harmless)
* In the --experimental_multi_cpu case, configuration-specific convenience
symlinks will be created if all configs have the same output directory.
(should be safe, or specifically, should never happen because multi-cpu
would necessarily change the output path, but shouldn't hurt anything even if
it did)
* In the --experimental_multi_cpu case, configuration-based convenience
symlinks will be deleted if some configs have a different output directory.
(slightly more noticeable since that will be every build using
experimental_multi_cpu, but then, it is experimental)
RELNOTES: None.
PiperOrigin-RevId: 168720843
|
|
|
|
|
|
|
|
|
| |
Fixes #3526
Closes #3725.
Change-Id: Ice068542e574661f9dff199f88a1e56fea191de3
PiperOrigin-RevId: 168720424
|
|
|
|
| |
PiperOrigin-RevId: 168703757
|
|
|
|
|
|
|
|
| |
If a test command is aborted as no tests are found, still generate a BuildComplete
event in the sequence of build events to properly report the exit status.
Change-Id: Id811a116b309a26e67332947b3a5c66363b1ce9c
PiperOrigin-RevId: 168703240
|
|
|
|
| |
PiperOrigin-RevId: 168692738
|
|
|
|
|
|
|
|
|
|
|
|
| |
NetUtil.getShortHostName can take seconds on mac and on windows (like, 20!),
since it performs reverse dns lookup. We already cached hostname for the
BazelWorkspaceStatusModule, let's cache it for entire bazel server. Also make
sure that users of the method understand it's cached.
Fixes #3586.
RELNOTES: None.
PiperOrigin-RevId: 168691615
|
|
|
|
|
|
|
|
|
| |
raise a warning/error depending on --experimental_allow_android_library_deps_without_srcs (defaulted to true for a warning).
Previously, users of generated android_library rules with this specific attribute combination do not see the warning message because the message comes from a Skylark macro. Once this is in, users having such a rule (even in their transitive, generated dependencies) will see the warning message.
RELNOTES: Deprecated: Using the android_library.deps attribute to implicitly export targets to dependent rules. If your code is using this feature, Bazel will raise a warning. To fix, please use android_library.exports to explicitly specify exported targets. Run with --experimental_allow_android_library_deps_without_srcs=false to ensure forward compatibility when this feature is removed in a future release.
PiperOrigin-RevId: 168686765
|
|
|
|
|
|
|
| |
In preparation for linking the parsed and unparsed values of options, consolidate and standardize our representation of the flag values as we received them (what is meant by "unparsed" values in this case). This was being done separately in ParseOptionResult, which, with extra context added, is being folded into UnparsedOptionValueDescription. We now track how an option was provided and where it came from for all option parsing.
RELNOTES: None.
PiperOrigin-RevId: 168682082
|
|
|
|
|
|
| |
RELNOTES: The Build Event Protocol's File.uri field is now properly
encoded according to RFC2396.
PiperOrigin-RevId: 168674865
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and
-o flags. This cl removes this logic and relies on crosstool to emit these
flags. This is another small step towards platform independent C++ rules.
Memory use is not affected, since the build variables used by this cl are already
exposed, this cl just forces crosstools to use it.
RELNOTES: None.
PiperOrigin-RevId: 168671507
|
|
|
|
|
|
| |
inline constructor that did ServerDirectories creation inline: don't pollute production code for tests' convenience.
PiperOrigin-RevId: 168652349
|
|
|
|
|
|
| |
codec. Since PrecomputedValues can contain any value, give them access to an ObjectCodecs instance so we don't have to have a whitelist inside PrecomputedValueCodec.
PiperOrigin-RevId: 168624137
|
|
|
|
|
|
| |
https://github.com/bazelbuild/bazel/commit/fd2cc7d1c1262c21dc7a119baf9aaa775fab6e54 to Bazel.
PiperOrigin-RevId: 168619238
|
|
|
|
| |
PiperOrigin-RevId: 168607439
|
|
|
|
|
|
|
| |
They are just normal javacopts. The only user was Android databinding, so now we just merge databindings javacopts in with the rest of javacopts in AndroidCommon.
RELNOTES: None
PiperOrigin-RevId: 168578013
|
|
|
|
|
|
|
|
| |
categories of toolchains for the purpose of toolchain selection.
Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm.
PiperOrigin-RevId: 168577759
|
|
|
|
|
|
| |
This made the srcs_test failing
PiperOrigin-RevId: 168570687
|
|
|
|
|
|
|
| |
These tests will fail with a helpful error message if you do not have android_sdk_repository set up. They currently require that platform 25 be installed in your SDK.
RELNOTES: None
PiperOrigin-RevId: 168570577
|
|
|
|
|
|
| |
This will be rolled forward with a different API.
PiperOrigin-RevId: 168566666
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Roll-forward with fix
*** Original change description ***
Automated rollback of commit f5b8281f1f7599c67476663887db909a4206710e.
*** Reason for rollback ***
Read the wrong log, it is not timing out, actual failure.
*** Original change description ***
Open-source src/test/skylark/...
This was means to be open-sourced from the beginning but an error in our
set-up hide it from the open-source tree.
PiperOrigin-RevId: 168526758
|
|
|
|
|
|
| |
Fix bad `date` invocation submitted in unknown commit.
PiperOrigin-RevId: 168517542
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add logging to bazel_bootstrap_distfile_test.sh
and to buildenv.sh in hopes of catching this bug:
https://github.com/bazelbuild/bazel/issues/3618
For justification, see:
https://github.com/bazelbuild/bazel/issues/3618#issuecomment-328857891
RELNOTES: none
PiperOrigin-RevId: 168508723
|
|
|
|
| |
PiperOrigin-RevId: 168452997
|
|
|
|
|
|
|
|
| |
With dynamic configurations we no longer need a special
class to apply transitions: a simple patch transition
bound to an attribute works just as well.
PiperOrigin-RevId: 168442602
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Read the wrong log, it is not timing out, actual failure.
*** Original change description ***
Open-source src/test/skylark/...
This was means to be open-sourced from the beginning but an error in our
set-up hide it from the open-source tree.
PiperOrigin-RevId: 168428572
|
|
|
|
|
|
|
| |
This was means to be open-sourced from the beginning but an error in our
set-up hide it from the open-source tree.
PiperOrigin-RevId: 168427396
|
|
|
|
| |
PiperOrigin-RevId: 168419796
|
|
|
|
| |
PiperOrigin-RevId: 168406412
|
|
|
|
|
|
|
| |
These classes are mostly used during the options parsing process itself, and are barely a part of the options parser interface, so they really don't belong in OptionsParser.java. They are also about to change significantly, so taking this opportunity to split them out.
RELNOTES: None.
PiperOrigin-RevId: 168400162
|
|
|
|
| |
PiperOrigin-RevId: 168383478
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaking AndroidBinaryTest on Windows
http://ci.bazel.io/blue/organizations/jenkins/bazel-tests/detail/bazel-tests/1024/tests
Fixed https://github.com/bazelbuild/bazel/issues/3719
*** Original change description ***
Shard AndroidBinaryTest.
RELNOTES: None
PiperOrigin-RevId: 168374826
|
|
|
|
|
|
|
|
|
|
| |
If testing is requested, but no tests are found, the build is aborted.
Ensure that even in this case the steam of build events is internally
closed (i.e., all announced events are reported, the last event is marked
as such).
Change-Id: I88763ed6ccd7793deedbcb3428df7e8d289efa23
PiperOrigin-RevId: 168364127
|
|
|
|
|
|
| |
Root objects should not expose their absolute paths as they break hermeticity.
PiperOrigin-RevId: 168363549
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new method BuildEventTransport#closeNow() which forcefully
closes the BES upload even if there are still events to upload. This
is executed if the bazel server is being shutdown.
The implementation in the BuildEventServiceTransport works by shutting
down the ExecutorService handling the upload, which in turn will
interrupt the upload thread, which in turn will cancel the streaming RPC.
The BuildEventServiceTransport will wait up to 100ms for that
cancellation to happen.
Also fix a bug where the BES transport would not wait for ACKS.
PiperOrigin-RevId: 168359947
|
|
|
|
| |
PiperOrigin-RevId: 168359681
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a generic retrier implementation (Retrier2) that can be
configured by plugging in a backoff strategy, a function to
decide on retriable errors and a circuit breaker. A concrete
implementation is added via RemoteRetrier that mostly is a
copy of the code of the existing Retrier.
Retrier2 adds support for circuit breaking [1]. It allows the
retrier to reject execution when failure rates are high. The
remote execution code will use this to gently switch between
local and remote execution/caching if the latter experiences
lots of failures.
Retrier2 is also useful when not used with gRPC. We need
retriers for the HTTP caching interface too.
All the code added in this CL is unused, to keep reviews
managable. In a follow up CL, I will switch the code to use
the new Retrier and delete the old retrier.
[1] https://martinfowler.com/bliki/CircuitBreaker.html
PiperOrigin-RevId: 168355597
|
|
|
|
|
|
| |
Closes #3697.
PiperOrigin-RevId: 168353082
|
|
|
|
|
|
|
|
|
| |
This cl removes hardcoded --sysroot flag generation from bazel when constructing
command line for C++ actions. The hardcoded flag is still exposed to Skylark (to
stay backwards compatible).
RELNOTES: None.
PiperOrigin-RevId: 168346711
|
|
|
|
| |
PiperOrigin-RevId: 168345699
|
|
|
|
|
|
|
| |
First commit in series, the second will make the necessary changes to the action.
RELNOTES: None
PiperOrigin-RevId: 168286654
|
|
|
|
|
|
| |
This whole CL was done using IDE refactoring tools and should be safe.
PiperOrigin-RevId: 168275575
|
|
|
|
|
|
| |
Part of the static config cleanup effort.
PiperOrigin-RevId: 168270713
|
|
|
|
|
|
|
| |
Now that we have a standard way of referring to an option, remove all of the places that we were referring to them by their name. Since options can have multiple names, this is more clear and provides the additional information needed to understand the option. It also stops the habit of requesting unqualified strings, which was hard to read.
RELNOTES: None.
PiperOrigin-RevId: 168254584
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 168245942
|
|
|
|
|
|
| |
available from BuildViewTestCase#getRuleContext
PiperOrigin-RevId: 168231020
|