Skip to content

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

Closed
@comex

Description

@comex

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions