Skip to content

Commit 08a6879

Browse files
committed
Call export in dynamic symbol getter
1 parent 465bd3c commit 08a6879

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/SPC/builder/traits/UnixSystemUtilTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace SPC\builder\traits;
66

77
use SPC\exception\ExecutionException;
8+
use SPC\exception\SPCInternalException;
89
use SPC\exception\WrongUsageException;
910
use SPC\toolchain\ToolchainManager;
1011
use SPC\toolchain\ZigToolchain;
@@ -66,7 +67,10 @@ public static function getDynamicExportedSymbols(string $lib_file): ?string
6667
{
6768
$symbol_file = "{$lib_file}.dynsym";
6869
if (!is_file($symbol_file)) {
69-
return null;
70+
self::exportDynamicSymbols($lib_file);
71+
}
72+
if (!is_file($symbol_file)) {
73+
throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available.");
7074
}
7175
// https://github.com/ziglang/zig/issues/24662
7276
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {

0 commit comments

Comments
 (0)