diff --git a/gnome/platform/xdg-desktop-portal-gnome.xml b/gnome/platform/xdg-desktop-portal-gnome.xml
index 48ad026220..fe1ca9a1cd 100644
--- a/gnome/platform/xdg-desktop-portal-gnome.xml
+++ b/gnome/platform/xdg-desktop-portal-gnome.xml
@@ -91,13 +91,16 @@
mkdir build &&
cd build &&
-meson setup .. --prefix=/usr -Dsystemduserunitdir=/tmp &&
+meson setup --prefix=/usr \
+ --buildtype=release \
+ -Dsystemduserunitdir=/tmp \
+ .. &&
ninja
mkdir build &&
cd build &&
-meson setup .. --prefix=/usr &&
+meson setup --prefix=/usr --buildtype=release .. &&
ninja
diff --git a/x/lib/xdg-desktop-portal-gtk.xml b/x/lib/xdg-desktop-portal-gtk.xml
index 2355f0a1b7..a23f588d58 100644
--- a/x/lib/xdg-desktop-portal-gtk.xml
+++ b/x/lib/xdg-desktop-portal-gtk.xml
@@ -92,7 +92,7 @@
mkdir build &&
cd build &&
-meson setup .. --prefix=/usr &&
+meson setup --prefix=/usr --buildtype=release .. &&
ninja
diff --git a/x/lib/xdg-desktop-portal.xml b/x/lib/xdg-desktop-portal.xml
index b245091636..00b44c8f8a 100644
--- a/x/lib/xdg-desktop-portal.xml
+++ b/x/lib/xdg-desktop-portal.xml
@@ -135,7 +135,7 @@
mkdir build &&
cd build &&
-meson setup .. --prefix=/usr &&
+meson setup --prefix=/usr --buildtype=release .. &&
ninja