aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
Commit message (Collapse)AuthorAge
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Add a few options that tweak the host configuration to parallel those that ↵Gravatar lberki2018-01-26
| | | | | | | | | | | do the same with the target one. I'm not exactly happy at this development, but we already have a host of --host_* options so it's only incremental badness. Fixes #4484. RELNOTES: None. PiperOrigin-RevId: 183375817
* Introduce a wrapper around the ImmutableSortedSet<Class<? extends ↵Gravatar janakr2018-01-24
| | | | | | | | BuildConfiguration.Fragment>> set of Fragment classes that is part of the BuildConfigurationValue.Key. This class allows us to compute a fingerprint of the wrapped ImmutableSortedSet, making equality comparisons fast. The number of additional wrapper objects is the number of distinct sets of fragment classes, so 1. (In fact, we don't even need to compute a fingerprint, since reference equality does the job for us here, but we do it just to be conservative.) This CL has a performance benefit for Bazel currently, but has a bigger performance benefit in the following changes, where there are more BuildConfigurationValue.Key objects to compare. PiperOrigin-RevId: 183090122
* Rename Root to ArtifactRoot.Gravatar tomlu2018-01-16
| | | | | | This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath. PiperOrigin-RevId: 182082367
* Remove isMainRepo from Root.Gravatar tomlu2018-01-12
| | | | | | This is no longer used. PiperOrigin-RevId: 181754475
* Codec for BuildConfigurationValue.Gravatar shahan2018-01-10
| | | | PiperOrigin-RevId: 181545835
* Move PatchTransition and kin to analysis.config.transitions.Gravatar gregce2018-01-04
| | | | | | | HostTransition can't be migrated yet because it depends on BuildConfiguration. PiperOrigin-RevId: 180842784
* 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
* 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
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Move config transition definitions out of lib.packages.Attribute.Gravatar gregce2017-12-21
| | | | | | | | | | | | | This cleans up a legacy API from Bazel's "static configuration" days, when transition definitions involved deep and complex logic in the analysis code. That was too much cruft to embed into lib.packages. But the modern definitions are way simpler and thus easier to embed. This change only *copies* the existing definitions. Because a lot of references will have to be updated, we'll migrate the move over a few changes. PiperOrigin-RevId: 179859293
* Support for ThinLTO to be enabled implicitly with AFDOGravatar Googler2017-12-20
| | | | | | | Allows for ThinLTO to be enabled once the --features=autofdo_implicit_thinlto feature is enabled in the crosstool. Also allows for --features=-thin_lto to override and prevent ThinLTO from being enabled. RELNOTES: None. PiperOrigin-RevId: 179687743
* Add --experimental_java_coverage.Gravatar elenairina2017-12-05
| | | | | | | | | | | | | | | | | | Context: java_import or other custom rules (genrules or Skylark) do not propagate coverage information. Coverage metadata is retrieved from the compilation information and it is passed around through providers as Artifact(s). The problem with the current implementation is that there is no way of retrieving instrumentation metadata from arbitrary jars provided by java_import or other custom rules. --experimental_java_coverage solves the issue presented above ONLY for the java rules (has no effect for android/[]/etc). Implementation details: * For each build jar create a .txt file containing the relative path of each Java file. This file is included in the build jar. It is used for recreating the correct path for each covered file when included in the coverage report. * java_binary/java_test will set 3 environment variables: 1) JACOCO_METADATA_JAR - in experimental mode will be a txt file containing all the jars considered for collecting coverage (JacocoCoverageRunner filters out the ones that don't have .uninstrumented.class files). In non-experimental mode will be a jar containing all the instrumented class files. 2) JACOCO_MAIN_CLASS - The main class to be called for the current coverage run. Previously this information was embedded in the JACOCO_METADATA_JAR's manifest. 3) JACOCO_JAVA_RUNFILES RELNOTES: --experimental_java_coverage is available for testing. PiperOrigin-RevId: 177941471
* Remove some deadish Windows-related runfiles code.Gravatar Benjamin Peterson2017-12-04
| | | | | | | | | | | | | | | In particular, SymlinkTreeAction no longer needs to accept artifacts as an input. --experimental_enable_runfiles now immediately reports an error on Windows. This mostly unwinds e4974e4cc6aeb437d36b3b36eb20142b7120fb16 ("Separate runfiles middlemen into two layers") and 41f4456ac2348bef66739194853a1ddadcbb887e ("Make runfiles tree creation on Windows depend on the artifacts of the actual runfiles."). See https://groups.google.com/d/msg/bazel-dev/btOAgxv434g/bDhTOOePAgAJ. Change-Id: Iac3308669bfc07abfd1c91445922269d8fdc2a26 PiperOrigin-RevId: 177837504
* Make check_fileset_dependencies_recursively flag a no-op. We will always ↵Gravatar kush2017-11-28
| | | | | | | behave as if this flag is true. RELNOTES: None PiperOrigin-RevId: 177219652
* toolchain_type can export make variables from the toolchain instead of theGravatar cpeyser2017-11-13
| | | | | | configuration. PiperOrigin-RevId: 175532550
* Finish making --auto_cpu_environment_group non-experimental.Gravatar jcater2017-11-09
| | | | PiperOrigin-RevId: 175027144
* Avoid crash when a test and its alias are specified on the command line for ↵Gravatar lberki2017-11-03
| | | | | | | "blaze test". RELNOTES: None. PiperOrigin-RevId: 174386473
* Add a deprecation warning to the check_fileset_dependencies_resursively flag.Gravatar kush2017-10-26
| | | | | RELNOTES: none PiperOrigin-RevId: 173432000
* Set the platform name in the build event stream to the CPU instead of the ↵Gravatar lberki2017-10-20
| | | | | | | | | toolchain identifier. This is necessary because we don't want BuildConfiguration to depend on BUILD and CROSSTOOL files anymore and this is possible because the toolchain ID was conceived as a unique identifier for the configuration in the build event stream, which it isn't anyway, and this way it's at least more human-readable. RELNOTES: None. PiperOrigin-RevId: 172725386
* Start process of making auto_cpu_environment_group non-experimental.Gravatar jcater2017-10-18
| | | | | | | | Adds a legacy flag so clients can continue to use both experimental_auto_cpu_environment_group and auto_cpu_environment_group until uses can be cleaned up. PiperOrigin-RevId: 172470616
* Move --experimental_allow_runtime_deps_on_neverlink to JavaOptions.Gravatar mstaib2017-10-06
| | | | | | | This migration flag only affects Java rules. RELNOTES: None. PiperOrigin-RevId: 171026607
* Categorize build options for BuildConfiguration.Gravatar gregce2017-10-06
| | | | PiperOrigin-RevId: 171017483
* Move --plugin to JavaOptions and remove --plugin_copt.Gravatar mstaib2017-09-26
| | | | | | | | | | | | | | | --plugin, though once used for C++, is currently a Java-specific flag. --plugin_copt is currently a total no-op, and has been for a long time. Moving these to the Java fragment is a little neater and helps get one step closer to enforcing LateBoundDefault fragment access. Additionally, since the "no plugins with duplicate names" restriction was added to work with plugin_copt, this restriction can be lifted. It no longer adds any value. RELNOTES: None. PiperOrigin-RevId: 169981221
* Move --build_python_zip into PythonConfiguration.Gravatar mstaib2017-09-21
| | | | | | | | There's no need for it in the core configuration options, as it's used exclusively by Python rules. RELNOTES: None. PiperOrigin-RevId: 169435643
* Lots more cleanup of "dynamic configurations" comments and test code.Gravatar gregce2017-09-14
| | | | PiperOrigin-RevId: 168607439
* Static config removal TODO cleanup.Gravatar gregce2017-09-14
| | | | PiperOrigin-RevId: 168583577
* Remove the unused fallback argument from getHost() and the unused method ↵Gravatar lberki2017-09-12
| | | | | | | getPotentialSplitTransitions() from FragmentOptions. RELNOTES: None. PiperOrigin-RevId: 168218102
* Add a --build_runfile_manifests flag which controls production ofGravatar Googler2017-08-22
| | | | | | | | foo_test.runfiles_manifest files. These are the largest local outputs in many builds, and unnecessary for remote test execution. RELNOTES: New --build_runfile_manifests flag controls production of runfiles manifests. PiperOrigin-RevId: 166001477
* Replace TransitionApplier interface with a dedicated class.Gravatar gregce2017-08-21
| | | | | | | | | | | | | | | This accomplishes a few goals: 1. Removes the outdated BuildConfiguration.StaticConfigurationApplier code. 2. Removes the TransitionApplier abstraction completely. This was an awkward bridge meant to support both static and dynamic implementations. 3. Moves transition logic to its own dedicated class: ConfigurationResolver. This no longer belongs in BuildConfiguration, which we ultimately want to become a simple <key, value> map. Part of the static config cleanup effort. PiperOrigin-RevId: 165736955
* Remove BuildConfiguration.useDynamicConfigurations.Gravatar gregce2017-08-18
| | | | | | | | This is always true. Part of the static config cleanup effort. PiperOrigin-RevId: 165628823
* Remove ConfigurationCollection{Function,Value}, ↵Gravatar gregce2017-08-18
| | | | | | | | BuildConfigurationCollection.Transitions. Part of the static config cleanup effort. PiperOrigin-RevId: 165607492
* Remove RuleClass.Configurator and obsolete LIPO_ON_DEMAND uses.Gravatar gregce2017-08-18
| | | | | | | | Dynamic configs use RuleTransitionFactory instead. Part of the static config cleanup effort. PiperOrigin-RevId: 165590679
* Honor --nobuild_runfile_links for non-tests, and propagate it to theGravatar Googler2017-08-17
| | | | | | | | | | | | | host configuration. I think the comment I'm deleting is misleading. PAR file construction already has special handling of the input manifest, and host tools do get their runfiles when executed remotely. They don't get them for local execution, but users who care about that don't need to pass the non-default --nobuild_runfile_links option. RELNOTES: None. PiperOrigin-RevId: 165535870
* Remove ConfigurationFactory as part of the static configuration cleanup.Gravatar gregce2017-08-17
| | | | PiperOrigin-RevId: 165478994
* Remove --experimental_dynamic_configs=off.Gravatar gregce2017-08-10
| | | | | | | | | | | | This is the first in a series of changes stripping out Bazel's static configuration code. This change removes the ability to request static configurations but not the (now orphaned) logic behind them. Because that logic is all over the code base, it will be removed in layers in followup changes. PiperOrigin-RevId: 164769846
* Move most test options from BuildConfiguration to TestConfiguration.Gravatar tomlu2017-08-07
| | | | | | --test_env isn't moved in this CL since it's exposed to Skylark via BuildConfiguration, making it a somewhat riskier refactor. PiperOrigin-RevId: 164266168
* Add --windows_exe_launcher optionGravatar Yun Peng2017-08-04
| | | | | | | | | | | | | If this is enabled, Bazel will build a Windows native exe binary launcher for sh_binary, in the future this flag will also apply to py_binary and java_binary. By default, it's turned ON, set --windows_exe_launcher=0 to turn it off. Fix https://github.com/bazelbuild/bazel/issues/3491 Change-Id: Ic55bff745670446e585e3cc62af9dc6561527d4f PiperOrigin-RevId: 164234552
* Break out --test_filter into a test configuration fragment.Gravatar tomlu2017-08-03
| | | | | | The other test configuration options will follow in subsequent CLs to keep size manageable. PiperOrigin-RevId: 164068510
* Copy build_python_zip and enable_runfiles flags to the host config.Gravatar philwo2017-07-28
| | | | | | Fixes a bug where the flags would be ignored during Bazel's compile.sh bootstrap. PiperOrigin-RevId: 163341779
* Exclude test/java/ in instrumentation_filter defaultGravatar Googler2017-07-27
| | | | | | | | The computed default used in bazel coverage excludes both javatests/ and test/java. Having the stated default exclude only one of those is needlessly confusing. (Even though in practice that static default will rarely be used.) Also updates the comment about the computed default, since that logic has moved. PiperOrigin-RevId: 163325837
* Define an outgoing rule transition interface.Gravatar gregce2017-07-27
| | | | | | | | | | This lets a parent choose a transition for its dep based on the dep's rule class. Implement (experimental) dynamic Android resource filtering trimming with this. PiperOrigin-RevId: 163259052
* Remove --experimental_dynamic_configs=notrim_partial.Gravatar gregce2017-07-26
| | | | | | Part of the static configuration removal cleanup. PiperOrigin-RevId: 163130922
* Add --toolchain_resolution_override to allow specifying the toolchain for a ↵Gravatar John Cater2017-07-21
| | | | | | | | | given type. Fixes https://github.com/katre/bazel/issues/6. Change-Id: I6c6e303384277b013bdc27eb80743aa51f2fb98a PiperOrigin-RevId: 162618674
* Deprecate dynamic config OFF and NOTRIM_PARTIAL modes.Gravatar gregce2017-07-20
| | | | | | | | | | | | | --experimental_dynamic_configs=off --experimental_dynamic_configs=notrim_partial are now aliases for --experimental_dynamic_configs=notrim (the default). Also remove outdated --nodistinct_host_configuration warning. PiperOrigin-RevId: 162549307
* Add an undocumented option to remove the separation between the bin and ↵Gravatar lberki2017-07-18
| | | | | | | genfiles directories. RELNOTES: None. PiperOrigin-RevId: 162325236
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Reserve certain action mnemonics so they can't be used from Skylark.Gravatar tomlu2017-07-17
| | | | | | | If a reserved mnemonic is used, it is mangled. RELNOTES: PiperOrigin-RevId: 161970885
* Fold OptionUsageRestrictions into OptionDocumentationCategory and ↵Gravatar ccalvarin2017-07-11
| | | | | | | | | | OptionMetadataTags. These are similar, no need to have both fields. Removing the "DOCUMENTED" default, the absence of UNDOCUMENTED will be used instead. Since requiring a documentation category for undocumented options doesn't make sense, list that as one of the OptionDocumentationCategories, but list HIDDEN and INTERNAL as part of OptionMetadata. These options should list UNDOCUMENTED as their category. PiperOrigin-RevId: 161515674
* Remove dynamic configs dep on the static transition table.Gravatar gregce2017-07-11
| | | | PiperOrigin-RevId: 161432622