Skip to content
Success

Changes

Summary

  1. Sanitizers: future proof by using -Og instead of -o1 (commit: 307f1e1) (details)
Commit 307f1e1c35638dc48ddb1af74a943adee217c40f by edwin.torok
Sanitizers: future proof by using -Og instead of -o1

This is currently equivalent to -O1 on clang, but may improve debuggability in the future compared to -O1.

GCC already disables certain optimizations at -Og, and recommends it when using the sanitizers:
```
To get more accurate stack traces, it is possible to use options such as -O0, -O1, or -Og (which, for instance, prevent  most  function  inlining)
```

(there are also other flag recommendations, but I think they are only relevant if you want to use -O2 or higher,
they wouldn't be active at -O1/-Og)

Also don't use -O0. Even for pure debugging, the manual recommends -Og:
```
It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0
```

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
(commit: 307f1e1)
The file was modifiedtools/ci/inria/sanitizers/script