Add SPC_LIBC mapping to SPC_TARGET

This commit is contained in:
crazywhalecc 2025-06-28 22:59:02 +08:00
parent 8145a7536b
commit 454b5a77ad
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -68,7 +68,9 @@ class GlobalEnvManager
logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
$target = match (getenv('SPC_LIBC')) {
'musl' => SPCTarget::MUSL_STATIC,
default => SPCTarget::GLIBC,
'musl-shared' => SPCTarget::MUSL,
'glibc' => SPCTarget::GLIBC,
default => throw new WrongUsageException('Unsupported SPC_LIBC value: ' . getenv('SPC_LIBC')),
};
self::putenv("SPC_TARGET={$target}");
self::putenv('SPC_LIBC');