Skip to content

Commit

Permalink
Enabled visibility=hidden for non-debug builds (only)
Browse files Browse the repository at this point in the history
and only on gcc
  • Loading branch information
umlaeute committed Oct 9, 2017
1 parent 31943b3 commit 0470e7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ if MAKE_DOC
SUBDIRS += doc
endif

AM_CXXFLAGS = @visibility@

lib_LTLIBRARIES = %D%/librtmidi.la
%C%_librtmidi_la_LDFLAGS = -no-undefined -export-dynamic -version-info @SO_VERSION@
%C%_librtmidi_la_SOURCES = \
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ AC_SUBST(SO_VERSION)
AC_SUBST(LIBS)
AC_SUBST(api)
AC_SUBST(req)
AC_SUBST(visibility)

visibility=""
api=""
req=""

Expand Down Expand Up @@ -110,6 +112,7 @@ AS_IF([test "x$debugflags" != x],
# Check compiler and use -Wall if gnu.
AS_IF([test "x$GXX" = "xyes"], [
CXXFLAGS="-Wall -Wextra ${CXXFLAGS}"
AS_IF([test "x${enable_debug}" != "xyes" ], visibility="-fvisibility=hidden" )
])

# Checks for doxygen
Expand Down

0 comments on commit 0470e7c

Please sign in to comment.