This allows check-all to be used when only a subset of the sanitizers are built.
Details
- Reviewers
beanz compnerd rnk pcc eugenis - Commits
- rG57a3f4584d1a: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
rG80296ee7f376: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
rCRT306450: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
rCRT306415: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
rL306450: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
rL306415: Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/CMakeLists.txt | ||
---|---|---|
60–73 ↗ | (On Diff #104020) | Why not just walk COMPILER_RT_SANITIZERS_TO_BUILD rather than doing an intersection for each one? |
test/CMakeLists.txt | ||
---|---|---|
60–73 ↗ | (On Diff #104020) | Will address in a follow-up commit for the build case as well as the test case. |
I don't understand why we have this COMPILER_RT_SANITIZERS_TO_BUILD feature, but given that we have it, this seems reasonable to me.
test/CMakeLists.txt | ||
---|---|---|
66 ↗ | (On Diff #104207) | I guess if you want this to be controlled by COMPILER_RT_SANITIZERS_TO_BUILD it would need to be calling compiler_rt_test_sanitizer. |
72 ↗ | (On Diff #104207) | Probably want to preserve this comment. |
As far as I'm aware, the feature exists both to save time building and testing sanitizers you don't need, and to get around differing build requirements across the sanitizers (it's possible, especially when cross-compiling, that some sanitizers build in a given configuration and others do not).
test/CMakeLists.txt | ||
---|---|---|
66 ↗ | (On Diff #104207) | The components built as part of the common runtime aren't controlled by COMPILER_RT_SANITIZERS_TO_BUILD (lsan, ubsan, sanitizer_common, interception, etc). |
You can achieve that though by choosing not to build the sanitizer runtimes that you don't want when you run "make" or "ninja" or whatever.
But anyway, this seems fine to me. LGTM.