Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 7707D781A5B for <~alpine/devel@lists.alpinelinux.org>; Thu, 20 Feb 2020 17:20:54 +0000 (UTC) Date: Thu, 20 Feb 2020 17:20:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogitri.dev; s=protonmail; t=1582219253; bh=hMVF5XFQ/RgwwO2ACRHBUYGWWJ1Vx69zq4sV2xLZJ7M=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=F96rhLkDv3QlaEFcYU/N4uoewoYzjyLoGttkSPYjNfccueCVlO7m5nSBN+iC4HLs9 0p1QfCdsh7ai2ppIWgQ5FNsgFQ82gcyoE6rTAWq9jAcDzOydE1gXkRFPigHRv0teUK WTLfzzs04wDjr/knAFJgrKW1hw9QnW8p4L+Rg9f0= To: ~alpine/devel@lists.alpinelinux.org From: Rasmus Thomsen Reply-To: Rasmus Thomsen Subject: Using buildtypes that respect our C{,PP,XX}FLAGS in CMake and Meson Message-ID: <2896c13070c508a49cbaa72c8fb7f34ea947358b.camel@cogitri.dev> Feedback-ID: LZW2MXNaH7NSG88i8lGpebeqB0wmcl0-3TbzkSuzsmAwEQspn4GI-WRe8j3PhRL4SBmua4rQWq6fadPcLS5uxQ==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch Hello list, due to we've noticed that most aports use the RelWithDebInfo or Release buildtype for CMake or the meson equivalents debugoptimized or release, which overwrite the C{,PP,XX}FLAGS set by abuild. E.g. meson can add -O2 or even -O3 to release builds and many upstreams add additional flags to their release builds they deem increase performance. As such we should switch to the None buildtype for CMake and for Meson to the plain buildtype, so that no additional flags are added to our aports. To make the impact of this clear, here's a comparison between CMAKE_BUILD_TYPE=3DRelWithDebInfo and CMAKE_BUILD_TYPE=3DNone for attica: attica-5.67.0-r0 installed size: 823296 attica-5.67.0-r1 installed size: 823296 attica-5.67.0-r2 installed size: 589824 -r0 is compiled with RelWithDebInfo and the flags the builders use, -r1 is compiled with None and CFLAGS set to -O2 in abuild.conf and -r2 is compile with None and the default flags of abuild (-Os -fomit-frame- pointer). Similiar (although not as drastic, but maybe that's just on libtracker vs attica) differences can be seen with meson (using the same flags as above): libtracker-2.3.2-r0 installed size: 5718016 libtracker-2.3.2-r1 installed size: 5713920 libtracker-2.3.2-r2 installed size: 4911104 As such I'd suggest multiple steps to be taken: 1) Change existing aports over to the None/plain buildtype to make sure this doesn't break anything (we'll probably use some performance but get smaller packages due to our CFLAGS, but that's the goal here, I suppose) 2) Change Alpine policy to only use the None/plain buildtype. Additionally, the buildtype _must be_ mentioned, since at least Meson defaults to 'debug' if no buildtype is specified. 3) Change newapkbuild so that new aports use the correct buildtype ( https://gitlab.alpinelinux.org/alpine/abuild/merge_requests/29) Thanks, Rasmus Thomsen