lean4-htt/src/shell
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
..
app.manifest fix: UTF-8 file path support for lean on Windows 2021-09-22 12:21:52 +02:00
CMakeLists.txt fix: update libleanrt.bc, rename to lean.h.bc 2022-11-28 16:20:12 +01:00
lean.cpp chore: reintroduce lean.cpp in separate commit so Git doesn't freak out 2021-09-16 07:03:37 -07:00
lean_js.cpp chore: remove dead code 2020-10-27 09:37:21 -07:00
manifest.rc fix: UTF-8 file path support for lean on Windows 2021-09-22 12:21:52 +02:00
mk_lean_sh.sh fix(test*.sh): allow spaces in filename 2015-03-28 23:29:52 -04:00