diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py index 76be0892699a..520038c16e0a 100644 --- a/truffle/mx.truffle/mx_truffle.py +++ b/truffle/mx.truffle/mx_truffle.py @@ -1566,7 +1566,7 @@ def getArchivableResults(self, use_relpath=True, single=False): configure_args = ['--disable-dependency-tracking', '--disable-shared', '--with-pic', - ' CFLAGS="{}"'.format(' '.join(['-g', '-O3'] + (['-m64'] if mx.get_os() == 'solaris' else []))), + ' CFLAGS="{}"'.format(' '.join(['-g', '-O3', '-fvisibility=hidden'] + (['-m64'] if mx.get_os() == 'solaris' else []))), 'CPPFLAGS="-DNO_JAVA_RAW_API"', ] diff --git a/truffle/mx.truffle/suite.py b/truffle/mx.truffle/suite.py index 41d082b4311d..7df413e13b4d 100644 --- a/truffle/mx.truffle/suite.py +++ b/truffle/mx.truffle/suite.py @@ -963,19 +963,19 @@ }, "linux" : { "" : { - "cflags" : ["-g", "-Wall", "-Werror", "-D_GNU_SOURCE"], + "cflags" : ["-g", "-Wall", "-Werror", "-D_GNU_SOURCE", "-fvisibility=hidden"], "ldlibs" : ["-ldl"], }, }, "linux-musl" : { "" : { - "cflags" : ["-g", "-Wall", "-Werror"], + "cflags" : ["-g", "-Wall", "-Werror", "-fvisibility=hidden"], "ldlibs" : ["-ldl"], }, }, "" : { "" : { - "cflags" : ["-g", "-Wall", "-Werror"], + "cflags" : ["-g", "-Wall", "-Werror", "-fvisibility=hidden"], "ldlibs" : ["-ldl"], }, },