It builds fine for MinGW on Windows.
Details
- Reviewers
mstorsjo - Group Reviewers
Restricted Project - Commits
- rG7da941939902: [MinGW][libclang] Allow simultaneous shared and static lib
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Does the static lib built in this case include any dllexport attributes (that can cause issues if linking it statically into another DLL)?
We had this patch at MSYS2 for years and I'm not aware of any issues with the static library.
I think the library looks fine:
$ nm lib/liblibclang.a | grep __imp_ U __imp___acrt_iob_func U __imp___acrt_iob_func U __imp_GetModuleFileNameA U __imp_VirtualQuery U __imp___acrt_iob_func U __imp___acrt_iob_func U __imp___acrt_iob_func
What about llvm-readobj --coff-directives | grep -i export:? The effect is often very subtle - if you build another DLL, that has no explicit dllexports of its own but rely on the default of exporting all symbols - it fails if a statically linked dependency contains explicit dllexports and only exports the dependency's symbols.
bin/llvm-readobj --coff-directives lib/liblibclang.dll.a | grep -i export shows nothing.
Sorry, pasted wrong command. I was curious if import library has it (since static one did not) but in the end neither import nor static library shows any export.