Page MenuHomePhabricator

[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
840–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.Tue, Jul 19, 12:09 AM