mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-03-12 12:24:50 +01:00
xhpast: Skip -minline-all-stringops on non-x86 architectures
Summary: -minline-all-stringops is a x86 only option, and will not work on other architectures. Thus remove it for other architectures. Test Plan: Build on other architectures. I cherry-picked this to AOSC OS packaging and it has built successfully on amd64, arm64, riscv64, ppc64el, loongson3, loongarch64. Or, manually run this script and see that - only on x86 - it prints the mentioned flag: php support/xhpast/bin/xhpast-generate-release-cppflags.php Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25871
This commit is contained in:
parent
ec68f53ba2
commit
b52ea9932a
2 changed files with 16 additions and 1 deletions
|
@ -8,7 +8,7 @@ ifdef DEBUG
|
||||||
CPPFLAGS += -ggdb -DDEBUG
|
CPPFLAGS += -ggdb -DDEBUG
|
||||||
FLEXFLAGS += --debug
|
FLEXFLAGS += --debug
|
||||||
else
|
else
|
||||||
CPPFLAGS += -O3 -minline-all-stringops
|
CPPFLAGS += -O3 $(shell ./bin/xhpast-generate-release-cppflags.php)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef PROFILE
|
ifdef PROFILE
|
||||||
|
|
15
support/xhpast/bin/xhpast-generate-release-cppflags.php
Executable file
15
support/xhpast/bin/xhpast-generate-release-cppflags.php
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// $arcanist_root = dirname(dirname(dirname(dirname(__FILE__))));
|
||||||
|
// require_once $arcanist_root.'/support/init/init-script.php';
|
||||||
|
|
||||||
|
$cppflags = '';
|
||||||
|
$arch = php_uname('m');
|
||||||
|
|
||||||
|
if ($arch == 'i386' || $arch == 'x86_64') {
|
||||||
|
$cppflags .= ' -minline-all-stringops ';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $cppflags;
|
||||||
|
echo "\n";
|
Loading…
Add table
Reference in a new issue