The -Og optimisation option is recommended for 'the standard edit-compile-debug cycle'. Using this instead of -O0 also stops the -FORTIFY_SOURCE warning from spamming the terminal on Linux. This warning occurred because we have FORTIFY_SOURCE=2 in our config but all compiler optimisations were off. The -Og option switches on optimisations that do not interfere with debugging. This will also hopefully make debug Mantid slightly faster as a happy side effect.
For more information on the gcc optimisation options see here
You should be able to compile on Linux without receiving the following warning:
warning: #warning _FORTIFY_SOURCE requires compiling with opimization (-O) [-Wcpp]
Make sure to explicitly run cmake --preset=linux before compiling so the changes are picked up.
This does not require release notes because it only affects developers.
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Do changes function as described? Add comments below that describe the tests performed?
Do the changes handle unexpected situations, e.g. bad input?
Has the relevant (user and developer) documentation been added/updated?
Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.
Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
The
-Og
optimisation option is recommended for 'the standard edit-compile-debug cycle'. Using this instead of-O0
also stops the-FORTIFY_SOURCE
warning from spamming the terminal on Linux. This warning occurred because we haveFORTIFY_SOURCE=2
in our config but all compiler optimisations were off. The-Og
option switches on optimisations that do not interfere with debugging. This will also hopefully make debug Mantid slightly faster as a happy side effect.For more information on the
gcc
optimisation options see hereFor more information on
FORTIFY_SOURCE
see hereTo test:
You should be able to compile on Linux without receiving the following warning:
Make sure to explicitly run
cmake --preset=linux
before compiling so the changes are picked up.This does not require release notes because it only affects developers.
Reviewer
Please comment on the points listed below (full description). Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.