Re: [webkit-dev] Generating compile_commands.json when building WebKit on MacOS

2020-07-25 Thread shrivatsa

Perhaps you can try to use the WebKitGTK port for Linux ?
You mean that I should try to build WebKitGTK port for Linux on macOS or 
simply move to Linux?

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Generating compile_commands.json when building WebKit on MacOS

2020-07-22 Thread shrivatsa
I was able to get the compilation process starting with some changed 
(patch attached), but now I am facing some errors that I don't know how 
to tackle, e.g.:


[1218/5220] Building CXX object 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o
FAILED: 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o
/usr/local/bin/ccache /usr/local/opt/ccache/libexec/c++  
-DBUILDING_JavaScriptCore -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 
-DJavaScriptCore_EXPORTS -DSTATICALLY_LINKED_WITH_WTF 
-D__STDC_WANT_LIB_EXT1__ -IDerivedSources/ForwardingHeaders -I. 
-I../../Source/JavaScriptCore
 -I../../Source/JavaScriptCore/API 
-I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/b3 
-I../../Source/JavaScriptCore/b3/air 
-I../../Source/JavaScriptCore/bindings 
-I../../Source/JavaScriptCore/builtins 
-I../../Source/JavaScriptCore/bytecode -I../../So
urce/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg 
-I../../Source/JavaScriptCore/disassembler 
-I../../Source/JavaScriptCore/disassembler/ARM64 
-I../../Source/JavaScriptCore/disassembler/udis86 
-I../../Source/JavaScriptCore/domjit -I../../Source/JavaScriptC
ore/ftl -I../../Source/JavaScriptCore/heap 
-I../../Source/JavaScriptCore/debugger 
-I../../Source/JavaScriptCore/inspector 
-I../../Source/JavaScriptCore/inspector/agents 
-I../../Source/JavaScriptCore/inspector/augmentable 
-I../../Source/JavaScriptCore/inspector/remote -I..
/../Source/JavaScriptCore/interpreter -I../../Source/JavaScriptCore/jit 
-I../../Source/JavaScriptCore/llint -I../../Source/JavaScriptCore/parser 
-I../../Source/JavaScriptCore/profiler 
-I../../Source/JavaScriptCore/runtime 
-I../../Source/JavaScriptCore/tools -I../../Source
/JavaScriptCore/wasm -I../../Source/JavaScriptCore/wasm/js 
-I../../Source/JavaScriptCore/yarr -IDerivedSources/JavaScriptCore 
-IDerivedSources/JavaScriptCore/inspector 
-IDerivedSources/JavaScriptCore/runtime 
-IDerivedSources/JavaScriptCore/yarr -IDerivedSources -I../../So
urce/JavaScriptCore/inspector/cocoa 
-I../../Source/JavaScriptCore/inspector/remote/cocoa -isystem 
ICU/Headers -fdiagnostics-color=always -fcolor-diagnostics -Wextra -Wall 
-Wno-noexcept-type -Wno-parentheses-equality -Qunused-arguments 
-Wwrite-strings -Wundef -Wpointer-ari
th -Wmissing-format-attribute -Wformat-security -Wcast-align  
-fno-strict-aliasing -fno-exceptions -fno-rtti -g -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk 
-fPIC   -ffp-contract=off -fno-slp-vectorize -std=c++17
 -MD -MT 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o 
-MF 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d
10ff-2-mm.mm.o.d -o 
Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm.o 
-c 
DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm
In file included from 
DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-d93d10ff-2-mm.mm:1:
In file included from 
../../Source/JavaScriptCore/API/JSWrapperMap.mm:35:
In file included from 
../../Source/JavaScriptCore/API/JSContextInternal.h:30:
In file included from 
DerivedSources/ForwardingHeaders/JavaScriptCore/JSContextPrivate.h:31:
DerivedSources/ForwardingHeaders/JavaScriptCore/JSContext.h:40:1: error: 
duplicate interface definition for class 'JSContext'

@interface JSContext : NSObject
^
../../Source/JavaScriptCore/API/JSContext.h:40:12: note: previous 
definition is here

@interface JSContext : NSObject
   ^

Your assistance would be much appreciated.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Generating compile_commands.json when building WebKit on MacOS

2020-07-20 Thread shrivatsa

Hi webkit-dev,

I'm trying to study the structure of web browsers in general and WebKit 
specifically for academic purposes. I found that using language servers 
that index compile_commands.json (clangd, ccls etc.) is a very good 
solution to navigate source code of extremely large projects, such as 
WebKit.


Unfortunately, I was only able to get compile_commands.json generated 
when I compiled with --jsc-only where the build is executed using cmake 
and not the perl script. Trying to pass --cmake as a build argument to 
build-webkit causes the build to fail pretty early for missing files 
(that I believe aren't open source).


To wrap it up, I wonder if there's a way to compile WebKit as a browser 
(and not just JavaScriptCore) and have compile_commands.json generated?


platform: osx
arch: x86_64
commit: 521d40b

Thanks,
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev