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

Update ext/xxHash to v0.8.0 #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update ext/xxHash to v0.8.0 #5

wants to merge 3 commits into from

Conversation

nwc10
Copy link

@nwc10 nwc10 commented Aug 21, 2020

These changes update the ext/xxHash to v0.8.0 and fix the build problems that this causes.

As documented in the commit, upstream xxHash has added a subtree containing C test files. The way Module::Build is implemented, c_source can only add a tree recursively, meaning that it will spot all these new files, and attempt to compile and link them all. This breaks.

Having asked on #toolchain for advice, Leon Timmermans suggests that the easiest way to keep the current structure (the entirety of xxHash checked out) is to subclass Module::Build and special case process_support_files. So this is what I have done.

Passes tests on 3 different Linux architectures, which roughly the limit of what I have direct access to.

nwc10 added 3 commits August 20, 2020 14:10
…t version.

The upstream xxHash repository now contains various C test files, in a
subdirectory. Unfortunately, the only API Module::Build offers by default
is "recursively scan the tree for all C files and compile and link the lot"

This doesn't work when some of the C files are test programs, and each
defines main(), meaning that the link stage files with an error about
duplicate symbols.

As Module::Build doesn't offer an option to filter, the least worst choice
is to subclass it and override process_support_files() to do what we need.
(Approach suggested by the current maintainer of Module::Build)
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.

1 participant