DynamoRIO / DynamoRIO/dynamorio

Optimization flags are removed for all tests

Open
#6,429 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

`CMakeLists.txt` in `suite/tests` has the line
`string(REGEX REPLACE "-O[0-9]? " " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")`
which strips out any optimization flags for the tests. Optimization is then selectively added later, using the `optimize()` or `add_sve_flags()` functions.

A better approach would be to allow optimization by default, and strip optimization flags from those tests that cannot support them. This was investigated and proved to be non-trivial as the client tests use `_DR_set_compile_flags()` to set the compile flags whereas the core tests use `set_cflags()`. `_DR_set_compile_flags()` is a public function and we didn't want to add a blocklist in there.

This issue covers the work to remove the blanket removal of optimization flags and find a way to strip optimization flags from tests that cannot support them, both for core and client tests.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.