diff options
author | Scott B | 2021-11-09 03:28:14 -0800 |
---|---|---|
committer | Scott B | 2021-11-11 00:03:06 -0800 |
commit | b1b2a37de8ab86c34d8125f83747423e8153137a (patch) | |
tree | 0612a4f8c931ab7b07bfbf12915c38c821eaff4e /PKGBUILD | |
parent | 4c206e6a2aedefd00ed6e653e37cb2d2cd54a1c0 (diff) | |
download | aur-b1b2a37de8ab86c34d8125f83747423e8153137a.tar.gz |
pkgbuild: optionally enable -O3 during build
This really isn't worth much performance wise, but people asked for it.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -28,6 +28,12 @@ if [ -z ${no_makeflags_check+x} ]; then makeflags_check=y fi +## '_O3' - Enable -O3 optimization - this isn't generally worth much, especially in the face of +## -march=native (or -march=x86-64-v3) and clang ThinLTO; set _O3 to anything to enable +if [ -n "${_O3+x}" ]; then + _O3=y +fi + ## ## Xanmod options: ## @@ -252,6 +258,12 @@ prepare() { --enable LTO_CLANG_THIN fi + if [ "$_O3" = "y" ]; then + msg2 "Enabling -O3 optimizations ..." + scripts/config --disable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE \ + --enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 + fi + # CONFIG_STACK_VALIDATION gives better stack traces. Also is enabled in all official kernel packages by Archlinux team scripts/config --enable CONFIG_STACK_VALIDATION |