summaryrefslogtreecommitdiff
path: root/extra/meson/arch-meson
diff options
context:
space:
mode:
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 \
+ "$@"