File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,12 @@ while [[ $# -gt 0 ]]; do
3434 esac
3535done
3636
37- output=$( zig cc -target ${SPC_TARGET} -lstdc++ ${COMPILER_EXTRA} " ${PARSED_ARGS[@]} " 2>&1 )
37+ TARGET=" "
38+ if [ -n " $SPC_TARGET " ]; then
39+ TARGET=" -target $SPC_TARGET "
40+ else
41+
42+ output=$( zig cc $TARGET -lstdc++ $COMPILER_EXTRA " ${PARSED_ARGS[@]} " 2>&1 )
3843status=$?
3944
4045if [ $status -eq 0 ]; then
@@ -43,8 +48,8 @@ if [ $status -eq 0 ]; then
4348fi
4449
4550if echo " $output " | grep -q " version '.*' in target triple" ; then
46- echo " $output " | grep -v " version '.*' in target triple"
51+ echo " $output " | grep -v " version '.*' in target triple"
4752 exit 0
4853else
49- exec zig cc -target ${SPC_TARGET} ${ COMPILER_EXTRA} " ${PARSED_ARGS[@]} "
54+ exec zig cc $TARGET $ COMPILER_EXTRA " ${PARSED_ARGS[@]} "
5055fi
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ToolchainManager
2020 public static function getToolchainClass (): string
2121 {
2222 $ libc = getenv ('SPC_LIBC ' );
23- if ($ libc !== false && !getenv ('SPC_TARGET ' )) {
23+ if ($ libc && !getenv ('SPC_TARGET ' )) {
2424 // TODO: @crazywhalecc this breaks tests
2525 // logger()->warning('SPC_LIBC is deprecated, please use SPC_TARGET instead.');
2626 return match ($ libc ) {
Original file line number Diff line number Diff line change 2727 // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
2828 'ubuntu-22.04 ' , // bin/spc-gnu-docker for x86_64
2929 'ubuntu-24.04 ' , // bin/spc for x86_64
30- // 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
31- // 'ubuntu-24.04-arm', // bin/spc for arm64
30+ 'ubuntu-22.04-arm ' , // bin/spc-gnu-docker for arm64
31+ 'ubuntu-24.04-arm ' , // bin/spc for arm64
3232 // 'windows-latest', // .\bin\spc.ps1
3333];
3434
@@ -158,6 +158,7 @@ function quote2(string $param): string
158158 break ;
159159 case 'ubuntu-24.04 ' :
160160 case 'ubuntu-24.04-arm ' :
161+ putenv ('SPC_TARGET=native-linux-gnu ' );
161162 if (str_contains ((string ) getenv ('SPC_TARGET ' ), '-gnu ' )) {
162163 $ shared_cmd = ' --build-shared= ' . quote2 ($ shared_extensions ) . ' ' ;
163164 }
You can’t perform that action at this time.
0 commit comments