6 Commits

Author SHA1 Message Date
Jordan Rupprecht
2fcfc9754a [NFC] Reformat bzl files with buildifier 2024-02-12 11:35:18 -08:00
Oleg Shyshkov
bf8fd086d0 [llvm][mlir][bazel] Fix build. 2023-09-14 13:28:37 +02:00
Mikhail Goncharov
b28614c4fc [bazel] format bazel files NFC 2023-06-09 12:13:07 +02:00
Jordan Rupprecht
5e57f1bf52 [bazel][NFC] Replace @bazel_tools//src/conditions with equivalent @platforms rules
Followup to D147354. Using src/conditions is discouraged in favor of using rules from the `@platforms` repository directly.

This replaces three conditions:
* `@bazel_tools//src/conditions:windows` -> `@platforms//os:windows`
* `@bazel_tools//src/conditions:darwin` -> `@platforms//os:macos`
* `@bazel_tools//src/conditions:freebsd` -> `@platforms//os:freebsd`

`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.

Reviewed By: GMNGeoffrey

Differential Revision: https://reviews.llvm.org/D147948
2023-04-10 11:42:58 -07:00
Fangrui Song
45692873d2 [bazel] Fix --features=layering_check issues for llvm/unittests 2023-01-23 12:55:00 -08:00
Jordan Rupprecht
f57557de70 [bazel] Update gtest move to third-party
a11cd0d94ed3cabf0998a0289aead05da94c86eb moved googletest to third-party.

This creates a corresponding BUILD file in third-party/unittest, moved from the chunk in llvm/BUILD.bazel.

We must refine the .bazelignore which is setup to ignore the benchmarking library so that we don't ignore the new dir here.
2022-11-09 20:48:11 -08:00