This is an archive of the discontinued LLVM Phabricator instance.

[clang][scan-build] Use uname -s to detect the operating system.
ClosedPublic

Authored by fcambus on Oct 14 2021, 5:41 AM.

Diff Detail

Event Timeline

fcambus requested review of this revision.Oct 14 2021, 5:41 AM
fcambus created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2021, 5:41 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
brad added a comment.Oct 17 2021, 10:27 AM

I'm not a Perl guy but I'm wondering about simplifying what it is doing there to just uname -s eq 'OpenBSD'?

fcambus updated this revision to Diff 380263.Oct 17 2021, 12:42 PM

Avoid using regexps and use the 'eq' operator for doing string comparison.

I'm not a Perl guy but I'm wondering about simplifying what it is doing there to just uname -s eq 'OpenBSD'?

Yes, I think it makes sense. Just sent an updated revision.

brad added a comment.Oct 28 2021, 9:10 PM

Oh, and you would have to use chomp to eliminate the newline character. Never mind. That's kind of ugly. Maybe it is better to go back to the original diff.

fcambus updated this revision to Diff 383293.Oct 29 2021, 4:05 AM

Sure, I reverted to the previous revision.

brad accepted this revision.Oct 30 2021, 12:54 PM
This revision is now accepted and ready to land.Oct 30 2021, 12:54 PM
This revision was landed with ongoing or failed builds.Oct 30 2021, 2:27 PM
This revision was automatically updated to reflect the committed changes.