mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
zig now supports -Wl,-exported_symbols_list
This commit is contained in:
parent
0b863cbc70
commit
19f941797e
@ -72,12 +72,8 @@ trait UnixSystemUtilTrait
|
|||||||
if (!is_file($symbol_file)) {
|
if (!is_file($symbol_file)) {
|
||||||
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
|
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
|
||||||
}
|
}
|
||||||
// https://github.com/ziglang/zig/issues/24662
|
// macOS/zig
|
||||||
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) {
|
||||||
return '-Wl,--export-dynamic';
|
|
||||||
}
|
|
||||||
// macOS
|
|
||||||
if (SPCTarget::getTargetOS() !== 'Linux') {
|
|
||||||
return "-Wl,-exported_symbols_list,{$symbol_file}";
|
return "-Wl,-exported_symbols_list,{$symbol_file}";
|
||||||
}
|
}
|
||||||
return "-Wl,--dynamic-list={$symbol_file}";
|
return "-Wl,--dynamic-list={$symbol_file}";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user