- Revision
- 121762
- Author
- [email protected]
- Date
- 2012-07-03 06:43:13 -0700 (Tue, 03 Jul 2012)
Log Message
[Qt][Win] Fix broken QtWebKit5.lib linking
https://bugs.webkit.org/show_bug.cgi?id=88321
Patch by Jocelyn Turcotte <[email protected]> Joel Dillon <[email protected]> on 2012-07-03
Reviewed by Kenneth Rohde Christiansen.
Source/_javascript_Core:
The goal is to have different ports build systems define STATICALLY_LINKED_WITH_WTF
when building _javascript_Core, if both are packaged in the same DLL, instead
of relying on the code to handle this.
The effects of BUILDING_* and STATICALLY_LINKED_WITH_* are currently the same
except for a check in Source/_javascript_Core/config.h.
Keeping the old way for the WX port as requested by the port's contributors.
For non-Windows ports there is no difference between IMPORT and EXPORT, no
change is needed.
* API/JSBase.h:
JS symbols shouldn't be included by WTF objects anymore. Remove the export when BUILDING_WTF.
* _javascript_Core.vcproj/_javascript_Core/_javascript_CoreCommon.vsprops:
Make sure that _javascript_Core uses import symbols of WTF for the Win port.
* runtime/JSExportMacros.h:
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.
_javascript_Core 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:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/API/JSBase.h (121761 => 121762)
--- trunk/Source/_javascript_Core/API/JSBase.h 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/_javascript_Core/API/JSBase.h 2012-07-03 13:43:13 UTC (rev 121762)
@@ -71,7 +71,7 @@
#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)
Modified: trunk/Source/_javascript_Core/ChangeLog (121761 => 121762)
--- trunk/Source/_javascript_Core/ChangeLog 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/_javascript_Core/ChangeLog 2012-07-03 13:43:13 UTC (rev 121762)
@@ -1,3 +1,26 @@
+2012-07-03 Jocelyn Turcotte <[email protected]> Joel Dillon <[email protected]>
+
+ [Qt][Win] Fix broken QtWebKit5.lib linking
+ https://bugs.webkit.org/show_bug.cgi?id=88321
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ The goal is to have different ports build systems define STATICALLY_LINKED_WITH_WTF
+ when building _javascript_Core, if both are packaged in the same DLL, instead
+ of relying on the code to handle this.
+ The effects of BUILDING_* and STATICALLY_LINKED_WITH_* are currently the same
+ except for a check in Source/_javascript_Core/config.h.
+
+ Keeping the old way for the WX port as requested by the port's contributors.
+ For non-Windows ports there is no difference between IMPORT and EXPORT, no
+ change is needed.
+
+ * API/JSBase.h:
+ JS symbols shouldn't be included by WTF objects anymore. Remove the export when BUILDING_WTF.
+ * _javascript_Core.vcproj/_javascript_Core/_javascript_CoreCommon.vsprops:
+ Make sure that _javascript_Core uses import symbols of WTF for the Win port.
+ * runtime/JSExportMacros.h:
+
2012-07-02 Filip Pizlo <[email protected]>
DFG OSR exit value recoveries should be computed lazily
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_CoreCommon.vsprops (121761 => 121762)
--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_CoreCommon.vsprops 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_CoreCommon.vsprops 2012-07-03 13:43:13 UTC (rev 121762)
@@ -7,7 +7,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\_javascript_Core\DerivedSources\";../../;../../API/;../../parser/;../../bytecompiler/;../../dfg/;../../disassembler;../../jit/;../../llint/;../../runtime/;../../tools/;../../bytecode/;../../interpreter/;../../wtf/;../../profiler;../../assembler/;../../debugger/;../../heap/;"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\_javascript_Core";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\include\private\_javascript_Core";"$(WebKitLibrariesDir)\include\pthreads""
- PreprocessorDefinitions="__STD_C"
+ PreprocessorDefinitions="STATICALLY_LINKED_WITH_WTF;__STD_C"
ForcedIncludeFiles="ICUVersion.h"
/>
<Tool
Modified: trunk/Source/_javascript_Core/runtime/JSExportMacros.h (121761 => 121762)
--- trunk/Source/_javascript_Core/runtime/JSExportMacros.h 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/_javascript_Core/runtime/JSExportMacros.h 2012-07-03 13:43:13 UTC (rev 121762)
@@ -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)
Modified: trunk/Source/WTF/ChangeLog (121761 => 121762)
--- trunk/Source/WTF/ChangeLog 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/WTF/ChangeLog 2012-07-03 13:43:13 UTC (rev 121762)
@@ -1,3 +1,18 @@
+2012-07-03 Jocelyn Turcotte <[email protected]> Joel Dillon <[email protected]>
+
+ [Qt][Win] Fix broken QtWebKit5.lib linking
+ https://bugs.webkit.org/show_bug.cgi?id=88321
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ 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.
+
+ _javascript_Core should then be compiled with both BUILDING_JavaScriptCore and
+ STATICALLY_LINKED_WITH_WTF.
+
+ * wtf/ExportMacros.h:
+
2012-06-29 Tony Chang <[email protected]>
Unreviewed, rolling out r121572.
Modified: trunk/Source/WTF/wtf/ExportMacros.h (121761 => 121762)
--- trunk/Source/WTF/wtf/ExportMacros.h 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/WTF/wtf/ExportMacros.h 2012-07-03 13:43:13 UTC (rev 121762)
@@ -65,14 +65,9 @@
#define WTF_HIDDEN
#endif
-// Currently WTF is embedded statically in JSCore, which exports
-// WTF symbols in the JSCore shared library.
-// Because of this, we need to make sure that we use WTF_EXPORT
-// when building _javascript_Core as well as WTF.
-
// FIXME: When all ports are using the export macros, we should replace
// WTF_EXPORTDATA with WTF_EXPORT_PRIVATE macros.
-#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
+#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF) || (PLATFORM(WX) && defined(BUILDING_JavaScriptCore))
#define WTF_EXPORTDATA WTF_EXPORT
#else
#define WTF_EXPORTDATA WTF_IMPORT
@@ -81,7 +76,7 @@
#else // !USE(EXPORT_MACROS)
#if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !COMPILER(GCC)
-#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
+#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF)
#define WTF_EXPORTDATA __declspec(dllexport)
#else
#define WTF_EXPORTDATA __declspec(dllimport)
@@ -98,7 +93,7 @@
#endif // USE(EXPORT_MACROS)
-#if defined(BUILDING_WTF) || defined(BUILDING_JavaScriptCore)
+#if defined(BUILDING_WTF) || defined(STATICALLY_LINKED_WITH_WTF) || (PLATFORM(WX) && defined(BUILDING_JavaScriptCore))
#define WTF_EXPORT_PRIVATE WTF_EXPORT
#else
#define WTF_EXPORT_PRIVATE WTF_IMPORT
Modified: trunk/Source/WebCore/ChangeLog (121761 => 121762)
--- trunk/Source/WebCore/ChangeLog 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/WebCore/ChangeLog 2012-07-03 13:43:13 UTC (rev 121762)
@@ -1,3 +1,12 @@
+2012-07-03 Jocelyn Turcotte <[email protected]> Joel Dillon <[email protected]>
+
+ [Qt][Win] Fix broken QtWebKit5.lib linking
+ https://bugs.webkit.org/show_bug.cgi?id=88321
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * platform/PlatformExportMacros.h:
+
2012-07-03 Philip Rogers <[email protected]>
Fix text positioning with non-bmp characters.
Modified: trunk/Source/WebCore/platform/PlatformExportMacros.h (121761 => 121762)
--- trunk/Source/WebCore/platform/PlatformExportMacros.h 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Source/WebCore/platform/PlatformExportMacros.h 2012-07-03 13:43:13 UTC (rev 121762)
@@ -35,7 +35,8 @@
// See note in wtf/Platform.h for more info on EXPORT_MACROS.
#if USE(EXPORT_MACROS)
-#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit)
+#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit) || \
+ defined(STATICALLY_LINKED_WITH_WebCore) || defined(STATICALLY_LINKED_WITH_WebKit)
#define WEBKIT_EXPORTDATA WTF_EXPORT
#else
#define WEBKIT_EXPORTDATA WTF_IMPORT
@@ -45,7 +46,8 @@
#if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
-#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit)
+#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit) || \
+ defined(STATICALLY_LINKED_WITH_WebCore) || defined(STATICALLY_LINKED_WITH_WebKit)
#define WEBKIT_EXPORTDATA __declspec(dllexport)
#else
#define WEBKIT_EXPORTDATA __declspec(dllimport)
Modified: trunk/Tools/ChangeLog (121761 => 121762)
--- trunk/Tools/ChangeLog 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Tools/ChangeLog 2012-07-03 13:43:13 UTC (rev 121762)
@@ -1,3 +1,21 @@
+2012-07-03 Jocelyn Turcotte <[email protected]> Joel Dillon <[email protected]>
+
+ [Qt][Win] Fix broken QtWebKit5.lib linking
+ https://bugs.webkit.org/show_bug.cgi?id=88321
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ 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:
+
2012-07-03 Szilard Ledan <[email protected]>
master.cfg cleanup, pass BuildStep instances instead of BuildStep subclasses
Modified: trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro (121761 => 121762)
--- trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Tools/DumpRenderTree/qt/DumpRenderTree.pro 2012-07-03 13:43:13 UTC (rev 121762)
@@ -37,7 +37,6 @@
testplugin.h
SOURCES += \
- $${ROOT_WEBKIT_DIR}/Source/WTF/wtf/Assertions.cpp \
$$PWD/../WorkQueue.cpp \
DumpRenderTreeQt.cpp \
EventSenderQt.cpp \
Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (121761 => 121762)
--- trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-07-03 13:32:29 UTC (rev 121761)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-07-03 13:43:13 UTC (rev 121762)
@@ -212,6 +212,12 @@
LIBS += $$dependent_libs
}
+ # Anything not linking dynamically to QtWebKit should make sure to have its export
+ # macros syncrhonized with the code that it will be linked with statically.
+ !contains(QT, webkit) {
+ DEFINES += STATICALLY_LINKED_WITH_$$library
+ }
+
LIBS = $$existing_libs $$LIBS
}