fix: use -fvisibility=hidden when using GCC

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
Christopher Arndt 2024-09-29 13:49:43 +02:00
parent 521fefc531
commit 1f72523055
1 changed files with 3 additions and 1 deletions

View File

@ -72,6 +72,9 @@ task build_ex, "Build given example plugin":
switch("mm", "arc") switch("mm", "arc")
switch("out", ex.dll) switch("out", ex.dll)
when defined(gcc):
switch("passC", "-fvisibility=hidden")
when not defined(release) and not defined(debug): when not defined(release) and not defined(debug):
echo &"Compiling plugin {ex.name} in release mode." echo &"Compiling plugin {ex.name} in release mode."
switch("define", "release") switch("define", "release")
@ -115,4 +118,3 @@ task lv2bm, "Run lv2bm benchmark on given example plugin":
exec(&"lv2bm --full-test -i white \"{ex.uri}\"") exec(&"lv2bm --full-test -i white \"{ex.uri}\"")
else: else:
echo &"Example '{ex.name}' shared library not found. Use task 'build_ex' to build it." echo &"Example '{ex.name}' shared library not found. Use task 'build_ex' to build it."