From 470faa97c60aa5d8153f00083913aca4f0dc1fdf Mon Sep 17 00:00:00 2001 From: alaviss Date: Mon, 20 Jan 2020 09:51:21 +0000 Subject: compiler/ccgtypes: hide exportc proc unless it has dynlib (#13199) This hides most of stdlib's internal functions from resulting binaries/libraries, where they aren't needed on *nix. Static libraries are not affected by this change (visibility doesn't apply to them). --- compiler/ccgtypes.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 905f8999e..59f47b02d 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -954,7 +954,7 @@ proc genProcHeader(m: BModule, prc: PSym, asPtr: bool = false): Rope = result.add "N_LIB_EXPORT " elif prc.typ.callConv == ccInline or asPtr or isNonReloadable(m, prc): result.add "static " - elif {sfImportc, sfExportc} * prc.flags == {}: + elif sfImportc notin prc.flags: result.add "N_LIB_PRIVATE " var check = initIntSet() fillLoc(prc.loc, locProc, prc.ast[namePos], mangleName(m, prc), OnUnknown) -- cgit 1.4.1-2-gfad0