https://bugs.webkit.org/show_bug.cgi?id=88321
Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk> on 2012-07-03
Reviewed by Kenneth Rohde Christiansen.
Source/JavaScriptCore:
The goal is to have different ports build systems define STATICALLY_LINKED_WITH_WTF
when building JavaScriptCore, 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/JavaScriptCore/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.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
Make sure that JavaScriptCore 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.
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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121762
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
#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)
+2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk>
+
+ [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 JavaScriptCore, 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/JavaScriptCore/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.
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
+ Make sure that JavaScriptCore uses import symbols of WTF for the Win port.
+ * runtime/JSExportMacros.h:
+
2012-07-02 Filip Pizlo <fpizlo@apple.com>
DFG OSR exit value recoveries should be computed lazily
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ConfigurationBuildDir)\obj\JavaScriptCore\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\JavaScriptCore";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads""
- PreprocessorDefinitions="__STD_C"
+ PreprocessorDefinitions="STATICALLY_LINKED_WITH_WTF;__STD_C"
ForcedIncludeFiles="ICUVersion.h"
/>
<Tool
// 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
#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)
+2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk>
+
+ [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.
+
+ JavaScriptCore should then be compiled with both BUILDING_JavaScriptCore and
+ STATICALLY_LINKED_WITH_WTF.
+
+ * wtf/ExportMacros.h:
+
2012-06-29 Tony Chang <tony@chromium.org>
Unreviewed, rolling out r121572.
#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 JavaScriptCore 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
#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)
#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
+2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk>
+
+ [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 <pdr@google.com>
Fix text positioning with non-bmp characters.
// 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
#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)
+2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk>
+
+ [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 <szledan@inf.u-szeged.hu>
master.cfg cleanup, pass BuildStep instances instead of BuildStep subclasses
testplugin.h
SOURCES += \
- $${ROOT_WEBKIT_DIR}/Source/WTF/wtf/Assertions.cpp \
$$PWD/../WorkQueue.cpp \
DumpRenderTreeQt.cpp \
EventSenderQt.cpp \
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
}