Skip to content

[Flang-RT] Build libflang_rt.so #121782

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

Merged
merged 167 commits into from
Feb 17, 2025
Merged

Conversation

Meinersbur
Copy link
Member

@Meinersbur Meinersbur commented Jan 6, 2025

Under non-Windows platforms, also create a dynamic library version of the runtime. Build of either version of the library can be switched on using FLANG_RT_ENABLE_STATIC=ON respectively FLANG_RT_ENABLE_SHARED=ON. Default is to build only the static library, consistent with previous behaviour. This is because the way the flang driver invokes the linker, most linkers choose the dynamic library by default, if available. Building the dynamic library therefore causes flang-built executables to depend on libflang_rt.runtime.so, unless explicitly told otherwise.

PR on top of #110217.

@Meinersbur Meinersbur force-pushed the users/meinersbur/flang_runtime branch from 93d7651 to f670816 Compare January 24, 2025 18:43
@Meinersbur Meinersbur requested a review from a team as a code owner January 24, 2025 18:43
@Meinersbur Meinersbur force-pushed the users/meinersbur/flang_runtime_shared branch from 3818238 to b05c9a0 Compare January 24, 2025 18:43
@ldionne ldionne removed the request for review from a team January 27, 2025 18:12
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!

Base automatically changed from users/meinersbur/flang_runtime to main February 16, 2025 14:39
@Meinersbur Meinersbur merged commit 4c4fc46 into main Feb 17, 2025
6 checks passed
@Meinersbur Meinersbur deleted the users/meinersbur/flang_runtime_shared branch February 17, 2025 11:53
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Under non-Windows platforms, also create a dynamic library version of
the runtime. Build of either version of the library can be switched on
using FLANG_RT_ENABLE_STATIC=ON respectively FLANG_RT_ENABLE_SHARED=ON.
Default is to build only the static library, consistent with previous
behaviour. This is because the way the flang driver invokes the linker,
most linkers choose the dynamic library by default, if available.
Building the dynamic library therefore causes flang-built executables to
depend on `libflang_rt.so`, unless explicitly told otherwise.
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