We already use cc rules from `@rules_cc//cc:defs.bzl` in a few files,
but this uses it everywhere. Done automatically by running `buildifier
--lint=fix
--warnings=native-cc-binary,native-cc-library,native-cc-test,load` over
all the files. I also ran `buildifier` once more to ensure there wasn't
any missing formatting, so that caused a few unrelated diffs.
Those tests were broken on bazel as a side effect of 8830e380.
This commit is tested with this command on Linux:
bazelisk test \
@llvm-project//llvm/unittests:analysis_tests \
@llvm-project//llvm/unittests:plugin_inline_advisor_analysis_test \
@llvm-project//llvm/unittests:plugin_inline_order_analysis_test
…mtSequenceOffset debug info test"
This reverts commit 247430e9c41c61b66e2ee95c29a05de3e24c19b9.
The breakage has been fixed by 343bbda140d5a15cd7d7fbfc6041a7506da5cdae.
LLVM has two tablegen generators: one in llvm/tblgen.bzl (`gentbl`,
macro-based) and one in mlir/tblgen.bzl (`gentbl_cc_library`,
rule-based). The `gentbl_cc_library` generator in MLIR has some
advantages to being a rule, and at any rate, it seems better to just use
the same tablegen rule everywhere instead of competing implementations.
`SupportTests` fails in the bazel macOS sandbox, because
`FileSystemTest.permissions` expects to be able to modify file
permissions on some otherwise protected files.
Previously this test was marked `local` in bazel, which has
additional undesirable effects such as skipping remote build and cache.
Tighten the bazel tags to just `no-sandbox`. Note in particular, that
this allows the test to build, execute, and cache remotely (if
configured).
Testing:
- Verified this test fails (as expected) on macOS with no tags, and
passes with `no-sandbox`.
- Verified this test passes when executed remotely (using an Engflow RBE
setup) with `no-sandbox`.
This is newly used as of 0f525452896771cc8c579eb362dc7645e38fd0b9.
The bulk of the targets were added earlier in
9bb555688caf6ae4ba89fee5baa3dc29fec6a9b1.
This patch refactors the llvm-mca rules slightly so that the source
files within the tool source directory but not the library source
directory are included in a separate cc_library. This patch also adds
the llvm-mca unittests.
llvm/unittests/Target/AArch64/AArch64SVESchedPseudoTest.cpp:38:10: error: module @llvm-project//llvm/unittests:target_aarch64_tests does not depend on a module exporting 'AArch64GenInstrInfo.inc'
Test was added in 57329ca94630742ce3b0f6b239b263d757a9eb4a
This reduces dependencies on `llvm-tblgen` so much.
`CodeGenTypes` depends on `Support` at the moment.
Be careful to append deps on this, since Targets' tablegens
depend on this.
Depends on D149024
Differential Revision: https://reviews.llvm.org/D148769
`llvm-min-tblgen` is capable of building `llvm/include/llvm`;
- `-gen-attrs`
- `-gen-directive-*`
- `-gen-intrinsics-*`
- `-gen-riscv-target-def`
`llvm-min-tblgen` is built and used only when `llvm-tblgen` is built in-tree.
This is not installed.
`llvm-tblgen` is built with complete set and may be installed.
`check-llvm` uses not `llvm-min-tblgen` but `llvm-tblgen`.
`LLVM_TABLEGEN_PROJECT` overrides the definition of `tablegen(project)`.
`LLVM_HEADERS` is used as the overridden prefix for LLVM header generators.
If `EXPORT` is not specified in `add_tablegen`, its tablegen is treated as internal.
Let `llvm-tblgen` depend on `intrinsics_gen`
Depends on D149072
Differential Revision: https://reviews.llvm.org/D146352
- Implement `VTEmitter` as `llvm-tblgen -gen-vt`.
- Create a copy of `llvm/Support/MachineValueType.h` into `unittests/Support`.
It includes `GenVT.inc` generated by `VTEmitter`.
- Implement `MVTTest` in `SupportTests`. It checks equivalence between
`llvm/Support/MachineValueType.h` and the generated header.
Differential Revision: https://reviews.llvm.org/D146906
`llvm/utils/TableGen/GlobalISel` should be exported.
FYI, after D144351,`tablegen_tests` behaved same
as `llvm-tblgen -print-records`.
It suceeded because stdin is `/dev/null`.