All Projects → trailofbits → blight

trailofbits / blight

Licence: Apache-2.0 License
A framework for instrumenting build tools

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to blight

Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (+314.04%)
Mutual labels:  build-tool, build-system
vim-build-tools-wrapper
Projects building plugin for Vim
Stars: ✭ 23 (-59.65%)
Mutual labels:  build-tool, compiler-wrapper
craftr
The core framework for the Craftr build system.
Stars: ✭ 1 (-98.25%)
Mutual labels:  build-tool, build-system
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (+147.37%)
Mutual labels:  build-tool, build-system
make
The Ultimate Makefile to compile all your C, C++, Assembly and Fortran projects
Stars: ✭ 41 (-28.07%)
Mutual labels:  build-tool, build-system
Bear
Bear is a tool that generates a compilation database for clang tooling.
Stars: ✭ 2,345 (+4014.04%)
Mutual labels:  build-tool, build-system
ycm
Extra CMake Modules for YARP and friends
Stars: ✭ 42 (-26.32%)
Mutual labels:  build-tool, build-system
Please
High-performance extensible build system for reproducible multi-language builds.
Stars: ✭ 1,856 (+3156.14%)
Mutual labels:  build-tool, build-system
systemjs-tools
(dev)tools for working with SystemJS
Stars: ✭ 41 (-28.07%)
Mutual labels:  build-tool, build-system
b2
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 38 (-33.33%)
Mutual labels:  build-tool, build-system
Style Dictionary
A build system for creating cross-platform styles.
Stars: ✭ 2,097 (+3578.95%)
Mutual labels:  build-tool, build-system
build
Build system scripts based on GENie (https://github.com/bkaradzic/genie) project generator
Stars: ✭ 30 (-47.37%)
Mutual labels:  build-tool, build-system
Arduino Cmake Ng
CMake-Based framework for Arduino platforms
Stars: ✭ 123 (+115.79%)
Mutual labels:  build-tool, build-system
Build
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 182 (+219.3%)
Mutual labels:  build-tool, build-system
Mmake
Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.
Stars: ✭ 1,593 (+2694.74%)
Mutual labels:  build-tool, build-system
Fortran-Tools
Fortran compilers, preprocessors, static analyzers, transpilers, IDEs, build systems, etc.
Stars: ✭ 31 (-45.61%)
Mutual labels:  build-tool, build-system
Mill
Your shiny new Java/Scala build tool!
Stars: ✭ 1,667 (+2824.56%)
Mutual labels:  build-tool, build-system
Blade Build
Blade is a powerful build system from Tencent, supports many mainstream programming languages, such as C/C++, java, scala, python, protobuf...
Stars: ✭ 1,722 (+2921.05%)
Mutual labels:  build-tool, build-system
elite
Fegeya Elitebuild, small, powerful build system. Written in Rust.
Stars: ✭ 24 (-57.89%)
Mutual labels:  build-tool, build-system
assemble-core
The core assemble application with no presets or defaults. All configuration is left to the implementor.
Stars: ✭ 17 (-70.18%)
Mutual labels:  build-tool, build-system

blight

CI PyPI version Downloads

blight is a framework for wrapping and instrumenting build tools.

Usage

$ pip3 install blight
$ eval $(blight-env --guess-wrapped)
$ export BLIGHT_ACTIONS="Record"
$ export BLIGHT_ACTION_RECORD="output=/tmp/demo.jsonl"
$ cd /your/project && make
$ cat /tmp/demo.jsonl

Goals

  • Wrapping CC, CXX, CPP, LD, AS, AR, STRIP, and INSTALL.
  • Providing a visitor-style API for each of the above, pre- and post-execution.
  • Providing a nice set of default actions.
  • Being as non-invasive as possible.

Anti-goals

  • Using LD_PRELOAD to capture every exec in a build system, a la Bear.
  • Supporting cl.exe.
  • Detailed support for non C/C++ languages.

Contributing a new action

New blight actions are easy to write. For example, the following prints a message before every ld invocation:

# src/blight/actions/printld.py

from blight.action import LDAction


class PrintLD(LDAction):
    def before_run(self, tool):
        print(f"ld was run with: {tool.args}")
# src/blight/actions/__init__.py

# bring PrintLD into blight.actions so that `BLIGHT_ACTIONS` can find it
from printld import PrintLD  # noqa: F401
$ eval $(blight-env --guess-wrapped)
$ export BLIGHT_ACTIONS="PrintLD"
$ make

Check out blight's API documentation for more details, including the kinds of available actions.

The name?

Build systems and tools that instrument build systems are a blight on my productivity.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].