Commit graph

22 commits

Author SHA1 Message Date
Sebastian Ullrich
adc799584c fix: split libleanshared on Windows to avoid symbol limit 2024-08-12 14:14:42 +02:00
David Thrane Christiansen
8fef03d1cc
feat: support Lake for building Lean core oleans (#3886)
This is from a ~~pair~~triple programming session with @tydeu and
@mhuisi.

If stage 1 is built with `-DUSE_LAKE=ON`, the CMake run will generate
`lakefile.toml` files for the root, `src`, and `tests`. These Lake
configuration files can then be used to build core oleans. While they do
not yet allow Lake to be used to build the Lean binaries. they do allow
Lake to be used for working interactively with the Lean source. In our
preliminary experiments, this allowed updates to `Init.Data.Nat` to be
noticed automatically when reloading downstream files, rather than
requiring a full manual compiler rebuild. This will make it easier to
work on the system.

As part of this change, Lake is added to stage 0. This allows Lake to
function in `src`, which uses the stage 0 toolchain.

---------

Co-authored-by: Mac Malone <tydeu@hatpress.net>
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2024-06-13 16:18:24 +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
Siddharth Bhat
146296b5fa feat: enable LLVM in stage1+ compiler 2023-08-14 13:33:46 +02:00
Sebastian Ullrich
c11bd6fa97 test: fix foreign function signatures 2022-07-29 14:10:15 +02:00
Leonardo de Moura
989d8f04e1 chore: fix tests 2022-06-14 17:27:13 -07:00
Leonardo de Moura
c1fccf19cb chore: fix test 2022-01-15 11:46:11 -08:00
Leonardo de Moura
e3241e82bc feat: define PointedType as { α : Type u // Nonempty α } 2022-01-14 20:36:51 -08:00
Sebastian Ullrich
d7b8479760 chore: use configured C++ compiler for foreign test
Fixes #775
2021-11-09 09:27:10 +01:00
Sebastian Ullrich
d5e05f31e4 chore: compiler-dependent test flag 2021-11-06 23:37:19 +01:00
Sebastian Ullrich
85fb03f22c fix: cannot dynamically link against library that depends on statically linked runtime on Windows 2021-11-04 15:32:07 -07:00
Sebastian Ullrich
697e34e229 test: --load-dynlib 2021-11-04 15:32:07 -07:00
Leonardo de Moura
ebd8f1efa7 chore: avoid object.h dependencies 2021-09-07 07:31:48 -07:00
Sebastian Ullrich
4ed66cae3e feat: add --print-prefix, --print-libdir flags
The names were taken from `llvm-config`
2021-06-11 17:53:51 -07:00
Sebastian Ullrich
7e521f0105 chore: remove remaining #lang lean4 in tests 2021-01-27 14:45:31 +01:00
Leonardo de Moura
e3fb7010f1 chore: fix tests 2020-11-25 09:25:45 -08:00
Leonardo de Moura
8cb1ff206c chore: move tests to new frontend 2020-10-23 14:07:26 -07:00
Sebastian Ullrich
c88784ef9d refactor: consistent io_result_mk* naming
/cc @leodemoura
2020-08-31 11:08:57 +02:00
Sebastian Ullrich
c50cd2527c fix: include headers in test 2020-05-23 12:39:49 +02:00
Leonardo de Moura
ee0fb1bfd8 chore: fix test
@Kha

I was having several errors of the form
```
224: /Users/leonardodemoura/projects/lean4/build/release/stage0.5/bin/../include/lean/runtime/exception.h:23:13: error: exception specification of overriding function is more lax than base version
224:     virtual ~throwable() noexcept;
224:             ^
224: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:102:13: note: overridden virtual function is here
224:     virtual ~exception() _NOEXCEPT;
224:             ^
224: In file included from myfuns.cpp:1:
```

As far as I can tell, the error ocurrs because my compiler uses an old
C++ standard if the option `-std` is not used.
I guess `-std=c++11` would also works, but I decided to use the same
standard we used to compile Lean.
2020-05-22 09:33:46 -07:00
Sebastian Ullrich
36e040ecfa test: reimplement compiler/foreign on top of leanmake 2020-05-22 09:22:26 -07:00
Leonardo de Moura
2a1d9a0285 test: simple demo mixing C/C++ and Lean
@dselsam @kha
I did not have to create a new shared library.
The main limitation of this approach is that the new `extern`
functions are only available in compile code. That is, we cannot use
them with `#eval`.
2020-04-06 16:16:49 -07:00