[PATCH] D111797: [clang][scan-build] Use uname -s to detect the operating system.
Frederic Cambus via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 14 05:41:43 PDT 2021
fcambus created this revision.
fcambus added a reviewer: brad.
fcambus requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111797
Files:
clang/tools/scan-build/libexec/ccc-analyzer
Index: clang/tools/scan-build/libexec/ccc-analyzer
===================================================================
--- clang/tools/scan-build/libexec/ccc-analyzer
+++ clang/tools/scan-build/libexec/ccc-analyzer
@@ -72,7 +72,7 @@
# If on OSX, use xcrun to determine the SDK root.
my $UseXCRUN = 0;
-if (`uname -a` =~ m/Darwin/) {
+if (`uname -s` =~ m/Darwin/) {
$DefaultCCompiler = 'clang';
$DefaultCXXCompiler = 'clang++';
# Older versions of OSX do not have xcrun to
@@ -80,7 +80,7 @@
if (-x "/usr/bin/xcrun") {
$UseXCRUN = 1;
}
-} elsif (`uname -a` =~ m/OpenBSD/) {
+} elsif (`uname -s` =~ m/OpenBSD/) {
$DefaultCCompiler = 'cc';
$DefaultCXXCompiler = 'c++';
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111797.379678.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211014/c55d69f1/attachment.bin>
More information about the cfe-commits
mailing list