Skip to content

Commit

Permalink
Clarify how to handle missing toolchains for --incompatible_disable_c…
Browse files Browse the repository at this point in the history
…c_toolchain_label_from_crosstool_proto

Users commonly hit a problem when migrating their toolchains for this flag. Adding a paragraph to make them aware of the solution.

#6072.

RELNOTES: None.
PiperOrigin-RevId: 215186089
  • Loading branch information
hlopko authored and Copybara-Service committed Oct 1, 2018
1 parent 8a92a75 commit 40f604f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion site/docs/skylark/backward-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,24 @@ cc_toolchain_suite(
'cpu2' : ':cc_tolchain_label4',
}
)

```

Before, it could happen that the same `cc_toolchain` is used with multiple
`CToolchain`s from the CROSSTOOL through `default_toolchain`s. This is no longer
allowed, each `cc_toolchain` must point to at most one `CToolchain` by:

* (preferable) specifying `cc_toolchain.toolchain_identifier` equal to
`CToolchain.toolchain_identifier`
* (deprecated, but still supported, doesn't work without specifying `compiler`)
specifying `cc_toolchain.cpu` and `cc_toolchain.compiler` fields that match
`CToolchain.target_cpu` and `CToolchain.compiler` respectively.
* (deprecated, but still supported, doesn't work with
[platforms](https://www.bazel.build/roadmaps/platforms.html)) Relying on
`--cpu` and `--compiler` options.

Using `cc_toolchain.toolchain_identifier` will save you one migration in the
future.

* Flag: `--incompatible_disable_cc_toolchain_label_from_crosstool_proto`
* Default: `false`
* Introduced in: `0.18.0`
Expand Down

0 comments on commit 40f604f

Please sign in to comment.