[PATCH] D147948: [bazel][NFC] Replace @bazel_tools//src/conditions with equivalent @platforms rules

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 09:03:51 PDT 2023


rupprecht created this revision.
Herald added a project: All.
rupprecht requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Followup to D147354 <https://reviews.llvm.org/D147354>. Using src/conditions is discouraged in favor of using rules from the `@platforms` repository directly.

`llvm/config.bzl` has a non-trivial OS+CPU selection config, so that is omitted from this patch. There is intentionally no equivalent for that in `@platforms` because every project will have their own opinions about what a platform is, and it is not feasible for the bazel selection list to include every possible combination. The recommended idiom there is for projects to define their own supported platforms list, e.g. in a separate BUILD file or platform mapping.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147948

Files:
  utils/bazel/llvm-project-overlay/clang/BUILD.bazel
  utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
  utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
  utils/bazel/llvm-project-overlay/llvm/cc_plugin_library.bzl
  utils/bazel/llvm-project-overlay/third-party/unittest/BUILD.bazel
  utils/bazel/vulkan_sdk.bzl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147948.512170.patch
Type: text/x-patch
Size: 8296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230410/9909be9a/attachment.bin>


More information about the llvm-commits mailing list