Skip to content
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

PKG-211: Link LLVM statically #16

Draft
wants to merge 1 commit into
base: TDE_REL_17_STABLE
Choose a base branch
from

Conversation

dutow
Copy link
Collaborator

@dutow dutow commented Nov 4, 2024

This commit modifies the build scripts so that llvmjit.so links LLVM statically instead of dynamically. No other binary affected, the change shouldn't be user visible at all.

The memory footprint of postgres is also unaffected: only the llvmjit.so dynamic library is affected. If postgres doesn't use JIT, the LLVM library isn't loaded, as before. If it uses JIT, it is loaded as part of llvmjit.so, sa before.

The only change is the binary size of llvmjit.so.

ldd lib/postgresql/llvmjit.so
	linux-vdso.so.1 (0x00007fff3fd2c000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fc6596bc000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fc65968a000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fc65945e000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fc659377000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fc659357000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc65912c000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fc65c078000)

This commit modifies the build scripts so that `llvmjit.so` links
LLVM statically instead of dynamically. No other binary affected,
the change shouldn't be user visible at all.

The memory footprint of postgres is also unaffected: only the
`llvmjit.so` dynamic library is affected. If postgres doesn't use
JIT, the LLVM library isn't loaded, as before. If it uses JIT, it
is loaded as part of `llvmjit.so`, sa before.

The only change is the binary size of `llvmjit.so`.
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.

1 participant