build: broken CMake *flags output #31482

issue fanquake openend this issue on December 12, 2024
  1. fanquake commented at 10:59 am on December 12, 2024: member

    Seen in CI runs, i.e https://cirrus-ci.com/task/5616358949388288?logs=configure#L309:

    0C++ compiler flags .................... -O2 -g -std=c++20 -fPIC -fdebug-prefix-map=/tmp/cirrus-ci-build/bitcoin-core/src=. -fmacro-prefix-map=/tmp/cirrus-ci-build/bitcoin-core/src=. -Werror $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler -pthread> $<$<AND:$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>>,$<NOT:$<COMPILE_LANGUAGE:Swift>>>:-pthread> -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety
    

    -Werror $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler -pthread> $<$<AND:$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>>,$<NOT:$<COMPILE_LANGUAGE:Swift>>>:-pthread> -Wall

    Haven’t checked if there is a (silent) effect on the build, but in any case, this output is broken.

  2. fanquake added the label Build system on Dec 12, 2024
  3. fanquake added this to the milestone 29.0 on Dec 12, 2024
  4. ArisAthena commented at 8:04 am on December 20, 2024: none

    Sir, It looks like there’s a problem with the compiler flags, particularly the redundancy in the -Werror and -pthread options.

    Why not see to it that the flags are correctly formatted and compatible with the compiler version being used. Specifically, checking the $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:SHELL:-Xcompiler -pthread> and $<$<AND:$<NOT:$<COMPILE_LANG_AND_ID:CUDA,NVIDIA»,$<NOT:$<COMPILE_LANGUAGE:Swift»>:-pthread> parts for redundancy?


fanquake ArisAthena

Labels
Build system

Milestone
29.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-30 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me