ungoogled-software / ungoogled-chromium-archlinux

Arch Linux packaging for ungoogled-chromium
BSD 3-Clause "New" or "Revised" License
338 stars 37 forks source link

Enable PGO when using prebuilt clang #258

Closed xiota closed 5 months ago

xiota commented 7 months ago

This PR enables PGO when the prebuilt clang is used. Switching to the prebuilt clang alone is insufficient because PGO is off by default. This PR also enables using the prebuilt clang without editing the PKGBUILD by presetting the variable. (eg, _system_clang=0 makepkg)

PF4Public commented 7 months ago

You can use system clang if it is at version 18

xiota commented 7 months ago

You can use system clang if it is at version 18

  1. Arch extra/clang is currently 16.0.6.
  2. The PKGBUILD explicitly disabled PGO when _system_clang=1 (forced default)

https://github.com/ungoogled-software/ungoogled-chromium-archlinux/blob/56e294f92b1709597973836e8481390690514907/PKGBUILD#L250

networkException commented 7 months ago

I'm generally hesitant to include flags that aren't in the upstream extra/chromium packaging.

xiota commented 7 months ago

@networkException Feel free to close this if you don't plan to enable PGO independently of extra/chromium. I haven't decided whether it's worth submitting a PR to Arch.

PF4Public commented 7 months ago
  1. Arch extra/clang is currently 16.0.6.

Does Arch provide only one version at a time? Sorry, I didn't know that.

xiota commented 7 months ago

@PF4Public Arch Linux currently provides the following clang packages and versions:

extra/clang 16.0.6-2
extra/clang14 14.0.6-1
extra/clang15 15.0.7-2

clang17 and clang-git are available from AUR. Someone will probably submit clang18 to AUR soon. AUR packages have to be built from source, and alternate versions are often not drop-in replacements for each other. The PKGBUILD would need to be adjusted to switch versions.