Skip to content

rsuderman/llvm-bazel

 
 

Repository files navigation

LLVM Bazel BUILD files

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.

Status

This build configuration is moving upstream to the LLVM monorepo, where it will be located in a side directory maintained by the subcommunity interested in the Bazel build. This is following the upstreaming proposal. The patch to introduce the files is at https://reviews.llvm.org/D90352. It will be possible to use the build files in their new location using a very similar mechanism.

In the meantime, please continue to send PRs or issues, but know that major changes will likely be paused until the upstreaming completes. When upstreaming is complete this repository will see less regular maintenance, though patches will still be accepted.

Usage

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 build --config=generic_clang @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 build --config=generic_clang @llvm-project//...

License

Licensed under the Apache license with LLVM Exceptions. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Starlark 89.8%
  • C 5.7%
  • CMake 2.7%
  • Shell 1.1%
  • Python 0.7%