Giter VIP home page Giter VIP logo

gcc-toolchain's Introduction

Bazel GCC toolchain

This is a fully-hermetic Bazel GCC toolchain for Linux. It supports the glibc variants of https://toolchains.bootlin.com. You can find the documentation under docs.

Why would someone want or need a hermetic toolchain?

Reproducibility and portability.

Developers want their code to compile correctly, be reproducible on CI systems and other developers machines. The way C++ toolchains function usually rely on the system libraries to work.

Reproducibility

If you don't have the exact same headers and libraries, the output produced by Bazel will differ from systems. This is particularly expensive with C++ as caches cannot be shared between machines. More importantly, bugs may exist in one machine but not in others, making the development lifecycle and build system unreliable.

Portability

When it comes to building portable ELF binaries, the libc plays an important role. The linker will try to link against new symbols, and since the GNU libc has symbol versioning, linking against a newer glibc will prevent that program from running on a system using an older glibc. To solve this, we ship glibc 2.26 with the sysroots, which should be old enough by now to make all programs compiled with this toolchain portable.

Use cases

  • Your repository contains first-party C/C++/Fortran code; or
  • You need to run sanitizers (asan, lsan, tsan, ubsan) on your code; or
  • You need to cross-compile from Linux x86_64 to Linux armv7 or aarch64; or
  • You want to make your program portable to other Linux distros (our default sysroot ships with glibc 2.26); or
  • You want reproducibility.

gcc-toolchain's People

Contributors

f0rmiga avatar renovate[bot] avatar gregmagolan avatar alexeagle avatar matte1 avatar mattem avatar tobithiel 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.