chrome-style vs. webkit code

33 views
Skip to first unread message

Ami Fischman

unread,
May 17, 2011, 7:48:48 PM5/17/11
to cl...@chromium.org
Hi clangers,
In the default chromium setup, what's supposed to prevent clang's style plugin from inspecting webkit code?  I've been having a lot of failures like the below, and I work around them by manually re-running the failed command with -Wno-error appended, but that's obviously icky.  I suspect there's a directory blacklist somewhere that should learn about ninja/ as a replacement for out/{Debug,Release}?

-a

[1/15] CXX ninja/obj/webkit/third_party/WebKit/Source/WebKit/chromium/src/WebDevToolsAgentImpl.o
FAILED: clang++ -MMD -MF ninja/obj/webkit/third_party/WebKit/Source/WebKit/chromium/src/WebDevToolsAgentImpl.o.d -DNO_HEAPCHECKER -DDISABLE_NACL -DCHROMIUM_BUILD -DENABLE_REMOTING=1 -DENABLE_P2P_APIS=1 -DUSE_PROPRIETARY_CODECS -DENABLE_GPU=1 -DENABLE_EGLIMAGE=1 -DWEBKIT_IMPLEMENTATION=1 -DENABLE_3D_PLUGIN=1 -DENABLE_BLOB=1 -DENABLE_BLOB_SLICE=1 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CLIENT_BASED_GEOLOCATION=1 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_DATABASE=1 -DENABLE_DATAGRID=0 -DENABLE_DATA_TRANSFER_ITEMS=1 -DENABLE_DEVICE_ORIENTATION=1 -DENABLE_DIRECTORY_UPLOAD=1 -DENABLE_DOM_STORAGE=1 -DENABLE_EVENTSOURCE=1 -DENABLE_JAVASCRIPT_I18N_API=1 -DENABLE_FILE_SYSTEM=1 -DENABLE_FILTERS=1 -DENABLE_FULLSCREEN_API=1 -DENABLE_GEOLOCATION=1 -DENABLE_GESTURE_RECOGNIZER=1 -DENABLE_ICONDATABASE=0 -DENABLE_INDEXED_DATABASE=1 -DENABLE_INPUT_SPEECH=1 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_JSC_MULTIPLE_THREADS=0 -DENABLE_LEVELDB=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_METER_TAG=1 -DENABLE_MEDIA_STATISTICS=1 -DENABLE_MEDIA_STREAM=1 -DENABLE_NOTIFICATIONS=1 -DENABLE_OFFLINE_WEB_APPLICATIONS=1 -DENABLE_OPENTYPE_SANITIZER=1 -DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PROGRESS_TAG=1 -DENABLE_QUOTA=1 -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_RUBY=1 -DENABLE_SANDBOX=1 -DENABLE_SHARED_WORKERS=1 -DENABLE_SKIA_GPU=0 -DENABLE_SVG=0 -DENABLE_SVG_ANIMATION=0 -DENABLE_SVG_AS_IMAGE=0 -DENABLE_SVG_FONTS=0 -DENABLE_SVG_FOREIGN_OBJECT=0 -DENABLE_SVG_USE=0 -DENABLE_TOUCH_EVENTS=1 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_V8_SCRIPT_DEBUG_SERVER=1 -DENABLE_VIDEO=1 -DENABLE_WEB_SOCKETS=1 -DENABLE_WEB_TIMING=1 -DENABLE_WEBGL=1 -DENABLE_WORKERS=1 -DENABLE_XHR_RESPONSE_BLOB=1 -DENABLE_XPATH=1 -DENABLE_XSLT=1 -DWTF_USE_BUILTIN_UTF8_CODEC=1 -DWTF_USE_WEBP=1 -DWTF_USE_WEBKIT_IMAGE_DECODERS=1 -DWTF_USE_ACCELERATED_COMPOSITING=1 -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=1 -DENABLE_WEB_AUDIO=1 -DWTF_USE_WEBAUDIO_FFMPEG=1 -DBUILDING_CHROMIUM__=1 -DUSE_SYSTEM_MALLOC=1 -DWTF_USE_PTHREADS=1 -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DSK_BUILD_NO_IMAGE_ENCODE '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DGR_AGGRESSIVE_SHADER_OPTS=1 -DHAVE_XINPUT2 -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Ithird_party/icu/public/common -Ithird_party/icu/public/i18n -Ithird_party/WebKit/Source/WebKit/chromium/public -Ithird_party/WebKit/Source/WebKit/chromium/src -Ithird_party/angle/include -Ithird_party/WebKit/Source/WebKit/chromium/public/x11 -Ithird_party/WebKit/Source/WebKit/chromium/public/gtk -Ithird_party/WebKit/Source/WebKit/chromium/public/linux -Igpu -I. -Ithird_party/WebKit/Source/WebCore -Ithird_party/WebKit/Source -Ithird_party/WebKit/Source/WebCore/accessibility -Ithird_party/WebKit/Source/WebCore/accessibility/chromium -Ithird_party/WebKit/Source/WebCore/bindings -Ithird_party/WebKit/Source/WebCore/bindings/generic -Ithird_party/WebKit/Source/WebCore/bindings/v8 -Ithird_party/WebKit/Source/WebCore/bindings/v8/custom -Ithird_party/WebKit/Source/WebCore/bindings/v8/specialization -Ithird_party/WebKit/Source/WebCore/bridge -Ithird_party/WebKit/Source/WebCore/bridge/jni -Ithird_party/WebKit/Source/WebCore/bridge/jni/v8 -Ithird_party/WebKit/Source/WebCore/css -Ithird_party/WebKit/Source/WebCore/dom -Ithird_party/WebKit/Source/WebCore/dom/default -Ithird_party/WebKit/Source/WebCore/editing -Ithird_party/WebKit/Source/WebCore/fileapi -Ithird_party/WebKit/Source/WebCore/history -Ithird_party/WebKit/Source/WebCore/html -Ithird_party/WebKit/Source/WebCore/html/canvas -Ithird_party/WebKit/Source/WebCore/html/parser -Ithird_party/WebKit/Source/WebCore/html/shadow -Ithird_party/WebKit/Source/WebCore/inspector -Ithird_party/WebKit/Source/WebCore/loader -Ithird_party/WebKit/Source/WebCore/loader/appcache -Ithird_party/WebKit/Source/WebCore/loader/archive -Ithird_party/WebKit/Source/WebCore/loader/cache -Ithird_party/WebKit/Source/WebCore/loader/icon -Ithird_party/WebKit/Source/WebCore/mathml -Ithird_party/WebKit/Source/WebCore/notifications -Ithird_party/WebKit/Source/WebCore/page -Ithird_party/WebKit/Source/WebCore/page/animation -Ithird_party/WebKit/Source/WebCore/page/chromium -Ithird_party/WebKit/Source/WebCore/platform -Ithird_party/WebKit/Source/WebCore/platform/animation -Ithird_party/WebKit/Source/WebCore/platform/audio -Ithird_party/WebKit/Source/WebCore/platform/audio/chromium -Ithird_party/WebKit/Source/WebCore/platform/chromium -Ithird_party/WebKit/Source/WebCore/platform/graphics -Ithird_party/WebKit/Source/WebCore/platform/graphics/chromium -Ithird_party/WebKit/Source/WebCore/platform/graphics/filters -Ithird_party/WebKit/Source/WebCore/platform/graphics/filters/arm -Ithird_party/WebKit/Source/WebCore/platform/graphics/gpu -Ithird_party/WebKit/Source/WebCore/platform/graphics/opentype -Ithird_party/WebKit/Source/WebCore/platform/graphics/skia -Ithird_party/WebKit/Source/WebCore/platform/graphics/transforms -Ithird_party/WebKit/Source/WebCore/platform/image-decoders -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/bmp -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/gif -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/ico -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/jpeg -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/png -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/skia -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/xbm -Ithird_party/WebKit/Source/WebCore/platform/image-decoders/webp -Ithird_party/WebKit/Source/WebCore/platform/image-encoders/skia -Ithird_party/WebKit/Source/WebCore/platform/leveldb -Ithird_party/WebKit/Source/WebCore/platform/mock -Ithird_party/WebKit/Source/WebCore/platform/network -Ithird_party/WebKit/Source/WebCore/platform/network/chromium -Ithird_party/WebKit/Source/WebCore/platform/sql -Ithird_party/WebKit/Source/WebCore/platform/text -Ithird_party/WebKit/Source/WebCore/platform/text/transcoder -Ithird_party/WebKit/Source/WebCore/plugins -Ithird_party/WebKit/Source/WebCore/plugins/chromium -Ithird_party/WebKit/Source/WebCore/rendering -Ithird_party/WebKit/Source/WebCore/rendering/style -Ithird_party/WebKit/Source/WebCore/rendering/svg -Ithird_party/WebKit/Source/WebCore/storage -Ithird_party/WebKit/Source/WebCore/storage/chromium -Ithird_party/WebKit/Source/WebCore/svg -Ithird_party/WebKit/Source/WebCore/svg/animation -Ithird_party/WebKit/Source/WebCore/svg/graphics -Ithird_party/WebKit/Source/WebCore/svg/graphics/filters -Ithird_party/WebKit/Source/WebCore/svg/properties -Ithird_party/WebKit/Source/ThirdParty/glu -Ithird_party/WebKit/Source/WebCore/webaudio -Ithird_party/WebKit/Source/WebCore/websockets -Ithird_party/WebKit/Source/WebCore/workers -Ithird_party/WebKit/Source/WebCore/xml -Ininja/gen/webkit -Ininja/gen/webkit/bindings -Ithird_party/WebKit/Source/JavaScriptCore -Ithird_party/WebKit/Source/JavaScriptCore/wtf -Iv8/include -Iskia/config -Ithird_party/skia/include/config -Ithird_party/skia/include/core -Ithird_party/skia/include/effects -Ithird_party/skia/include/pdf -Ithird_party/skia/include/gpu -Ithird_party/skia/include/ports -Ithird_party/skia/gpu/include -Iskia/ext -Ithird_party/npapi -Ithird_party/npapi/bindings -Werror -pthread -fno-exceptions -Wall -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -fvisibility=hidden -pipe -fPIC -fno-strict-aliasing -pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -Wheader-hygiene -Wno-unused-function -Wno-char-subscripts -Wno-unnamed-type-template-args -Xclang -load -Xclang /usr/local/google/fischman/src/chromium/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -O0 -g -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -c third_party/WebKit/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp -o ninja/obj/webkit/third_party/WebKit/Source/WebKit/chromium/src/WebDevToolsAgentImpl.o
In file included from third_party/WebKit/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp:38:
ninja/gen/webkit/InspectorBackendDispatcher.h:36:5: error: [chromium-style] Complex constructor has an inlined body.
    InspectorBackendDispatcher(InspectorFrontendChannel* inspectorFrontendChannel, InspectorApplicationCacheAgent* applicationCacheAgent, InspectorCSSAgent* cssAgent, InspectorConsoleAgent* consoleAgent, InspectorDOMAgent* domAgent, InspectorDOMDebuggerAgent* domDebuggerAgent, InspectorDOMStorageAgent* domStorageAgent, InspectorDatabaseAgent* databaseAgent, InspectorDebuggerAgent* debuggerAgent, InspectorResourceAgent* resourceAgent, InspectorPageAgent* pageAgent, InspectorProfilerAgent* profilerAgent, InspectorRuntimeAgent* runtimeAgent, InspectorTimelineAgent* timelineAgent, InspectorWorkerAgent* workerAgent)
    ^
