lean4
lean4 copied to clipboard
fix: do not dllexport symbols in core static libraries
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.
TODO to definitely resolve #2346: do the same for user code in Lake
@tydeu I believe the only remaining issue is that supportInterpreter
test binaries now fail on Windows as we've now basically implemented our own -rdynamic
distinction! So Lake would need to include LEANC_SHARED_LINKER_FLAGS
when building a supportInterpreter
executable on Windows.
@Kha The Lake linking fixed one of the tests, but the other is now failing with l_System_FilePath_join was replaced
(log).
Interesting. I can only assume that means that we try to both statically and dynamically link against this function, but I don't know why that should happen if -lInit_shared
does land in front of -lInit
. Would be great if you could locally test what clang
invocation makes this work.
Mathlib CI status (docs):
- ❗ Std/Mathlib CI will not be attempted unless your PR branches off the
nightly-with-mathlib
branch. Trygit rebase 09bc477016caffe11da2fac58051c59161445ae3 --onto ae492265fec103aa834d897bf9f68c94d10f0785
. (2024-03-08 20:44:38) - ❗ Std/Mathlib CI will not be attempted unless your PR branches off the
nightly-with-mathlib
branch. Trygit rebase 1151d73a551e45303495f73d59cd3f617d49fd9d --onto 317adf42e92a4dbe07295bc1f0429b61bb8079fe
. (2024-03-14 18:22:55)
I believe I have fixed everything I can on the Lake side and everything now can function, so I will hand this back to you @Kha.
@Kha Added the release note. Feel free to merge when convenient.