Page MenuHomePhabricator

[compiler-rt][tests] Fix plugin support detection when no
Needs ReviewPublic

Authored by hubert.reinterpretcast on Nov 9 2020, 5:16 PM.



The plugin support detection is broken when ld.bfd supports plugins but there is no The script tries to call GOLD_EXECUTABLE-NOTFOUND and does not handle the resulting exception. This patch handles such cases.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2020, 5:16 PM
Herald added subscribers: Restricted Project, dberris. · View Herald Transcript
hubert.reinterpretcast requested review of this revision.Nov 9 2020, 5:16 PM
daltenty added inline comments.Nov 11 2020, 8:35 PM

Hmm, it would be nice if we avoided making the subprocess call in the first place if CMake found no gold executable. This also doesn't look like the only place to make this mistake either, some other places in the lit config (e.g. is_gold_linker_available() ) seem to be treating it as equal false if it is unset, but that's clearly not what will happen from what we see here.

Perhaps we should consider checking the validity of the value passed through from CMake in the and convert the -NOTFOUNDs to Nones?