lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

fix: do not dllexport symbols in core static libraries

Open Kha opened this issue 11 months ago • 6 comments

On Windows, we now compile all core .os 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.

Kha avatar Mar 05 '24 09:03 Kha

TODO to definitely resolve #2346: do the same for user code in Lake

Kha avatar Mar 06 '24 13:03 Kha

@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 avatar Mar 07 '24 16:03 Kha

@Kha The Lake linking fixed one of the tests, but the other is now failing with l_System_FilePath_join was replaced (log).

tydeu avatar Mar 07 '24 21:03 tydeu

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.

Kha avatar Mar 08 '24 09:03 Kha

Mathlib CI status (docs):

  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git 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. Try git 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.

tydeu avatar Mar 09 '24 00:03 tydeu

@Kha Added the release note. Feel free to merge when convenient.

tydeu avatar Mar 14 '24 18:03 tydeu