-
Notifications
You must be signed in to change notification settings - Fork 16
[flang] Fixing shared library builds #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…d separating the Fortran main from the runtime
…d separating the Fortran main from the runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for having identified the issue and proposing a fix. I tried building your PR with both BUILD_SHARED_LIBS On and Off in my environment of the day (gcc 8.3 on linux, nothing very special in the cmake command) . Both builds failed for different reasons. I identified the issues and was able to fix them (see inlined comment).
Here is the code I had to change if it can help: 12ee61e
Also, I think we may want to centralize all end-to-end tests in their own folder to better control how we deal with them.
My cmake command line:
-DCMAKE_CXX_STANDARD=17 -DLLVM_BUILD_TOOLS=On -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_INSTALL_UTILS=On -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=Off -DLLVM_ENABLE_PROJECTS="mlir;flang" -DCMAKE_CXX_FLAGS="" -DCMAKE_EXE_LINKER_FLAGS="" -DCMAKE_SHARED_LINKER_FLAGS=""
We do. #672 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can now compile this patch with both BUILD_SHARED_LIBS
On and Off, thanks !
Has @tskeith tried it on the Mac? |
I just tried and got this error building
|
It rmeans that more dependencies need to be fixed. But I don't have OS X machine to run on. |
[NFC] ifdef'd this so Symbol::dump() (which is the LLVM regular debug interface) is only in Debug builds now. |
This broke testing.
|
Builds with BUILD_SHARED_LIBS=On are broken in fir-dev.
Re-enabling them by updating new library dependencies and separating the Fortran main from the runtime.
I could not find a way with cmake to make Fortran_main.c just compile and export Fortran_main.o
add_llvm_library( libname OBJECT ...) does not work. After half a day of painful experiments I decided to make a static Fortran_main.a