Skip to content

[tools] Add HXCPP_NO_VENDORED flag for system libs#1329

Open
tobil4sk wants to merge 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/system-deps
Open

[tools] Add HXCPP_NO_VENDORED flag for system libs#1329
tobil4sk wants to merge 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/system-deps

Conversation

@tobil4sk

Copy link
Copy Markdown
Member

This allows using libraries provided by the system instead of the vendored sources. This can lead to a faster build and also gives more flexibility to have a newer version or for example in the context of packaging software for linux.

Closes #1093

@Aidan63

Aidan63 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

I'm not a massive fan of this feature. Linking directly against distro packages is an easy way to make projects that work inconsistently across distros (different distros will provide the same package with different features enabled) and brittle when distros update that package version.

If the idea is to make it easier to update dependencies then I think integrating something like vcpkg into hxcpp's build system would be a better route. In the small number of cases where linking to distro libs is useful (e.g. I know this software will only run on Ubuntu 26.04 and I'll decided when that changes) I think it's fine to require the user to manually modify build xml to their needs,

@tobil4sk

tobil4sk commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

I'm not trying to advocate for making distro specific builds the default, but just to add the option so it can be used where it makes sense.

For example, if haxelib is built using hxcpp in future, it is useful to be able to build it in a way that works well as a distro package. Most distros prefer avoiding vendored dependencies in packages, so most packages provide configuration flags like --with-system-libx, which this is essentially equivalent to.

Outside of that, I would personally only use it for a quick local build, I agree it would not be recommended for any binary builds intended for manual download (where static linking is preferred).

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.

Allow using system sqlite?

2 participants