Skip to content

Record compiler switches in the njoy executable - #407

Open
shimwell wants to merge 1 commit into
njoy:developfrom
shimwell:record-compile-flags
Open

Record compiler switches in the njoy executable#407
shimwell wants to merge 1 commit into
njoy:developfrom
shimwell:record-compile-flags

Conversation

@shimwell

Copy link
Copy Markdown

Thanks for making NJOY and considering this PR

Add -frecord-gcc-switches for GNU Fortran so the compiler command line (including the optimisation level) is embedded in the njoy executable.

This allows the build configuration to be inspected after the fact, e.g. with readelf -p .GCC.command.line njoy, making it easy to detect an accidental unoptimised (-O0) build. The option is guarded to GNU Fortran and is a no-op for other compilers.

Add -frecord-gcc-switches for GNU Fortran so the compiler command line
(including the optimisation level) is embedded in the njoy executable. This
allows the build configuration to be inspected after the fact, e.g. with
`readelf -p .GCC.command.line njoy`, making it easy to detect an accidental
unoptimised (-O0) build. The option is guarded to GNU Fortran and is a no-op
for other compilers.
@shimwell
shimwell changed the base branch from main to develop July 23, 2026 10:46
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.

1 participant