rename COMPILER_EXTRA to SPC_COMPILER_EXTRA

This commit is contained in:
DubbleClick 2025-07-04 14:39:42 +07:00
parent 94c38df1ba
commit 013a19e25b
6 changed files with 10 additions and 10 deletions

View File

@ -405,7 +405,7 @@ class Extension
'LDFLAGS' => $config['ldflags'],
'LIBS' => $preStatic . $staticLibString . $postStatic . $sharedLibString,
'LD_LIBRARY_PATH' => BUILD_LIB_PATH,
'COMPILER_EXTRA' => '-lstdc++',
'SPC_COMPILER_EXTRA' => '-lstdc++',
];
if ($this->patchBeforeSharedPhpize()) {

View File

@ -32,7 +32,7 @@ class LinuxBuilder extends UnixBuilderBase
GlobalEnvManager::afterInit();
// concurrency
$this->concurrency = intval(getenv('SPC_CONCURRENCY'));
$this->concurrency = (int) getenv('SPC_CONCURRENCY');
// cflags
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');
@ -94,7 +94,7 @@ class LinuxBuilder extends UnixBuilderBase
}
$disable_jit = $this->getOption('disable-opcache-jit', false) ? '--disable-opcache-jit ' : '';
if (!$disable_jit && $this->getExt('opcache')) {
f_putenv('COMPILER_EXTRA=-fno-sanitize=undefined');
f_putenv('SPC_COMPILER_EXTRA=-fno-sanitize=undefined');
}
$config_file_path = $this->getOption('with-config-file-path', false) ?
('--with-config-file-path=' . $this->getOption('with-config-file-path') . ' ') : '';

View File

@ -34,7 +34,7 @@ class MacOSBuilder extends UnixBuilderBase
// ---------- set necessary compile vars ----------
// concurrency
$this->concurrency = intval(getenv('SPC_CONCURRENCY'));
$this->concurrency = (int) getenv('SPC_CONCURRENCY');
// cflags
$this->arch_c_flags = getenv('SPC_DEFAULT_C_FLAGS');
$this->arch_cxx_flags = getenv('SPC_DEFAULT_CXX_FLAGS');

View File

@ -12,16 +12,16 @@ trait libaom
{
protected function build(): void
{
$extra = getenv('COMPILER_EXTRA');
$extra = getenv('SPC_COMPILER_EXTRA');
if (ToolchainManager::getToolchainClass() === ZigToolchain::class) {
$new = trim($extra . ' -D_GNU_SOURCE');
f_putenv("COMPILER_EXTRA={$new}");
f_putenv("SPC_COMPILER_EXTRA={$new}");
}
UnixCMakeExecutor::create($this)
->setBuildDir("{$this->source_dir}/builddir")
->addConfigureArgs('-DAOM_TARGET_CPU=generic')
->build();
f_putenv("COMPILER_EXTRA={$extra}");
f_putenv("SPC_COMPILER_EXTRA={$extra}");
$this->patchPkgconfPrefix(['aom.pc']);
}
}

View File

@ -45,7 +45,7 @@ class WindowsBuilder extends BuilderBase
$this->zts = $this->getOption('enable-zts', false);
// set concurrency
$this->concurrency = intval(getenv('SPC_CONCURRENCY'));
$this->concurrency = (int) getenv('SPC_CONCURRENCY');
// make cmake toolchain
$this->cmake_toolchain_file = SystemUtil::makeCmakeToolchainFile();

View File

@ -29,7 +29,7 @@ done
[[ -n "$SPC_TARGET" ]] && TARGET="-target $SPC_TARGET" || TARGET=""
if [[ "$SPC_TARGET" =~ \.[0-9]+\.[0-9]+ ]]; then
output=$(zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
output=$(zig cc $TARGET $SPC_COMPILER_EXTRA "${PARSED_ARGS[@]}" 2>&1)
status=$?
if [[ $status -eq 0 ]]; then
@ -44,4 +44,4 @@ if [[ "$SPC_TARGET" =~ \.[0-9]+\.[0-9]+ ]]; then
fi
fi
exec zig cc $TARGET $COMPILER_EXTRA "${PARSED_ARGS[@]}"
exec zig cc $TARGET $SPC_COMPILER_EXTRA "${PARSED_ARGS[@]}"