1 error generated.
build stopped: cannot make progress due to previous errors.

Nico Weber

unread,
May 17, 2011, 10:40:42 PM5/17/11
to Ami Fischman, cl...@chromium.org
Look for |banned_directories_| in tools/clang/plugins/ChromeClassTester.cpp. I'm not sure why this wouldn't work for you though – how are running the plugin?

Nico

Ami Fischman

unread,
May 17, 2011, 10:45:28 PM5/17/11
to Nico Weber, clang
That's the ticket.  banned_directories_ includes "out" but not "ninja", and "ninja" is where ninja emits its output by default.
I'm running the plugin as part of a normal build (ninja chrome), not standalone or anything like that.
Would you accept a patch to add "ninja" to the list, or is there a more generic/dynamic way to exclude directories?

-a

Evan Martin

unread,
May 18, 2011, 1:05:56 PM5/18/11
to Ami Fischman, Nico Weber, clang
I'm ok with making ninja just write into the out/ directory too. I
hadn't done it in the past because it didn't work, but now that it
works it might save everyone some grief.

Nico Weber

unread,
May 18, 2011, 1:08:47 PM5/18/11
to Evan Martin, Ami Fischman, clang
On Wed, May 18, 2011 at 10:05 AM, Evan Martin <ev...@chromium.org> wrote:
I'm ok with making ninja just write into the out/ directory too.  I
hadn't done it in the past because it didn't work, but now that it
works it might save everyone some grief.

I think that might be useful in general, but for this specific issue I just added "ninja" to the list of ignored directories in the plugin yesterday.

If you ever change ninja, let me know so that I can undo this.

Ami Fischman

unread,
May 18, 2011, 1:17:02 PM5/18/11
to Evan Martin, Nico Weber, clang

FWIW, having ninja emit to a different directory has been nice for me since it means I can use the same chrome tree to build natively (using ninja+clang) and cross-compiling inside a cros chroot without ebuilds (using make+gcc).  I acknowledge this is not the use-case things should be optimized for :)

-a


On Wed, May 18, 2011 at 10:05 AM, Evan Martin <ev...@chromium.org> wrote:
Reply all
Reply to author
Forward
0 new messages