Add suffix support for SPC_TARGET

This commit is contained in:
crazywhalecc
2025-06-28 23:13:40 +08:00
parent a6364389ba
commit 0598eff9c5
2 changed files with 9 additions and 1 deletions

View File

@@ -78,7 +78,7 @@ class GlobalEnvManager
// auto-select toolchain based on target and OS temporarily
// TODO: use 'zig' instead of 'gcc-native' when ZigToolchain is implemented
$toolchain = match (getenv('SPC_TARGET')) {
$toolchain = match (SPCTarget::getTargetName()) {
SPCTarget::MUSL_STATIC, SPCTarget::MUSL => SystemUtil::isMuslDist() ? 'gcc-native' : 'musl',
SPCTarget::MACHO => 'clang-native',
SPCTarget::MSVC_STATIC => 'msvc',