From efc1fc2a9bbb26d2748078f70b06819a3d62eb00 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Mon, 5 Sep 2022 19:33:23 +0300 Subject: [PATCH] add -fvisibility=hidden for gcc --- scripts/waifulib/compiler_optimizations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/waifulib/compiler_optimizations.py b/scripts/waifulib/compiler_optimizations.py index f8af85ac..bd5a20b6 100644 --- a/scripts/waifulib/compiler_optimizations.py +++ b/scripts/waifulib/compiler_optimizations.py @@ -36,7 +36,7 @@ LINKFLAGS = { 'common': { 'msvc': ['/DEBUG'], # always create PDB, doesn't affect result binaries 'gcc': ['-Wl,--no-undefined'], - 'owcc': ['-Wl,option stack=512k'] + 'owcc': ['-Wl,option stack=512k', '-fvisibility=hidden'] }, 'sanitize': { 'clang': ['-fsanitize=undefined', '-fsanitize=address'], @@ -49,7 +49,7 @@ CFLAGS = { # disable thread-safe local static initialization for C++11 code, as it cause crashes on Windows XP 'msvc': ['/D_USING_V110_SDK71_', '/Zi', '/FS', '/Zc:threadSafeInit-'], 'clang': ['-g0', '-fno-strict-aliasing'], - 'gcc': ['-g0', '-fno-strict-aliasing'], + 'gcc': ['-g0', '-fno-strict-aliasing', '-fvisibility=hidden'], 'owcc': ['-fno-short-enum', '-ffloat-store', '-g0'] }, 'fast': {