From 98e5fc18097993b1a9d72ddf9ed5917e9ef5ad1d Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Thu, 29 Dec 2022 00:38:56 +0100 Subject: [PATCH] d/rules: honour noopt build profile --- debian/rules | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 7c54a18..d9fb134 100755 --- a/debian/rules +++ b/debian/rules @@ -44,6 +44,15 @@ else test := false endif + +ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + build_type := Release + lto := true +else + build_type := None + lto := false +endif + # DEB_VERSION, DEB_VENDOR include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/vendor.mk @@ -66,8 +75,8 @@ override_dh_auto_configure: -DYUZU_USE_BUNDLED_FFMPEG=false \ -DYUZU_TESTS=$(test) \ -DSIRIT_USE_SYSTEM_SPIRV_HEADERS=true \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ + -DCMAKE_BUILD_TYPE=$(build_type) \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=$(lto) \ -DCMAKE_POLICY_DEFAULT_CMP0069=NEW execute_after_dh_auto_clean: