Calling the ninja script with absolute paths under cygwin would pass
posix-style paths, and would cause errors since ninja would force
calling itself under cmd.exe, which uses Windows-style paths.
[8/9] LINK(DLL) chromiumcontent.dll
FAILED: D:\Python27\python.exe gyp-win-tool link-wrapper environment.x86 link.exe /nologo /IMPLIB:chromiumcontent.dll.lib /DLL /OUT:chromiumcontent.dll /PDB:chromiumcontent.dll.pdb @chromiumcontent.dll.rsp && D:\Python27\python.exe gyp-win-tool manifest-wrapper environment.x86 cmd /c if exist chromiumcontent.dll.manifest del chromiumcontent.dll.manifest && D:\Python27\python.exe gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest obj\chromiumcontent\chromiumcontent.chromiumcontent.dll.intermediate.manifest -out:chromiumcontent.dll.manifest
v8_base.ia32.lib(v8_base.ia32.api.obj) : error LNK2005: "private: __thiscall v8::AssertNoGCScope::AssertNoGCScope(class v8::Isolate *)" (??0AssertNoGCScope@v8@@AAE@PAVIsolate@1@@Z) already defined in webcore_rendering.lib(webcore_rendering.stylevisualdata.obj)
V8 is using the DEBUG macro to control how v8::AssertNoGCScope is compiled. But
not all projects define a DEBUG macro in their Debug configurations. So now we
switch V8 to use NDEBUG instead, which is used everywhere.
FAILED: ninja -t msvc -o obj\webkit\renderer\compositor_bindings\webkit_compositor_bindings.web_external_texture_layer_impl.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\webkit\renderer\compositor_bindings\webkit_compositor_bindings.web_external_texture_layer_impl.obj.rsp /c ..\..\webkit\renderer\compositor_bindings\web_external_texture_layer_impl.cc /Foobj\webkit\renderer\compositor_bindings\webkit_compositor_bindings.web_external_texture_layer_impl.obj /Fdobj\webkit\renderer\compositor_bindings\webkit_compositor_bindings.pdb
vendor\chromium\src\skia\ext\refptr.h(65) : error C2027: use of undefined type 'SkCanvas'
vendor\chromium\src\third_party\skia\include\core\skdrawlooper.h(15) : see declaration of 'SkCanvas'
vendor\chromium\src\skia\ext\refptr.h(64) : while compiling class template member function 'skia::RefPtr<T> &skia::RefPtr<T>::operator =(const skia::RefPtr<T> &)'
with
[
T=SkCanvas
]
vendor\chromium\src\cc\resources\resource_update.h(38) : see reference to class template instantiation 'skia::RefPtr<T>' being compiled
with
[
T=SkCanvas
]
vendor\chromium\src\skia\ext\refptr.h(65) : error C2227: left of '->ref' must point to class/struct/union/generic type
vendor\chromium\src\skia\ext\refptr.h(65) : error C2027: use of undefined type 'SkCanvas'
vendor\chromium\src\third_party\skia\include\core\skdrawlooper.h(15) : see declaration of 'SkCanvas'
vendor\chromium\src\skia\ext\refptr.h(65) : error C2227: left of '->unref' must point to class/struct/union/generic type
This is required so embedding apps can pass types like std::string into
chromiumcontent.dll.
The DLL CRT seems to require exceptions to be enabled. This matches what
Chromium does for component builds.
sandbox.lib isn't usable out of the box because it expects base's
symbols to be decorated with __declspec(dllexport). So we create a copy
of it that expects them to be decorated with __declspec(dllimport),
as they will be when used in a client application.
The warning:
sqlite3.lib(sqlite.sqlite3.obj) : warning LNK4049: locally defined symbol _utf8_countTrailBytes_46 imported
This means that this symbol is decorated with __declspec(dllimport),
which is bad. Defining U_UTF8_IMPL fixes this problem, but causes
another error:
third_party\icu\public\common\unicode\utf8.h(62) : error C2734: 'utf8_countTrailBytes_46' : const object must be initialized if not extern
For some reason ICU doesn't use U_CFUNC when exporting
utf8_countTrailBytes, but does use it when defining it or importing it.
Adding U_CFUNC fixes the above error, because it marks the symbol
`extern`.
The error was:
FAILED: ninja -t msvc -o obj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj.rsp /c ..\..\content\browser\dom_storage\dom_storage_message_filter.cc /Foobj\content\browser\dom_storage\content_browser.dom_storage_message_filter.obj /Fdobj\content\content_browser.pdb
vendor\chromium\src\base\memory\ref_counted.h(239) : error C2027: use of undefined type 'dom_storage::DomStorageNamespace'
vendor\chromium\src\webkit\dom_storage\dom_storage_context.h(36) : see declaration of 'dom_storage::DomStorageNamespace'
vendor\chromium\src\base\memory\ref_counted.h(237) : while compiling class template member function 'scoped_refptr<T>::scoped_refptr(const scoped_refptr<T> &)'
with
[
T=dom_storage::DomStorageNamespace
]
vendor\chromium\src\webkit\dom_storage\dom_storage_host.h(55) : see reference to class template instantiation 'scoped_refptr<T>' being compiled
with
[
T=dom_storage::DomStorageNamespace
]
vendor\chromium\src\base\memory\ref_counted.h(239) : error C2227: left of '->AddRef' must point to class/struct/union/generic type
It looks like the compiler was generating a copy constructor for
DomStorageHost, so now we disallow that.
We were getting the following build error on Windows:
FAILED: ninja -t msvc -o obj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj -e environment.x86 -- cl.exe /nologo /showIncludes /FC @obj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj.rsp /c ..\..\webkit\media\crypto\ppapi_decryptor.cc /Foobj\webkit\media\crypto\webkit_media.ppapi_decryptor.obj /Fdobj\webkit\support\webkit_media.pdb
vendor\chromium\src\base\memory\ref_counted.h(250) : error C2027: use of undefined type 'webkit::ppapi::PPB_Buffer_Impl'
vendor\chromium\src\webkit\plugins\ppapi\content_decryptor_delegate.h(30) : see declaration of 'webkit::ppapi::PPB_Buffer_Impl'
vendor\chromium\src\base\memory\ref_counted.h(248) : while compiling class template member function 'scoped_refptr<T>::~scoped_refptr(void)'
with
[
T=webkit::ppapi::PPB_Buffer_Impl
]
vendor\chromium\src\webkit\plugins\ppapi\content_decryptor_delegate.h(163) : see reference to class template instantiation 'scoped_refptr<T>' being compiled
with
[
T=webkit::ppapi::PPB_Buffer_Impl
]
vendor\chromium\src\base\memory\ref_counted.h(250) : error C2227: left of '->Release' must point to class/struct/union/generic type
I believe something about our __declspec(dllexport) declarations is
causing this to happen. We work around this by defining an out-of-line
destructor for ContentDecryptorDelegate so ppapi_decryptor.cc doesn't
have to compile its destructor.
We use a wrapper around gyp-win-tool that does two things:
1. After a static library is linked, uses dumpbin.exe /directives to get
the set of exported symbols from the static library, and saves it to
a .lib.exports file.
2. Before linking chromiumcontent.dll, reads in all the .lib.export
files for the .libs we're linking against and uses them to create a
.def file that tells the linker to reexport all those symbols from
chromiumcontent.dll.
The end result is that chromiumcontent.dll exports all public symbols
from all its static library dependencies.