Skip to content

Conversation

@JDuchniewicz
Copy link
Contributor

To make results in sel4bench less noisy, we reduce the build optimization level to O1. This solves one of the issues raised in: seL4/sel4bench#65

Copy link
Contributor

@Indanz Indanz left a comment

Choose a reason for hiding this comment

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

Does this override the setting configured with CMAKE_C_FLAGS by the user, or is that applied later so it can still overrule this setting?

If no, that's a problem. If yes, isn't this just being overruled by the default value of CMAKE_C_FLAGS* anyway?

In other words, shouldn't you change the default values of CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE etc. instead of this?

Comment on lines +39 to +42
if(NOT (("${CMAKE_BUILD_TYPE}" STREQUAL "Release") AND ("${CMAKE_BUILD_TYPE}" STREQUAL
"MinSizeRel"))
)
add_compile_options(-O1)
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is the style the syntax checker wants it, then we really should disable it for CMake. It wants to make everything extremely ugly.

Can you please simplify the check to just if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")?

Please separate content changes and style changes in different commits (and I personally would omit the style fixes altogether as a matter of principle).

@Indanz
Copy link
Contributor

Indanz commented Jan 5, 2026

I just realised that you are changing the default compile option to O1 for all applications using cmake-tool/helpers, not just sel4bench. Please don't do that, that will cause a regression for all current other users of seL4_tools.

@lsf37
Copy link
Member

lsf37 commented Jan 7, 2026

I would also not want sel4test to be compiled with -O1, it should be testing realistic user-level settings.

@Indanz Indanz closed this Jan 7, 2026
@JDuchniewicz
Copy link
Contributor Author

Okay, I will restrict it to sel4bench only in such case.

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