Skip to content

Build flags#30

Merged
anton-seaice merged 2 commits intomainfrom
build_flags
Mar 1, 2026
Merged

Build flags#30
anton-seaice merged 2 commits intomainfrom
build_flags

Conversation

@anton-seaice
Copy link
Collaborator

This sets -grecord-gcc-switches per ACCESS-NRI/ACCESS-OM3#199

and

-check all per ACCESS-NRI/ACCESS-OM3#94

This works around an issue with oneapi, where `-check uninit` generally is not useful because it uses the Memory Sanitizer

For intel classic, `-check all ` includes `-check uninit` but for oneapi, it does not

Also - turn off -`fpe0` for now

Related to ACCESS-NRI/ACCESS-OM3#94
@anton-seaice
Copy link
Collaborator Author

Ill cherry pick into other components if this looks ok

Copy link
Contributor

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

I wonder if we should be making use of RelWithDebInfo for this?

@manodeep
Copy link

What's the usual build type for the repo? And is that build-type common/mostly-common across all the other repos?

@anton-seaice
Copy link
Collaborator Author

The usual build type is Release for this repo and the other model-component repos.

My thinking is - we always want these settings - there's no context where we need a Release build of minimum size and without debugging information. And so distinguishing between Release and RelWithDebInfo doesn't help, we would just end up moving to RelWithDebInfo being the new default

Copy link
Contributor

@dougiesquire dougiesquire left a comment

Choose a reason for hiding this comment

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

I guess I was thinking about what would be standard CMake practice. But everything you've said is true and I don't feel strongly at all.

I'm happy to merge as is if @manodeep is

@manodeep
Copy link

I also don't have strong feelings.

The software transformation team is meeting up next week (in-person in Canberra) to discuss requirements/principles for cmake setup - likely that default build types and always-set flags (esp. this -grecord-gcc-switches) will come up

@anton-seaice anton-seaice merged commit 5164b7d into main Mar 1, 2026
5 checks passed
@anton-seaice anton-seaice deleted the build_flags branch March 1, 2026 23:58
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