On Sun, 2022-11-06 at 19:22 +0000, Torsten Keßler wrote:
> > I noticed was the missing -DCMAKE_BUILD_TYPE=None argument from CMake
> > packages
> That's (partly) done intentionally. Most of the ROCm packages enable a 
> "Release" build by default, see [1,2] for instance. As I've been trying 
> to stay a close as possible to upstream (and the official Debian 
> packages) I haven't touched CMAKE_BUILD_TYPE. I'm of course willing to 
> change this.

Staying as close to the upstream as possible is the correct when talking about
code, i.e. we try to avoid patching the production code as much as possible, but
not the right call for compiler flags. Granted, there may be some cases where
for specific reasons we might want to do that, but the general rule is that we
should use arch's compiler flags.

Lots of people have misconceptions about -O3 vs -O2, and set the release build
to -O3. However, arch has decided that our builds -O2 should be used, so we
should (generally) set DCMAKE_BUILD_TYPE=None.

See [1], specifically 2.1.2, which highlights this issue.

[1] 
https://wiki.archlinux.org/title/CMake_package_guidelines#CMake_can_automatically_override_the_default_compiler_optimization_flag

Cheers,
Filipe Laíns

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to