diff options
author | Kyle Moffett <kyle@moffetthome.net> | 2023-09-26 08:43:45 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 10:43:45 -0400 |
commit | 4b2312bc8e488eecca446137abe9e0df963d3253 (patch) | |
tree | 5dd303724823165f0f99a7aaae82a7f185baedbe | |
parent | 4ad40ef271da8176d4fc0194d2089b8a76e19d7b (diff) | |
download | bazelbuild-platforms-4b2312bc8e488eecca446137abe9e0df963d3253.tar.gz |
Bazel Platforms: Add `//cpu:any` constraint value for arch-indep builds (#75)
* Bazel Platforms: Add `//cpu:any` constraint value for arch-indep builds
Some builds are expected to only produce architecture-independent data files,
such as configuration files, database seed data, composited images, or even
some kinds of interpreted scripts (Shell, Python, Perl, etc).
When such a build is being performed, this constraint value may be used to
ensure that architecture-dependent builds cannot be performed (except by way
of another transition).
As a final example, consider building a package of NIC firmware images for
many different NIC models. The package overall is architecture-independent,
and should be built with `//cpu:any`, then each individual image rule has a
transition to the suitable architecture for that specific NIC model.
* Update BUILD
Changed "any" to "all"
* Update BUILD
Fix comment
---------
Co-authored-by: aiuto <aiuto@google.com>
-rw-r--r-- | cpu/BUILD | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -30,6 +30,25 @@ constraint_setting(name = "cpu") # Many of the name here are legacy values and probably violate these conditions. # We'll try to clean those up over time. +# Special case: Architecture-independent outputs only +# +# Some builds are expected to only produce architecture-independent data files, +# such as configuration files, database seed data, composited images, or even +# some kinds of interpreted scripts (Shell, Python, Perl, etc). +# +# When such a build is being performed, this constraint value may be used to +# ensure that architecture-dependent builds cannot be performed (except by way +# of another transition). +# +# As a final example, consider building a package of NIC firmware images for +# many different NIC models. The package overall is architecture-independent, +# and should be built with `//cpu:all`, then each individual image rule has a +# transition to the suitable architecture for that specific NIC model. +constraint_value( + name = "all", + constraint_setting = ":cpu", +) + constraint_value( name = "aarch32", constraint_setting = ":cpu", |