Commit graph

223 commits

Author SHA1 Message Date
Sebastian Ullrich
16fdca1cbd
chore: test results as job summary (#3715)
Tired of scrolling through and parsing the test output myself
2024-03-27 10:14:33 +00:00
Leni Aniva
3ab1c23500
fix: Build failure of nix build . on macOS (#3712)
Closes bug #3711 

Now we have
```
$ nix build .#stage0
$ ls result/lib/lean/
libInit_shared.dylib* libleanshared.dylib*
```
2024-03-18 21:39:39 +00:00
Sebastian Ullrich
3b4b2cc89d
fix: do not dllexport symbols in core static libraries (#3601)
On Windows, we now compile all core `.o`s twice, once with and without
`dllexport`, for use in the shipped dynamic and static libraries,
respectively. On other platforms, we export always as before to avoid
the duplicate work.

---------

Co-authored-by: tydeu <tydeu@hatpress.net>
2024-03-15 11:58:34 +00:00
Sebastian Ullrich
8193af33e3
fix: split libInit_shared out of libleanshared (#3421)
Avoids hitting the Windows limit on symbols per shared library soon
2024-02-22 19:16:32 +00:00
Sebastian Ullrich
b3a85631d8
chore: set warningAsError in CI only (#3030)
Don't fail local builds because of this
2023-12-06 08:18:39 +00:00
Marc Huisinga
7ff7cf9b5a
feat: per-package server options (#2858)
This PR adds per-package server options to resolve #2455. It is based on
the previous work in #2456, but takes a different approach: options are
loaded for the specific file in the file worker when `print-paths` is
called, instead of loading them in the watchdog with a separate Lake
command. This change addresses review comments made in #2456.

In doing so, it introduces two new Lake config fields: 
- `leanOptions`: `-D` flag options that are passed to both the language
server and `lean` when building.
- `moreServerOptions`: `-D` flag options that are passed to the language
server.

Since `print-paths` must also accept a file path to compute the options
for that file, this PR is changing the API for `print-paths`. As there
have been numerous complaints about the name `print-paths`, I also
decided to change it to `setup-file` in this PR, since it would break
compatibility with the old Lake API anyways.

This PR deprecates the Lakefile field `moreServerArgs` in favor of
`moreGlobalServerArgs`, as suggested in the review for #2456.

Fixes #2455

---------

Co-authored-by: digama0 <mcarneir@andrew.cmu.edu>
2023-11-26 13:42:38 +00:00
Joachim Breitner
f7bff16c9a
fix: If src is a dir, assume the lean file has the full path (#2465)
It seems that before, if `$src` isn’t a file, but a directory, that it
would contain `Bar.lean` directly, and not `Foo/Bar.lean`. This seemd
odd and would not allow dependencies to be included easily.
2023-08-28 14:45:45 +02:00
Sebastian Ullrich
8ffb389f3f chore: Nix bump to LLVM 15
Also update mdbook dependency hash from nixpkgs bump.

Peeled from https://github.com/leanprover/lean4/pull/2340
to enable LLVM for stage1+ builds.
2023-07-28 10:56:54 +02:00
Sebastian Ullrich
544b704a25 test: add Lake tests 2023-07-21 09:19:19 +02:00
Sebastian Ullrich
d991f5efe0 fix: ship libLake.a 2023-07-21 09:19:19 +02:00
Sebastian Ullrich
8999ef067b chore: Nix: fixup Lake integration 2023-07-21 09:19:19 +02:00
Sebastian Ullrich
c35e41ce15 chore: Nix: add lake executable 2023-07-17 10:38:35 +02:00
Enrico Borba
6d583284df
chore: Nix: fix depRoot with huge number of deps (#2179)
If `deps` or `depRoots` are too large, bash will carsh when executing
the modified script. This is because there are OS-level limits on the
size of environment variables. This commit changes the script so that
`deps` and `depRoots` are written to files instead of being passed as
environment variables.
2023-04-01 09:45:38 +02:00
Connor Baker
667d54640d
chore: Nix: use strings instead of URL literals (#2172) 2023-03-28 10:10:24 +02:00
Sebastian Ullrich
db2e710072 chore: Nix: update lean4-mode 2023-03-15 10:52:03 +01:00
Sebastian Ullrich
2a7ae7b28a chore: Nix: explicit src 2023-01-26 13:32:42 +01:00
Sebastian Ullrich
67a5846742 chore: Nix: more sanitizing 2023-01-12 15:05:14 +01:00
Sebastian Ullrich
707e762d78 chore: Nix: remove redundant link flags 2023-01-12 13:00:09 +01:00
Sebastian Ullrich
da2ea1fa98 chore: Nix: fix symbol interposition 2023-01-12 12:50:17 +01:00
Sebastian Ullrich
74b3d101e9 chore: Nix: avoid store copies 2023-01-07 20:22:42 +01:00
Sebastian Ullrich
222a8140a7 chore: Nix: avoid quadratic attrset accumulation 2023-01-07 20:22:42 +01:00
Siddharth
b6eb780144
feat: LLVM backend (#1837) 2022-12-30 12:45:30 +01:00
Sebastian Ullrich
10d2403e83 chore: Nix: link dynamically by default
The Nix way
2022-12-22 12:13:22 +01:00
Sebastian Ullrich
cbf1b433d7 chore: Nix: linkFarm, not symlinkJoin 2022-12-21 20:06:18 +01:00
Sebastian Ullrich
73f9377322 chore: Nix: cache depRoots 2022-12-21 15:22:13 +01:00
Sebastian Ullrich
0b243f0ca3 chore: Nix: avoid import errors for now
Gotta refactor this anyway
2022-12-04 18:52:33 +01:00
Sebastian Ullrich
9e83115072 chore: Nix: lazy-trees compatibility 2022-12-04 18:52:33 +01:00
Sebastian Ullrich
768ef310a0 refactor: Nix: LeanInk rendering based on packages, not directories 2022-12-03 15:14:17 +01:00
Sebastian Ullrich
ed3fa37341 chore: Nix: add overrideBuildModAttrs 2022-12-03 14:13:31 +01:00
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
Siddharth
4d47c8abc6
feat: add LLVM C API bindings (#1497)
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
2022-11-21 09:50:01 +01:00
Sebastian Ullrich
9c3a283eb1 chore: update-stage0: simplify 2022-11-20 10:22:20 -08:00
Sebastian Ullrich
bcd1673231 chore: abort build on panic 2022-11-11 16:24:04 +01:00
Sebastian Ullrich
1ddfb72106 chore: Nix: handle huge packages 2022-10-14 22:21:08 +02:00
Sebastian Ullrich
50a0c9bda7 chore: Nix: remove dead ileans 2022-10-13 18:12:55 +02:00
Mario Carneiro
37252e5fa7 chore: remove Bootstrap package 2022-09-02 16:39:03 -07:00
Mario Carneiro
bf89c5a0f5 chore: move Std -> Bootstrap 2022-08-29 01:26:12 -07:00
Sebastian Ullrich
4562fcfbd7 chore: Nix: include orphan modules like lean.mk does 2022-08-27 17:41:46 +02:00
Sebastian Ullrich
d1beded289 chore: Nix: sanitize drv names 2022-08-12 15:30:22 +02:00
Sebastian Ullrich
f4de40d7dc feat: turn on warningAsError 2022-07-29 10:31:19 -07:00
Sebastian Ullrich
556358e84c chore: Nix: better solution for filtering test output 2022-07-28 17:12:17 +02:00
Sebastian Ullrich
8972cc9baf chore: Nix: cache Leanc-deps 2022-07-16 16:19:01 +02:00
Sebastian Ullrich
0f6bda61c9 chore: Nix: buildLeanPackage devShell 2022-07-08 23:24:04 +02:00
Sebastian Ullrich
8f70c346fd chore: Nix: fix develop shell 2022-07-08 21:49:50 +02:00
Sebastian Ullrich
4f1c3faa6e chore: Nix: re-enable nix develop on bare derivations 2022-07-08 14:49:08 +02:00
Sebastian Ullrich
d679044a9b chore: Nix: use --deps-json for faster, single IFD per package 2022-07-06 16:12:30 +02:00
Sebastian Ullrich
a16eff2996 chore: Nix: implement roots 2022-07-06 16:12:30 +02:00
Sebastian Ullrich
02e5865a02 chore: Nix: stop pinning Nix in ciShell 2022-06-21 22:57:39 +02:00
Sebastian Ullrich
ce73728be3 chore: Nix: avoid build closure dependencies on stdenv 2022-06-21 21:11:59 +02:00
Sebastian Ullrich
d15934c0ac chore: Nix: Bring-Your-Own-Emacs .#emacs-path-dev 2022-06-03 13:41:04 +02:00