make hidden visibility the default for Unix
This commit is contained in:
parent
d550417f8b
commit
c35788b97c
2 changed files with 4 additions and 0 deletions
|
|
@ -925,6 +925,8 @@ proc genProcHeader(m: BModule, prc: PSym): Rope =
|
||||||
result.add "N_LIB_EXPORT "
|
result.add "N_LIB_EXPORT "
|
||||||
elif prc.typ.callConv == ccInline:
|
elif prc.typ.callConv == ccInline:
|
||||||
result.add "static "
|
result.add "static "
|
||||||
|
else:
|
||||||
|
result.add "N_LIB_PRIVATE "
|
||||||
var check = initIntSet()
|
var check = initIntSet()
|
||||||
fillLoc(prc.loc, locProc, prc.ast[namePos], mangleName(m, prc), OnUnknown)
|
fillLoc(prc.loc, locProc, prc.ast[namePos], mangleName(m, prc), OnUnknown)
|
||||||
genProcParams(m, prc.typ, rettype, params, check)
|
genProcParams(m, prc.typ, rettype, params, check)
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,7 @@ __clang__
|
||||||
/* ------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
|
#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
|
||||||
|
# define N_LIB_PRIVATE
|
||||||
# define N_CDECL(rettype, name) rettype __cdecl name
|
# define N_CDECL(rettype, name) rettype __cdecl name
|
||||||
# define N_STDCALL(rettype, name) rettype __stdcall name
|
# define N_STDCALL(rettype, name) rettype __stdcall name
|
||||||
# define N_SYSCALL(rettype, name) rettype __syscall name
|
# define N_SYSCALL(rettype, name) rettype __syscall name
|
||||||
|
|
@ -178,6 +179,7 @@ __clang__
|
||||||
# endif
|
# endif
|
||||||
# define N_LIB_IMPORT extern __declspec(dllimport)
|
# define N_LIB_IMPORT extern __declspec(dllimport)
|
||||||
#else
|
#else
|
||||||
|
# define N_LIB_PRIVATE __attribute__((visibility("hidden")))
|
||||||
# if defined(__GNUC__)
|
# if defined(__GNUC__)
|
||||||
# define N_CDECL(rettype, name) rettype name
|
# define N_CDECL(rettype, name) rettype name
|
||||||
# define N_STDCALL(rettype, name) rettype name
|
# define N_STDCALL(rettype, name) rettype name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue