lean4-htt/nix
Siddharth Bhat dfb5548cab fix: update libleanrt.bc, rename to lean.h.bc
This adds `lean.h.bc`, a LLVM bitcode file of the Lean
runtime that is to be inlined. This is programatically generated.

1. This differs from the previous `libleanrt.ll`, since it produces an
   LLVM bitcode file, versus a textual IR file. The bitcode file
   is faster to parse and build an in-memory LLVM module from.
2. We build `lean.h.bc` by adding it as a target to `shell`,
   which ensures that it is always built.

3. We eschew the need for:

```cpp
```

which causes breakage in the build, since changing the meaning of
`static` messes with definitions in the C++ headers.

Instead, we build `lean.h.bc` by copying everything in
`src/include/lean/lean.h`, renaming `inline` to
`__attribute__(alwaysinline)` [which forces LLVM to generate
`alwaysinline` annotations], then running the `-O3` pass pipeline
to get reasonably optimised IR, and will be perfectly inlined
when linked into the generated LLVM code by
`src/Lean/Compiler/IR/EmitLLVM.lean`.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2022-11-28 16:20:12 +01:00
..
bareStdenv chore: Nix: re-enable nix develop on bare derivations 2022-07-08 14:49:08 +02:00
templates/pkg chore: Nix: make the default flake.nix a bit easier to customize 2021-01-05 16:31:50 +01:00
bootstrap.nix fix: update libleanrt.bc, rename to lean.h.bc 2022-11-28 16:20:12 +01:00
buildLeanPackage.nix chore: abort build on panic 2022-11-11 16:24:04 +01:00
lake-dev.in chore: Nix: adjust message 2022-03-09 10:31:32 +01:00
lean-dev.in chore: Nix: better solution for filtering test output 2022-07-28 17:12:17 +02:00
packages.nix feat: add LLVM C API bindings (#1497) 2022-11-21 09:50:01 +01:00