blight
blight copied to clipboard
A framework for instrumenting build tools
Currently, blight actions that produce outputs have no real structure enforcement: they can (and do) place whatever fields they want in the JSON blobs that get written. Some things we...
Cargo has mature support for overriding via `RUSTC` and wrapping via `RUSTC_WRAPPER`, so this would be relatively easy to add.
Right now, `blight` doesn't attempt to interfere with each tool's use of `stdout` or `stderr` -- it allows them to inherit the parent process's descriptors and write as if each...
We currently have `EmbedBitcode`, which injects `-fembed-bitcode` into each invocation. This works pretty well on targets like macOS (where `-fembed-bitcode` has well-defined bitcode merging behavior), but not as well on...
The `CompilerTool` class should detect the tool pass-through mechanisms used by both Clang and GCC and expose them as appropriate. Some examples: * Assembler passthrough: `-Wa -flag1,-flag2,-flag3` should be exposed...
Now that we've better separated effective and canonical options (#39), we can better model one of Clang's escape hatches `CCC_OVERRIDE_OPTIONS`. Source: https://github.com/llvm/llvm-project/blob/93a1fc2e18b452216be70f534da42f7702adbe1d/clang/tools/driver/driver.cpp#L79-L105 In summary: `CCC_OVERRIDE_OPTIONS` can be specified in the...
This should be a specialized variant of `InjectFlags`: the `Sanitizer` action should allow the user to configure one or more sanitizers, preventing combinations that are impossible (e.g. ASan and MSan).
Similar to `Record` or `FindOutputs`: we should include an action that emits Clang's [Compilation Database Format](https://clang.llvm.org/docs/JSONCompilationDatabase.html) so that arbitrary builds instrumented with `blight` can be fed into `LibTooling` based tools.
Clang has a bunch of flags that cause the `clang` and `clang++` drivers to print out information, rather than actually doing anything with inputs. We handle some of these already...
Lots of build systems invoke `pkg-config`, internally, e.g. to discover the appropriate include and library directories for a dependency. Supporting it would improve our visibility into dependency resolution. One small...