Skip to content

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

@IceCodeNew

Description

@IceCodeNew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions