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

Add tokenizers_srcdir_relative build tag to allow static library path #15

Closed
wants to merge 1 commit into from

Conversation

RJKeevil
Copy link

Add tokenizers_srcdir_relative build tag to allow library to be placed either in the module source directory, or in the static /usr/lib/ path.

Due to the suggested naming of the variable, I have therefore made the relative path option non-default. If you would prefer the current behaviour to be unchanged, should we instead make the tag tokenizers_srcdir_static or something?

@@ -3,7 +3,8 @@ package tokenizers
// TODO packaging: how do we build the rust lib for distribution?

/*
#cgo LDFLAGS: ${SRCDIR}/libtokenizers.a -ldl -lm -lstdc++
#cgo tokenizers_srcdir_relative LDFLAGS: ${SRCDIR}/libtokenizers.a -ldl -lm -lstdc++
#cgo !tokenizers_srcdir_relative LDFLAGS: /usr/lib/libtokenizers.a -ldl -lm -lstdc++
Copy link
Owner

Choose a reason for hiding this comment

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

why are you picking /usr/lib/libtokenizers.a over package relative libtokenizers.a?

Copy link
Author

Choose a reason for hiding this comment

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

I mentioned that in my comment, by making the build flag name "tokenizers_srcdir_relative" as you suggest, package relative therefore becomes the non-default option. If you prefer to keep the current default behaviour we need to change that flag name to something like "tokenizers_srcdir_static"? Do you have a preferred name?

@jmoney
Copy link
Contributor

jmoney commented Jun 4, 2024

I think #18 solves this issue too.

@daulet
Copy link
Owner

daulet commented Jun 12, 2024

I believe #18 solves this more generically.

@daulet daulet closed this Jun 12, 2024
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.

3 participants