| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Move away global constants and global namespaces out of Environment
and into a new file Runtime.
--
MOS_MIGRATED_REVID=101940218
|
|
|
|
|
|
|
|
|
|
| |
The baseline artifacts are part of the instrumented files provider now, and
are strongly tied to the collect_code_coverage flag. It seems to be simpler
to collect them explicitly in the BuildView (which already collects them for
post-processing), than to rely on the output group selection.
--
MOS_MIGRATED_REVID=101926341
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're currently doing too much work for baseline coverage - every rule creates
an action for its entire transitive closure; these actions are added to the
output group for baseline coverage, but not transitively accumulated.
It would be better for every rule to create an action for local baseline
coverage, and to aggregate the baseline coverage artifacts down the dependency
tree.
By merging the code paths, the InstrumentedFilesCollector can perform the
aggregation, because it can distinguish local and transitive files; I'm
planning to implement that in a subsequent change.
--
MOS_MIGRATED_REVID=101914334
|
|
|
|
|
|
|
|
| |
This is necessary to have TargetResolver depend on it without making it depend
on the packages target. First step of #389.
--
MOS_MIGRATED_REVID=101790345
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, targets in "tools" of genrules could only be expanded in
$(location)s as the target of the bind.
This is another part of fully fixing #90.
--
Change-Id: I91444fbfe551b651c46811014639f08f779c70aa
Reviewed-on: https://bazel-review.googlesource.com/#/c/1750/
MOS_MIGRATED_REVID=101760690
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101730178
|
|
|
|
|
|
|
|
|
|
| |
It is now possible to get the main executable of *_binary rules with
target.files_to_run.executable.
--
Change-Id: I4a81f216bdd237fc5b0e7dbd7d0a312558f3cf2c
Reviewed-on: https://bazel-review.googlesource.com/#/c/1760/
MOS_MIGRATED_REVID=101675365
|
|
|
|
|
|
|
|
|
| |
Have loadingPhase-only methods check that flag.
It's no use removing the initial bindings to these methods
when they may have been copied anyway.
--
MOS_MIGRATED_REVID=101624770
|
|
|
|
|
|
|
|
| |
Allow ValidationEnvironment to be created from initial Environment so that
there is no need to manually keep two different sets of constructors in synch.
--
MOS_MIGRATED_REVID=101588695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a big change, so let me walk you through the key pieces:
1) This cl provides an alternative mechanism for creating configurations and doing configuration transitions that's "dynamic" in that the configurations can be created on the fly and the transitions are arbitrary mappings from BuildOptions --> BuildOptions that can also be created on the fly. It also integrates this with ConfiguredTargetFunction, so the configured target graph automatically uses this framework.
2) It does *not* replace old-style (which we'll call "static") configurations. For a number of important reasons: It's not yet at feature parity (particularly: no LIPO). It's not remotely tested across real projects enough to have confidence that it's battle-ready. It doesn't yet handle certain "special" functions like BuildConfiguration.prepareToBuild() and BuildConfiguration.getRoots(). It still relies on the old static transition logic to determine what transitions to apply (eventually we'll distribute that logic out, but that's too much for a single cl). We need the option to toggle it on and off until we have enough confidence in it. So with this cl, builds can be done in either mode.
3) The new flag --experimental_dynamic_configs toggles use of dynamic configurations.
4) Dynamic configurations are created with the Skyframe function BuildConfigurationFunction (this was already created in an earlier change). This consumes a BuildOptions and a set of configuration fragments to produce a BuildConfiguration.
5) Dynamic transitions are instances of the new class PatchTransition, which simply maps an input BuildOptions to an output BuildOptions.
6) Since static and dynamic configurations have to co-exist (for now), this cl tries hard to keep today's transition logic defined in a single place (vs. forking a dedicated copy for each configuration style). This is done via the new interface BuildConfiguration.TransitionApplier. BuildConfiguration.evaluateTransition is modified to feed its transition logic into TransitionApplier's common API. Both dynamic and static configurations have their own implementations that "do the right thing" with the results.
7) The transition applier for dynamic configurations basically stores the Transition, then allows DependencyResolver (which calls BuildConfiguration.evaluateTransition) to return Dependency instances containing that Transition (vs. a BuildConfiguration, which they traditionally contain).
7.5) An earlier variation of the dynamic transition applier retained BuildOptions (e.g. when it got a Transition it immediately applied it to get its output BuildOptions, then stored that). This had the advantage of making composing of transitions easier, especially within BuildConfiguration.evaluateTransition (which can theoretically apply multiple transitions to the input configuration). But it turns out that applying transitions has a cost, and it's simply more performant to pass them through until they're really needed.
8) In dynamic configuration mode, after ConfiguredTargetFunction gets its deps (e.g. an <Attribute, Dependency> multimap), it "trims" the configurations for its dependencies by a) only including config fragments required by the deps' subtrees and b) applying the transitions that came from 7). This all happens in the new method ConfiguredTargetFunction.trimConfigurations.
9) trimConfigurations is heavily performance-optimized based on a lot of experience running this through a large project within Google. As it turns out, the cost of host transitions can be atrocious (because there are a lot of them). Also, BuildOptions.clone() is expensive. And just creating BuildConfiguration SkyKeys also has a cost (largely because of BuildOptions cloning), so that shouldn't be done except when really necessary. My experience with this convinced me it's worth making this method complicated for the sake of making it fast. Since it basically visits every edge in the configured target graph (at least), it really needs to be slick.
10) Since host transitions in particular are problematic w.r.t. speed, I compute the host *once* in ConfigurationCollectionFunction.getHostConfiguration() and expose that reference to ConfiguredTargetFunction and other Skyframe functions. This limits recomputation to just when the fragments are trimmed.
11) Since options cloning is expensive, I'm doing something scary: exposing a BuildConfiguration.getOptions() method that returns a direct reference. Since BuildOptions is mutable, this is dangerous in the wrong hands. I can experiment with going back to cloning (with the caching of host transitions it may not matter as much), but we may ultimately have to put up with this risk for the sake of performant analysis time. What would be *really* awesome would be to make BuildOptions immutable. But that's not going to happen in this cl.
So in short, the key abstractions in this cl are:
- PatchTransition
- BuildConfiguration.TransitionApplier
- ConfiguredTargetFunction.trimConfigurations
The current implementation imposes no analysis time penalty
--
MOS_MIGRATED_REVID=101474620
|
|
|
|
|
|
|
| |
--
Change-Id: I4e65cc583e758d2f7e45209ffcb37f6a871e2ed7
Reviewed-on: https://bazel-review.git.corp.google.com/#/c/1840
MOS_MIGRATED_REVID=101462155
|
|
|
|
|
|
|
|
|
| |
generator_name and generator_function.
Additionally, both Skylark macros and build extensions set the attribute generator_location in order to store the name of the file where generator_function was defined.
--
MOS_MIGRATED_REVID=101458757
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101457236
|
|
|
|
|
|
|
| |
the documentation.
--
MOS_MIGRATED_REVID=101357875
|
|
|
|
|
|
|
| |
ctx.fragments.{cpp,java,jvm} instead.
--
MOS_MIGRATED_REVID=101348294
|
|
|
|
|
|
|
|
|
|
|
| |
big fat warning that that
method shouldn't be used anymore.
Ideally, I'd mark it as deprecated, but it's legitimately used by RuleContext. I could just forbid access to AnalysisEnvironment to rule implementations, but, sadly, almost every method on it is called at a few oddball places in implementations of various rules, so we can't do it just yet.
--
MOS_MIGRATED_REVID=101345484
|
|
|
|
|
|
|
| |
The build-in rules also use it.
--
MOS_MIGRATED_REVID=101343109
|
|
|
|
|
|
|
|
|
| |
specifying the
class of the provider object.
--
MOS_MIGRATED_REVID=101227127
|
|
|
|
|
|
|
| |
RuleContext.getShareableArtifact() calls where the former method is used to create the outputs of shared actions.
--
MOS_MIGRATED_REVID=101116694
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101033236
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100919043
|
|
|
|
|
|
|
|
| |
Avoid throwing UnsupportedOperationException in a method that may be called
by RuleContext when checking the deps of a rule for specific providers.
--
MOS_MIGRATED_REVID=100916381
|
|
|
|
|
|
|
|
| |
submenus to sidebar, and expand and highlight the link for the current page.
Collapse sidebar on mobile and expose button for toggling sidebar.
--
MOS_MIGRATED_REVID=100836792
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100814605
|
|
|
|
|
|
|
| |
This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones.
--
MOS_MIGRATED_REVID=100479410
|
|
|
|
|
|
|
| |
--
Change-Id: Ia70ca1b8482e10bc1ac91799aa238f8613e5c824
Reviewed-on: https://bazel-review.googlesource.com/#/c/1801
MOS_MIGRATED_REVID=100476467
|
|
|
|
|
|
|
| |
embedded binaries.
--
MOS_MIGRATED_REVID=100476182
|
|
|
|
|
|
|
| |
Fixes #367.
--
MOS_MIGRATED_REVID=100281134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ThinLTO is a Link Time Opimization strategy, where the inlining step operates on LLVM intermediate code, and is sharded across multiple compiler invocations, so they can be parallelized. For more information, see http://llvm.org/devmtg/2015-04/slides/ThinLTO_EuroLLVM2015.pdf
Using this features requires an experimental LLVM toolchain, with the following stanza in CROSSTOOL
feature {
name: "thin_lto"
flag_set {
action: "c-compile"
action: "c++-compile"
flag_group {
flag: "-Xclang-only=-Wno-inconsistent-missing-override"
flag: "-flto"
flag: "-O2"
}
}
}
--
MOS_MIGRATED_REVID=100269776
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100163482
|
|
|
|
|
|
|
| |
Instead we can just recreate artifact in ArtifactFactory if source root has changed. Additional optimization is to save with Artifact's some unique id of build when they have been created. If the build is the same we should not check source root changes.
--
MOS_MIGRATED_REVID=100104312
|
|
|
|
|
|
|
| |
efficient if we need to do many ActionGraph looups.
--
MOS_MIGRATED_REVID=100060090
|
|
|
|
|
|
|
|
| |
Flip the handling such that analysis failure is the default, rather than
execution failure (fail action creation).
--
MOS_MIGRATED_REVID=100020812
|
|
|
|
|
|
|
| |
configuration can now be accessed via ctx.fragments.CONF where CONF is in {cpp, jvm, java}.
--
MOS_MIGRATED_REVID=100016978
|
|
|
|
|
|
|
| |
that package groups' deps use the null configuration.
--
MOS_MIGRATED_REVID=99965080
|
|
|
|
|
|
|
| |
Instead, the SkylarkModule annotation is being used to identify fragments that are visible in Skylark.
--
MOS_MIGRATED_REVID=99930512
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99819719
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99804135
|
|
|
|
|
|
|
| |
with Latin-1
--
MOS_MIGRATED_REVID=99651466
|
|
|
|
|
|
|
|
|
|
|
|
| |
rules that can be removed.
What is left:
- The outputs of ExtractInclusionsAction. I think this action is shared between multiple rules that have the same generated file in srcs, so this call site is legitimate.
- Creating the solib symlinks. This is not a shared action, but these need to be in the same directory so that the RPATH is not too long, so we must live with this for the time being.
- FDO, which is beyond salvation. The artifacts under the FDO root don't really conform to the usual "only under the package directory" convention.
--
MOS_MIGRATED_REVID=99551394
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99486593
|
|
|
|
|
|
|
|
|
| |
RuleContext#internalCreateOutputArtifact().
Fixes #351.
--
MOS_MIGRATED_REVID=99478770
|
|
|
|
|
|
|
| |
configuration can now be accessed via ctx.configuration.CONF where CONF is in {cpp, jvm, java}.
--
MOS_MIGRATED_REVID=99470271
|
|
|
|
|
|
|
| |
Fixes #341.
--
MOS_MIGRATED_REVID=99390495
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99377171
|
|
|
|
|
|
|
|
|
|
|
| |
Coverage depends on quite a few moving parts, several of which were changed for this test:
- BuildConfiguration.getCoverageLabels() used to include gcov support, this is now replaced by the dedicated getGcovLabels() and a separate implicit attribute on TestBaseRule. This new attribute is then overridden in ExperimentalIosTest to use an xcode-compatible gcov.
- Objc's TestSupport now correctly registers instrumented files and sets the necessary runfiles for collecting coverage.
- ios_test's template exports gcda files for coverage computation after the test's execution.
--
MOS_MIGRATED_REVID=99374435
|
|
|
|
|
|
|
|
|
| |
repository and package of the rule being analyzed. Currently this directory is PACKAGE for rules in the main repository and external/REPOSITORY_NAME/PACKAGE for rules in other repositories.
This is a plan to fix #293. Ideally, we would simply make it impossible to create artifacts not under that location, but in practice, we cannot do that because some rules do want to do this, mostly those that are already problematic due to shared actions. So the battle plan is to eliminate as many calls to AnalysisEnvironment.getDerivedArtifact() as I possibly can and audit the rest.
--
MOS_MIGRATED_REVID=99351151
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99283744
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99181437
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which conditions were checked.
In other words, go from:
ERROR: $WORKSPACE_ROOT/package/BUILD:69:12: Configurable attribute "srcs" doesn't match this configuration (would a default condition help?).
to:
ERROR: $WORKSPACE_ROOT/package/BUILD:69:12: Configurable attribute "srcs" doesn't match this configuration (would a default condition help?).
Conditions checked:
//foo:condition1
//foo:condition2
--
MOS_MIGRATED_REVID=99044040
|