GithubHelp home page GithubHelp logo

koth / bazel-toolchains Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vsco/bazel-toolchains

0.0 3.0 0.0 44 KB

A collection of Bazel C++ build infrastructure based on Chromium's LLVM toolchain.

License: Apache License 2.0

Python 74.25% Shell 23.13% C++ 2.62%

bazel-toolchains's Introduction

Bazel Toolchains

Build Status

A collection of Bazel C++ build infrastructure based on Chromium's LLVM toolchain. There are tags corresponding to Chromium releases. The build targets currently supported are Linux x64 and macOS. As in Chromium, the Linux toolchain has a sysroot, bundled copies of binutils, and a copy of libc++. The macOS build is less hermetic, and relies on system binutils and libraries.

Use it in your Bazel WORKSPACE file like this:

git_repository(
    name = 'co_vsco_bazel_toolchains',
    remote = 'https://github.com/vsco/bazel-toolchains',
    tag = 'v64.0.3282.167',
)

load("@co_vsco_bazel_toolchains//toolchains:repositories.bzl", "bazel_toolchains_repositories")
bazel_toolchains_repositories()

Invoke Bazel with the custom toolchain:

bazel build --crosstool_top=@co_vsco_bazel_toolchains//tools/cpp:default-toolchain //your/build:target

Bazel Compatibility

vsco/bazel-toolchains is tested against the following build matrix:

Bazel Version OSX Linux
0.9.x
0.10.x
0.11.x
0.12.x
0.13.x

Builds beyond the listed versions are not currently tested.

Prerequisites

On macOS, run xcode-select --install in Terminal.

Running the Python scripts

The files in the scripts/ directory are written in Python. Follow these instructions to install a version of Python that comes with the necessary tools for installation of third party libraries. On macOS, this means brew install python, and then following the instructions printed by brew info python (It's recommended to use python@2 for macOS).

Once that's working, type pip install requests to install the necessary dependencies.

From the root of this repository, type python scripts/generate_workspace.py --rev="64.0.3282.167" where --rev is the Chromium tag you wish to pull from. The script will print status messages to stderr and write a file similar to toolchains/repositories.bzl to stdout.

bazel-toolchains's People

Contributors

nicolov avatar promiseofcake avatar sayrer avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.