Skip to content

Static builds and exported symbols #376

@pictview

Description

@pictview

I think there is no need to export all symbols when building a static lib with clang. Hence I suggest to change the following
#elif defined(_GNUC_)
#  define LIBDEFLATE_EXPORT_SYM _attribute_((visibility("default")))
#else
#  define LIBDEFLATE_EXPORT_SYM
#endif
to something like
#elif defined(_GNUC_) || defined(_clang_)
#  if defined(LIBDEFLATE_DLL)
#    define LIBDEFLATE_EXPORT_SYM _attribute_((visibility("default")))
#  else
#    define LIBDEFLATE_EXPORT_SYM _attribute_((visibility("hidden")))
#  endif
#else
#  define LIBDEFLATE_EXPORT_SYM
#endif

maybe then LIBDEFLATE_DLL should be renamed to something like LIBDEFLATE_SHARED.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions