New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 791239 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Clang static analyzer not working on Mac toolchain

Project Member Reported by yuweih@chromium.org, Dec 2 2017

Issue description

I've found this issue when trying to get static analysis report for Chrome Remote Desktop iOS client.

I run this:
  ninja -C out/ios-analyze -j20 ios_remoting_google_app

and got error like this:
FAILED: obj/base/base/crash_logging.o 
../../build/toolchain/clang_static_analyzer_wrapper.py --clang-cxx-path=../../third_party/llvm-build/Release+Asserts/bin/clang++ --analyzer=../../third_party/scan-build/src/libexec/c++-analyzer -MMD -MF obj/base/base/crash_logging.o.d -DSYSTEM_NATIVE_UTF8 -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_XCODE_VERSION=0910 -DCR_CLANG_REVISION=\"318667-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DBASE_IMPLEMENTATION -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -no-canonical-prefixes -arch x86_64 -Wall -Werror -Wextra -Wundeclared-selector -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -O0 -fno-omit-frame-pointer -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk -stdlib=libc++ -mios-simulator-version-min=10.0 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wexit-time-destructors -Wshadow -Wexit-time-destructors -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../base/debug/crash_logging.cc -o obj/base/base/crash_logging.o
usage: clang_static_analyzer_wrapper.py [-h] --mode {clang,cl} ...
clang_static_analyzer_wrapper.py: error: argument --mode is required
ninja: build stopped: subcommand failed.


Looks like //build/toolchain/mac/BUILD.gn has not been updated while //build/toolchain/clang_static_analyzer_wrapper.py has been changed quite a bit. The build script also asserts that GOMA is not supported but looks like the bug has already been resolved.

The fix seems to be trivial so I'll work on it.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/02378e677739f2bedc13fd375ae73973b247c351

commit 02378e677739f2bedc13fd375ae73973b247c351
Author: Yuwei Huang <yuweih@chromium.org>
Date: Tue Dec 05 20:44:37 2017

Fix clang static analyzer on mac toolchain

* Removed the no-goma assertion since the bug has already been resolved.
* Changed the CC and CXX command to reflect the changes in the analyzer
  wrapper script. (crrev.com/2667853004 and crrev.com/2748793004)

Bug:  791239 
Change-Id: I0c7470213eb769e19f4db64fbb0421ee99a9a06e
Reviewed-on: https://chromium-review.googlesource.com/804607
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521818}
[modify] https://crrev.com/02378e677739f2bedc13fd375ae73973b247c351/build/toolchain/mac/BUILD.gn

Status: Fixed (was: Assigned)

Sign in to add a comment