File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 77use SPC \builder \freebsd \SystemUtil as FreeBSDSystemUtil ;
88use SPC \builder \linux \SystemUtil as LinuxSystemUtil ;
99use SPC \builder \macos \SystemUtil as MacOSSystemUtil ;
10+ use SPC \exception \WrongUsageException ;
1011use SPC \util \GlobalEnvManager ;
1112
1213class GccNativeToolchain implements ToolchainInterface
@@ -23,9 +24,9 @@ public function afterInit(string $target): void
2324 {
2425 // check gcc exists
2526 match (PHP_OS_FAMILY ) {
26- 'Linux ' => LinuxSystemUtil::findCommand ('g++ ' ) ?? throw new \ RuntimeException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
27- 'Darwin ' => MacOSSystemUtil::findCommand ('g++ ' ) ?? throw new \ RuntimeException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
28- 'BSD ' => FreeBSDSystemUtil::findCommand ('g++ ' ) ?? throw new \ RuntimeException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
27+ 'Linux ' => LinuxSystemUtil::findCommand ('g++ ' ) ?? throw new WrongUsageException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
28+ 'Darwin ' => MacOSSystemUtil::findCommand ('g++ ' ) ?? throw new WrongUsageException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
29+ 'BSD ' => FreeBSDSystemUtil::findCommand ('g++ ' ) ?? throw new WrongUsageException ('g++ not found, please install it or set CC/CXX to a valid path. ' ),
2930 default => throw new \RuntimeException ('GCC is not supported on ' . PHP_OS_FAMILY . '. ' ),
3031 };
3132 }
You can’t perform that action at this time.
0 commit comments