Skip to content

CMake: Create a library target for intel_gpu_top code#1173

Merged
deckstose merged 2 commits intoaristocratos:mainfrom
deckstose:cmake-igt-lib
Jun 3, 2025
Merged

CMake: Create a library target for intel_gpu_top code#1173
deckstose merged 2 commits intoaristocratos:mainfrom
deckstose:cmake-igt-lib

Conversation

@deckstose
Copy link
Collaborator

No description provided.

deckstose added 2 commits June 2, 2025 20:04
This will ensure that the configure step fails if LTO is requested but
unsupported by the compiler.
This allows the suppression of warnings specifically for the C code,
which throws lots of warnings with current compilers.
@deckstose deckstose requested a review from aristocratos June 2, 2025 19:10
@deckstose deckstose merged commit 27f11e4 into aristocratos:main Jun 3, 2025
57 of 58 checks passed
@deckstose deckstose deleted the cmake-igt-lib branch June 3, 2025 08:57
Comment on lines +66 to +70
if(BTOP_LTO)
check_ipo_supported()
set_target_properties(btop PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON)
endif()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not a bug? You went from checking if it was supported before enabling to just enabling regardless. We are seeing a build failure NixOS/nixpkgs#422218 and wanted to double check before I pass a flag to explicitly disable BTOP_LTO

Copy link
Collaborator Author

@deckstose deckstose Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not enabled regardless since check_ipo_supported terminates CMake if LTO is unsupported.

Yes, on platforms with no LTO you now must explicitly disable LTO via BTOP_LTO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants