DISCLAIMER: This is not an officially-supported Google project and is still in development.
This repo contains standalone Bazel BUILD configuration for part of the LLVM project that could be shared by dependent projects using the Bazel build system.
It is similar to the BUILD files for LLVM and MLIR in the TensorFlow project, but aims to be suitable for more general usage.
MLIR has Cuda support and the mlir-vulkan-runner disabled. LLVM does not yet have configuration detection and hardcodes values in the config.
These build files are flexible in how they can be used. The llvm-bazel subdirectory has the simplest build configuration with a submodule for the llvm-project. The WORKSPACE is in that directory, so you can build the project like:
cd llvm-bazel/
bazel --config=generic_clang build @llvm-project//...
Users are more likely going to want to fetch build files from this repository and use them with their own copy of the llvm-project.
The http-archive-demo branch shows a build based on http_archive.
The submodule-demo branch shows usage of these build files with both them and llvm-project coming from submodules.
You can build either of these demos after changing into the respective directory with a command like
bazel --config=generic_clang build @llvm-project//...
Licensed under the Apache license with LLVM Exceptions. See LICENSE for more information.