Skip to content

Statically link against the existing PCRE2 library as reported by pkg-config #19

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

Open
IceCodeNew opened this issue Feb 22, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@IceCodeNew
Copy link

By referring to the comments of pcre2-sys/build.rs, it appears to me that statically linking against an existing PCRE library is not supported yet.

// 1. Use the PCRE2 system library as reported by pkg-config if it exists
// and only if we don't explicitly want a static build.
// 2. Otherwise, statically build PCRE2 by hand.
//
// For step 1, we permit opting out of using the system library via either
// explicitly setting the PCRE2_SYS_STATIC environment variable or if we
// otherwise believe we want a static build (e.g., when building with MUSL).

I would like to ask for supporting linking ripgrep to a PCRE static library.

Here is my use case: I built HAProxy, ripgrep, and other stuff inside a docker image.
As the HAProxy was built with the latest PCRE2 library statically bounded, I naturally expect that the ripgrep could be bounded with the same library to cut off the compilation time and benefit from bumping of dependencies.

@BurntSushi
Copy link
Owner

Seems reasonable to me as long as it is easy to maintain. I will not be adding this functionality myself though.

@BurntSushi BurntSushi added enhancement New feature or request help wanted Extra attention is needed labels Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants