Skip to content

Commit 454b5a7

Browse files
committed
Add SPC_LIBC mapping to SPC_TARGET
1 parent 8145a75 commit 454b5a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SPC/util/GlobalEnvManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public static function init(): void
6868
logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
6969
$target = match (getenv('SPC_LIBC')) {
7070
'musl' => SPCTarget::MUSL_STATIC,
71-
default => SPCTarget::GLIBC,
71+
'musl-shared' => SPCTarget::MUSL,
72+
'glibc' => SPCTarget::GLIBC,
73+
default => throw new WrongUsageException('Unsupported SPC_LIBC value: ' . getenv('SPC_LIBC')),
7274
};
7375
self::putenv("SPC_TARGET={$target}");
7476
self::putenv('SPC_LIBC');

0 commit comments

Comments
 (0)