LSan on darwin doesn't exist on older versions of clang,
causing non-boostrapped sanitized buildbots to fail
Details
Diff Detail
- Build Status
Buildable 11020 Build 11020: arc lint + arc unit
Event Timeline
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | How is config.host_cxx set? I don't think this is always set is it? |
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | Actually I think this is wrong, for several reasons:
|
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | config.host_cxx is set in the same file that sets config.llvm_use_sanitizer (which probably means I should use getattr() instead, now that I look at it), but which also means that it will always be defined in this if block. config.host_cxx is set to HOST_CXX from cmake. I do think that this is correct generally, because we don't actually want the clang we're testing, we want the clang that built the llvm source (since that's what will be compiled with -fsanitize=address, and which will provide the ASan DSO which needs to have LSan in it). The unit tests themselves won't be compiled with ASan afaik, so the version of clang used to build the unit tests isn't what we want here. |
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | I'll verify with check-clang though, to be sure. |
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | Yup, you're right, host_cxx isn't defined. We still don't want the just-built clang though, I'll try to figure out a solution. |
utils/lit/lit/llvm/config.py | ||
---|---|---|
83–84 | Is there a reason we can't just add config.host_cxx = CMAKE_CXX_COMPILER to the clang lit config? Or if not that, config.host_cxx_version = CMAKE_CXX_COMPILER_VERSION |
You can probably just define host_cxx, and then use getattr in the function to check for it.
Heh, we crossed paths. Yea that seems reasonable. Can you emit a warning if any of the following are true though?
- llvm_use_sanitizer is true, but host_cxx doesn't look like a clang compiler.
- 'self.get_clang_has_lsan` is called, but host_cxx is not present.
I'll upload the clang host_cxx patch shortly, but this shouldn't be blocked on that (since it handles the undefined case).
@qcolombet - Can you keep an eye on the internal apple builders and let me know if this doesn't fix them? I'll be out of the town the rest of the week though, so I probably won't be able to do much until Monday.
How is config.host_cxx set? I don't think this is always set is it?