Skip to content

Don't pass -ffunction-sections or -fdata-sections on Darwin targets #291

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

Closed
comex opened this issue Mar 2, 2018 · 1 comment
Closed

Comments

@comex
Copy link

comex commented Mar 2, 2018

On GNU targets, these flags are necessary to allow the linker to strip unused symbols. On Darwin, they aren't necessary for that, and in fact don't seem to have any effect. Normally they're harmless, but if the user passes -fembed-bitcode in CFLAGS, Xcode's version of clang gets upset:

clang: error: -ffunction-sections is not supported with -fembed-bitcode
clang: error: -fdata-sections is not supported with -fembed-bitcode

Thus, it would be best to simply omit these flags on Darwin.

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

No branches or pull requests

2 participants