Prevent constructing builder without --arch options error

This commit is contained in:
crazywhalecc 2024-06-30 22:33:53 +08:00 committed by Jerry Ma
parent ba127f4e00
commit 9463cf94ca

View File

@ -37,7 +37,7 @@ class MacOSBuilder extends UnixBuilderBase
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
// cmake toolchain
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('Darwin', $this->getOption('arch'), $this->arch_c_flags);
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile('Darwin', $this->getOption('arch', php_uname('m')), $this->arch_c_flags);
// create pkgconfig and include dir (some libs cannot create them automatically)
f_mkdir(BUILD_LIB_PATH . '/pkgconfig', recursive: true);