Page MenuHomePhorge

xhpast: Skip -minline-all-stringops on non-x86 architectures
ClosedPublic

Authored by xtex on Feb 11 2025, 03:58.

Details

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

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

xtex requested review of this revision.Feb 11 2025, 03:58

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

I see the PHP approach is interestingly in line with stuff like line 11. wow lol. Thanks

sgtm

This revision is now accepted and ready to land.Feb 11 2025, 06:18
support/xhpast/bin/xhpast-generate-release-cppflags.php
5–6

Very probably there is no need for these 2 lines in this script. Maybe better to comment to reduce loaded resources.

valerio.bozzolan added inline comments.
support/xhpast/bin/xhpast-generate-release-cppflags.php
12

Ops wait. Please don't sum in PHP. Use the concatenate operator with dot.

Otherwise in recent PHP versions this can throw an error

This revision now requires changes to proceed.Feb 11 2025, 06:21
xtex marked 2 inline comments as done.Feb 11 2025, 06:48
This revision is now accepted and ready to land.Feb 11 2025, 06:49

@xtex: Hi, would you like to arc land your patch? Or do you need any help? Thanks!