This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [test] [asan] Mark the static tests unsupported on mingw
Needs RevisionPublic

Authored by mstorsjo on Apr 15 2023, 3:13 PM.

Details

Summary

It turns out that googletest unit tests don't react to the
config.unsupported flag so far, so we need to change the framework
for that. (Such a change should be split out to a separate commit,
but I'm including it here for now, for complete overview of this
change.)

The symbol referenced in the non-dynamic case for i386,
_except_handler4, isn't available in mingw configurations (where
we only ever link the dynamic CRT); for ASAN_DYNAMIC, the symbol is
redirected to _except_handler4_common which does exist.

When the static asan testsuites are marked as unsupported (but
available), building check-compiler-rt or check-asan ends up
trying to link the unit tests for the static ccase even if they're
not going to be executed; therefore, this practically irrelevant
case still needs to be compileable and linkable.

This is an alternative to D148319, and depends on D148442.

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 15 2023, 3:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2023, 3:13 PM
mstorsjo requested review of this revision.Apr 15 2023, 3:13 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 15 2023, 3:13 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

@alvinhochun What do you think about this, compared to D148319? (This would need to be split up into separate pieces reviewed separately though...)

vitalybuka added inline comments.Apr 19 2023, 4:02 PM
llvm/utils/lit/lit/formats/googletest.py
31

you should move this file into a separate patch
and include a test

vitalybuka requested changes to this revision.May 23 2023, 4:47 PM

I assume this needs a rebase?

This revision now requires changes to proceed.May 23 2023, 4:47 PM

I assume this needs a rebase?

As D148319 was accepted, this one isn't strictly needed. Parts of it might be useful to split out and upstream separately anyway though, so I've left it without closing, but haven't had time to prioritize that bit yet...