This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Don't add -lresolv on FreeBSD
AbandonedPublic

Authored by andrew on Jun 9 2022, 4:00 AM.

Details

Summary

There is no libresolv on FreeBSD. This fixes the sanitizers on
FreeBSD after https://reviews.llvm.org/D127145

Diff Detail

Event Timeline

andrew created this revision.Jun 9 2022, 4:00 AM
andrew requested review of this revision.Jun 9 2022, 4:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2022, 4:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
kda accepted this revision.Jun 9 2022, 9:15 AM
kda added inline comments.
clang/lib/Driver/ToolChains/CommonArgs.cpp
841

Perhaps expand comment?

This revision is now accepted and ready to land.Jun 9 2022, 9:15 AM
MaskRay accepted this revision.Jun 11 2022, 9:45 AM

Perhaps change to isOSLinux() && isGNUEnvironment() now. I suspect other *BSD don't need this, either. musl definitely doesn't need this.

brad added a subscriber: brad.Jun 11 2022, 9:33 PM

I was just looking at the same diff for OpenBSD.

andrew updated this revision to Diff 436338.Jun 13 2022, 4:10 AM

Update the comment

I'll leave it to someone else to get non-FreeBSD working as it's unlikely I'll have time to fix them in the hear future.

I pushed 0ba43f4c2b263268f6fbc56bb3f6d43936781957 with an elaborated comment. This patch is not needed now.

andrew abandoned this revision.Jul 19 2022, 12:09 AM