remove tune flags, add debug output for extension sanity check

This commit is contained in:
crazywhalecc 2024-02-16 20:17:34 +08:00
parent e5d2d5e689
commit 71c0387ab0
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 5 additions and 6 deletions

View File

@ -185,8 +185,11 @@ class Extension
file_get_contents(ROOT_DIR . '/src/globals/tests/' . $this->getName() . '.php')
);
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r "' . trim($test) . '"');
[$ret, $out] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r "' . trim($test) . '"');
if ($ret !== 0) {
if ($this->builder->getOption('debug')) {
var_dump($out);
}
throw new RuntimeException('extension ' . $this->getName() . ' failed sanity check');
}
}

View File

@ -110,11 +110,7 @@ class SystemUtil
public static function getTuneCFlags(string $arch): array
{
return match ($arch) {
'x86_64' => [
'-march=corei7',
'-mtune=core-avx2',
],
'arm64', 'aarch64' => [],
'x86_64', 'arm64', 'aarch64' => [],
default => throw new RuntimeException('unsupported arch: ' . $arch),
};
}