Commit Graph

8 Commits

Author SHA1 Message Date
Xùdōng Yáng 2af915c086
Implement local_config_platform in @platforms (#86)
* POC: implement local_config_platform in @platforms

* missing colons

* move stuff around

* the repo rule need not be public

* attempt at a test setup...

* whoops

* newlines

* comments

* more comments
2024-03-21 13:06:19 -04:00
Tony Aiuto c688024aad buildify 2023-02-09 10:56:04 -05:00
Tony Aiuto ce09fb7f5c - bump dependency on rules_license to 0.0.4
- That picks up version that users cfg=exec instead of cfg=host
  - It still works with bazel 5.x. The next rules_license might not.
- bump our version to 0.0.7 for next release
  - add presubmit check that we did not mistmatch the license
2023-02-09 10:42:00 -05:00
Tony Aiuto 0176b8dc7b Add rules_license style declaration.
- Done for both WORKSPACE and bzlmod styles
- The dependency is different because rules_license is not
  up to date in the BCR. I'll correct that at the next
  rules_license release.
2022-12-07 16:52:06 -05:00
Tony Aiuto 0c80b6c0f4 respectful naming fixit 2021-06-15 13:10:48 -04:00
Philipp Schrader 1e362cd247 Add an "incompatible" constraint value
The bazel docs [1] currently recommend users to create an
`incompatible` constraint in their own code base. This constraint is
useful in expressing more advanced target compatibilities.

Currently every project has to create their own definition for this
constraint. That is unnecessary proliferation of something that can be
easily centralized here.

This patch makes it so users will be able to use the following pattern
in their BUILD files:

    cc_library(
        name = "unixish_lib",
        srcs = "unixish_lib.cc",
        target_compatible_with = select({
            "@platforms//os:osx": [],
            "@platforms//os:linux": [],
            "//conditions:default": ["@platforms//:incompatible"],
        ],
    )

[1]: https://docs.bazel.build/versions/master/platforms.html#skipping-incompatible-targets
2020-11-18 19:45:44 -08:00
Googler 441afe1bfd This target will be used by Bazel to embed a release of 'platforms' into
the Bazel binary itself.

Progress towards bazelbuild/bazel#8596

RELNOTES: None.
PiperOrigin-RevId: 252619499
Change-Id: I4049f8d5752f9dddc8ad7669db4754c8fb069965
2019-06-11 17:13:18 +02:00
Googler 55fc545818 Internal change
PiperOrigin-RevId: 251636029
Change-Id: Idef5972b0d729bd723550905d224eadcfb583516
2019-06-11 17:12:22 +02:00