Fix old macOS Clang allocation flags - #278
Open
LeonidasZhak wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pass
-fno-aligned-allocationwhen building against libc++ on macOS 10.12 and earlier with Clang.Thanks to maintainers
Thanks for identifying the affected compiler and macOS boundary in #219, and for welcoming a focused fix.
Issue or motivation
Fixes #219. The oneTBB backend does not compile on the affected systems unless this flag is supplied.
Root cause
Darwin 16 and earlier use a libc++ implementation that needs aligned allocation disabled for the oneTBB build and for packages compiling against its headers. The flag was not carried through RcppParallel's configuration or downstream
CxxFlags()output.Change
clang++combination during configuration.CxxFlags().Tests
R CMD build --no-manual: passedR CMD check --as-cran --no-manual: passed; all 13 test scripts passed, with only the existing development-version NOTEScope
This does not change flags on newer macOS releases, non-Clang compilers, or non-Darwin platforms. It does not modify the bundled oneTBB sources or alter unrelated compiler flags.