Skip to content

[Flang-RT] Build libflang_rt.so #120213

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

Meinersbur
Copy link
Member

@Meinersbur Meinersbur commented Dec 17, 2024

Under non-Windows platforms, also create a dynamic library version of the runtime. Build of either version of the library can be switched off using FLANG_RT_ENABLE_STATIC=OFF respectively FLANG_RT_ENABLE_SHARED=OFF. Default is to build both.

PR on top of #110217.

@Meinersbur Meinersbur marked this pull request as ready for review January 2, 2025 18:03
Copy link
Contributor

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for moving in this direction!

if (ARG_STATIC AND FLANG_RT_ENABLE_STATIC)
set(build_static ON)
endif ()
if (ARG_SHARED AND FLANG_RT_ENABLE_SHARED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not seeing the shared library version of libflang_rt being built with this patch. It seems build_shared is always set to OFF because ARG_SHARED is not set for flang_rt,

@Meinersbur
Copy link
Member Author

Shoot. I only updated the branch with the same name in https://github.com/llvm/llvm-project. I created this PR from my personal's repository since it was supposed to be the last in the series.

I created a new one at #110217, since I am planning another PR on top. Thanks for trying out and sorry for the confusion.

NB. #110217 changes the default to FLANG_RT_ENABLE_SHARED=OFF. This is because most linkers prioritize the shared library if available and cause any executable created using the flang driver to require libflang_rt.so. Eventually, we should add an equivalent to -static-libgcc and -static-libgfortran to the Flang driver.

@Meinersbur
Copy link
Member Author

Superseded by #121782

@Meinersbur Meinersbur closed this Jan 6, 2025
@Meinersbur Meinersbur deleted the users/meinersbur/flang_runtime_shared branch February 28, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants