[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
Fri Oct 29 04:05:31 PDT 2021
fcambus updated this revision to Diff 383293.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111797/new/
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.383293.patch
Type: text/x-patch
Size: 705 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211029/e484702f/attachment.bin>
More information about the cfe-commits
mailing list