Skip to content

Commit 19f9417

Browse files
committed
zig now supports -Wl,-exported_symbols_list
1 parent 0b863cb commit 19f9417

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/SPC/builder/traits/UnixSystemUtilTrait.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,8 @@ public static function getDynamicExportedSymbols(string $lib_file): ?string
7272
if (!is_file($symbol_file)) {
7373
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
7474
}
75-
// https://github.com/ziglang/zig/issues/24662
76-
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
77-
return '-Wl,--export-dynamic';
78-
}
79-
// macOS
80-
if (SPCTarget::getTargetOS() !== 'Linux') {
75+
// macOS/zig
76+
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
8177
return "-Wl,-exported_symbols_list,{$symbol_file}";
8278
}
8379
return "-Wl,--dynamic-list={$symbol_file}";

0 commit comments

Comments
 (0)