This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [test] [asan] Skip the static asan testsuites on mingw targets
ClosedPublic

Authored by mstorsjo on Apr 14 2023, 3:29 AM.

Details

Summary

Mingw only provides a dynamically linked CRT (contrary to
MSVC/clang-cl), so it is expected that the static asan test
configuration doesn't work.

Skip adding these test suites in mingw configurations.

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 14 2023, 3:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 3:29 AM
Herald added subscribers: Enna1, dberris. · View Herald Transcript
mstorsjo requested review of this revision.Apr 14 2023, 3:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 3:29 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Originally I was thinking of just marking the test as unsupported in compiler-rt\test\asan\lit.cfg.py.

Looking through CMakeLists.txt the change seems quite confusing. Why does the suspicious looking variable COMPILER_RT_ASAN_HAS_STATIC_RUNTIME not work, and why does it guard the dynamic asan tests instead of the static asan tests that we have to do the opposite of what it does for MINGW?

Originally I was thinking of just marking the test as unsupported in compiler-rt\test\asan\lit.cfg.py.

Yes, that was my initial thought also, but then when I started looking around how these test suites were set up, I realized that this actually was kinda straightforward (in one sense). I later did try to do it that way too, but it had a couple complications. I can post the patches for that anyway, for comparisons.

Looking through CMakeLists.txt the change seems quite confusing. Why does the suspicious looking variable COMPILER_RT_ASAN_HAS_STATIC_RUNTIME not work, and why does it guard the dynamic asan tests instead of the static asan tests that we have to do the opposite of what it does for MINGW?

Yeah that variable seems quite surprisingly named compared to the rest, but I kinda don't want to try to untangle that...

vitalybuka accepted this revision.EditedApr 19 2023, 3:54 PM

Originally I was thinking of just marking the test as unsupported in compiler-rt\test\asan\lit.cfg.py.

Yes, that was my initial thought also, but then when I started looking around how these test suites were set up, I realized that this actually was kinda straightforward (in one sense). I later did try to do it that way too, but it had a couple complications. I can post the patches for that anyway, for comparisons.

Looking through CMakeLists.txt the change seems quite confusing. Why does the suspicious looking variable COMPILER_RT_ASAN_HAS_STATIC_RUNTIME not work, and why does it guard the dynamic asan tests instead of the static asan tests that we have to do the opposite of what it does for MINGW?

Yeah that variable seems quite surprisingly named compared to the rest, but I kinda don't want to try to untangle that...

Maybe this will help https://reviews.llvm.org/rG969902b43b0c028d49dba8ee0b443351fa0453cb

This revision is now accepted and ready to land.Apr 19 2023, 3:54 PM
alvinhochun accepted this revision.Apr 22 2023, 6:22 AM

Since @vitalybuka already approved this, I think this is fine for now, probably no need for D148443.

This revision was landed with ongoing or failed builds.Apr 22 2023, 12:54 PM
This revision was automatically updated to reflect the committed changes.