Use explict glibc toolchain target

This commit is contained in:
crazywhalecc 2025-06-28 17:28:02 +08:00
parent 3357f286ab
commit 90823e3b17
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -80,7 +80,8 @@ class GlobalEnvManager
SPCTarget::MUSL_STATIC, SPCTarget::MUSL => SystemUtil::isMuslDist() ? 'gcc-native' : 'musl',
SPCTarget::MACHO => 'clang-native',
SPCTarget::MSVC_STATIC => 'msvc',
default => 'gcc-native',
SPCTarget::GLIBC => !SystemUtil::isMuslDist() ? 'gcc-native' : throw new WrongUsageException('SPC_TARGET must be musl-static or musl for musl dist.'),
default => throw new WrongUsageException('Unknown SPC_TARGET: ' . getenv('SPC_TARGET')),
};
SPCTarget::initTargetForToolchain($toolchain);