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

build: link using rustc #13

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

build: link using rustc #13

wants to merge 15 commits into from

Conversation

proppy
Copy link
Collaborator

@proppy proppy commented Jul 3, 2024

This add rustc cargo directives to link to libxls dso using regular C compiler flags (-L and -l) rather than relying on libloading.

This has the advantage of decoupling c_api.rs from the linkage type and can also allow static linking (and thus fixes #1) in bazel based environment.

This also patch the DSO using install_name_tool so that ld doesn't fail to link by trying to discover it from the bazel build path.

@proppy
Copy link
Collaborator Author

proppy commented Jul 18, 2024

PTAL, managed to patch the LC_ID_DYLIB command in buid.rs using install_name_tool so that ld doesn't fail to link directly to it.

Note that it would be better to do this as part of https://github.com/xlsynth/xlsynth/tree/cdleary/release-dylib-workflow release process instead.

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.

consider static linking
1 participant