summaryrefslogtreecommitdiff
path: root/extra/meson/arch-meson
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-03-26 12:50:53 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2022-03-26 12:50:53 +0100
commitb72de63a50fcd46ec290b0028f47f1f9f00b7a9b (patch)
tree2d710598e971dd30e9ae032a4fb25f874840bb16 /extra/meson/arch-meson
parentd565dba6363eb9dd30b20facec104fc304dd6805 (diff)
downloadpackages-b72de63a50fcd46ec290b0028f47f1f9f00b7a9b.tar.xz
extra/meson: local arch-meson script and patch for no LTO for i486
Diffstat (limited to 'extra/meson/arch-meson')
-rwxr-xr-xextra/meson/arch-meson21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/meson/arch-meson b/extra/meson/arch-meson
new file mode 100755
index 00000000..577edca4
--- /dev/null
+++ b/extra/meson/arch-meson
@@ -0,0 +1,21 @@
+#!/bin/bash -ex
+# Highly opinionated wrapper for Arch Linux packaging
+
+CARCH=$(. /etc/makepkg.conf; echo $CARCH)
+
+if [ "${CARCH}" = "i486" ]; then
+ LTO="b_lto=false"
+else
+ LTO="b_lto=true"
+fi
+
+exec meson setup \
+ --prefix /usr \
+ --libexecdir lib \
+ --sbindir bin \
+ --buildtype plain \
+ --auto-features enabled \
+ --wrap-mode nodownload \
+ -D "${LTO}" \
+ -D b_pie=true \
+ "$@"