From 682ab87480e7757346802ce7f54cfdbdfeb2339e Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 19 Jun 2012 09:40:17 +0200 Subject: Fix broken QtWebKit5.lib linking https://bugs.webkit.org/show_bug.cgi?id=88321 Patch by Joel Dillon Jocelyn Turcotte on 2012-06-19 Reviewed by NOBODY (OOPS!). Source/JavaScriptCore: Also update the Wx build to use the new define. * API/JSBase.h: * runtime/JSExportMacros.h: * wscript: Source/WebCore: * platform/PlatformExportMacros.h: Source/WTF: Instead of letting a module's headers know which other modules depend on them, have depending modules define explicitely that they want its symbols exported too. JavaScriptCore should then be compiled with both BUILDING_JavaScriptCore and STATICALLY_LINKED_WITH_WTF. * wtf/ExportMacros.h: Tools: On windows the import/export definition is part of the symbol's signature. Define STATICALLY_LINKED_WITH_$$library for each dependend module that is being linked statically to make sure that they can be linked together later on. Also do not compile Assertions.cpp in DumpRenderTree anymore since all the used symbols are exported and it would cause a duplicate symbols error. * DumpRenderTree/qt/DumpRenderTree.pro: * qmake/mkspecs/features/default_post.prf: --- Source/JavaScriptCore/API/JSBase.h | 2 +- Source/JavaScriptCore/ChangeLog | 13 +++++++++++++ Source/JavaScriptCore/runtime/JSExportMacros.h | 4 ++-- Source/JavaScriptCore/wscript | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) (limited to 'Source/JavaScriptCore') diff --git a/Source/JavaScriptCore/API/JSBase.h b/Source/JavaScriptCore/API/JSBase.h index fed54fe23..f46a41755 100644 --- a/Source/JavaScriptCore/API/JSBase.h +++ b/Source/JavaScriptCore/API/JSBase.h @@ -71,7 +71,7 @@ typedef struct OpaqueJSValue* JSObjectRef; #elif defined(__GNUC__) && !defined(__CC_ARM) && !defined(__ARMCC__) #define JS_EXPORT __attribute__((visibility("default"))) #elif defined(WIN32) || defined(_WIN32) || defined(_WIN32_WCE) || defined(__CC_ARM) || defined(__ARMCC__) -#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) +#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore) #define JS_EXPORT __declspec(dllexport) #else #define JS_EXPORT __declspec(dllimport) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 0251bd405..3907efc13 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,16 @@ +2012-06-19 Joel Dillon Jocelyn Turcotte + + [Qt][Win] Fix broken QtWebKit5.lib linking + https://bugs.webkit.org/show_bug.cgi?id=88321 + + Reviewed by NOBODY (OOPS!). + + Also update the Wx build to use the new define. + + * API/JSBase.h: + * runtime/JSExportMacros.h: + * wscript: + 2012-06-13 Patrick Gansterer [WIN] Remove dependency on pthread from MachineStackMarker diff --git a/Source/JavaScriptCore/runtime/JSExportMacros.h b/Source/JavaScriptCore/runtime/JSExportMacros.h index 884805f86..19e2c286f 100644 --- a/Source/JavaScriptCore/runtime/JSExportMacros.h +++ b/Source/JavaScriptCore/runtime/JSExportMacros.h @@ -36,7 +36,7 @@ // See note in wtf/Platform.h for more info on EXPORT_MACROS. #if USE(EXPORT_MACROS) -#if defined(BUILDING_JavaScriptCore) +#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore) #define JS_EXPORT_PRIVATE WTF_EXPORT #else #define JS_EXPORT_PRIVATE WTF_IMPORT @@ -50,7 +50,7 @@ #if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC) -#if defined(BUILDING_JavaScriptCore) +#if defined(BUILDING_JavaScriptCore) || defined(STATICALLY_LINKED_WITH_JavaScriptCore) #define JS_EXPORTDATA __declspec(dllexport) #else #define JS_EXPORTDATA __declspec(dllimport) diff --git a/Source/JavaScriptCore/wscript b/Source/JavaScriptCore/wscript index 4afb4d26a..58696d9c5 100644 --- a/Source/JavaScriptCore/wscript +++ b/Source/JavaScriptCore/wscript @@ -66,7 +66,7 @@ def build(bld): features = 'cc cxx cshlib', includes = '. .. assembler ../WTF ' + ' '.join(includes), source = sources, - defines = ['BUILDING_JavaScriptCore'], + defines = ['BUILDING_JavaScriptCore', 'STATICALLY_LINKED_WITH_WTF'], target = 'jscore', uselib = 'WX ICU ' + get_config(), uselib_local = '', -- cgit v1.2.1