Skip to content

cmake: prevent multi library unity build conflicts #265

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

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

carenas
Copy link
Contributor

@carenas carenas commented Jun 7, 2023

When support for Unity/Jumbo builds was added[1], the fact that cmake will need to be able to not mix files with different PCRE2_UCHAR sizes was missed, resulting in a possibly broken build by redefining LINK_SIZE as shown by warnings during compilation.

Since 4678857 (add a C23 inspired checked integer multiplication helper (#198), 2023-02-03), the build will fail if the linker wouldn't be able to merge the multiple implementations of pcre2_ckd_smul from each participating library.

To avoid both problems, disable UNITY_BUILD for the non 8-bit libraries.

[1] #94

When support for Unity/Jumbo builds was added[1], the fact that cmake
will need to be able to not mix files with different PCRE2_UCHAR
sizes was missed, resulting in a possibly broken build by redefining
LINK_SIZE as shown by warnings during compilation.

Since 4678857 (add a C23 inspired checked integer multiplication helper
(PCRE2Project#198), 2023-02-03), the build will fail if the linker wouldn't be able
to merge the multiple implementations of pcre2_ckd_smul from each
participating library.

To avoid both problems, disable UNITY_BUILD for the non 8-bit libraries.

[1] PCRE2Project#94
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.

2 participants