Guest User

Untitled

a guest
Aug 22nd, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.64 KB | None | 0 0
  1. commit 04a4ca6dfae9fba7f49b3d8ce548f7afd1303d67
  2. Author: Simon Hausmann <simon.hausmann@nokia.com>
  3. Date: Mon Nov 21 16:03:43 2011 +0100
  4.  
  5. [Qt] Speed up debug builds.
  6.  
  7. Reviewed by NOBODY (OOPS!).
  8.  
  9. Source/JavaScriptCore:
  10.  
  11. * Target.pri: Make BUILDING_JavaScriptCore available earlier, so it can be
  12. used by the build system.
  13.  
  14. Source/WebCore:
  15.  
  16. * Target.pri: Make BUILDING_WebCore available earlier, so it can be
  17. used by the build system.
  18.  
  19. Source/WebKit2:
  20.  
  21. * Target.pri: Make BUILDING_WebKit2 available, so it can be
  22. used by the build system.
  23.  
  24. Tools:
  25.  
  26. Introduce a special type of build that replaces the static jsc/wc/wk2
  27. static libraries with shared libraries, that individually are much faster
  28. to link and don't require relinking into the big library when changing just
  29. one file in one module. It can be enabled with
  30. --qmakearg="CONFIG+=force_static_libs_as_shared"
  31.  
  32. * qmake/mkspecs/features/force_static_libs_as_shared.prf: Added. With this configuration,
  33. disable symbol visibility, static linkage and enable rpath.
  34. * qmake/mkspecs/features/functions.prf: Add a helper function to determine if
  35. we need to link the convenience libraries together or not and renamed linkStaticLibrary
  36. to just linkLibrary (because linkage is not necessarily static).
  37. * qmake/mkspecs/features/qtwebkit.prf: When using the trick, make sure to also
  38. link against jsc/wc/wk2 when linking app code against QtWebKit.
  39. * qmake/mkspecs/features/javascriptcore.prf: Use new +needToLinkLibrary helper
  40. function.
  41. * qmake/mkspecs/features/webcore.prf: Ditto.
  42. * qmake/mkspecs/features/webkit2.prf: Ditto.
  43.  
  44. diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
  45. index f6ddea7..e5ff254 100644
  46. --- a/Source/JavaScriptCore/ChangeLog
  47. +++ b/Source/JavaScriptCore/ChangeLog
  48. @@ -1,3 +1,12 @@
  49. +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
  50. +
  51. + [Qt] Speed up debug builds.
  52. +
  53. + Reviewed by NOBODY (OOPS!).
  54. +
  55. + * Target.pri: Make BUILDING_JavaScriptCore available earlier, so it can be
  56. + used by the build system.
  57. +
  58. 2011-11-20 Filip Pizlo <fpizlo@apple.com>
  59.  
  60. Unreviewed interpreter build fix.
  61. diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri
  62. index 5534946..38d382d 100644
  63. --- a/Source/JavaScriptCore/Target.pri
  64. +++ b/Source/JavaScriptCore/Target.pri
  65. @@ -6,10 +6,10 @@
  66.  
  67. TEMPLATE = lib
  68.  
  69. -load(javascriptcore)
  70. -
  71. DEFINES += BUILDING_JavaScriptCore BUILDING_WTF
  72.  
  73. +load(javascriptcore)
  74. +
  75. CONFIG += javas
  76. CONFIG += staticlib
  77.  
  78. diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
  79. index d54a17c..4fb74d4 100644
  80. --- a/Source/WebCore/ChangeLog
  81. +++ b/Source/WebCore/ChangeLog
  82. @@ -1,3 +1,12 @@
  83. +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
  84. +
  85. + [Qt] Speed up debug builds.
  86. +
  87. + Reviewed by NOBODY (OOPS!).
  88. +
  89. + * Target.pri: Make BUILDING_WebCore available earlier, so it can be
  90. + used by the build system.
  91. +
  92. 2011-11-20 Kenichi Ishibashi <bashi@chromium.org>
  93.  
  94. [Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
  95. diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
  96. index 407161b..fcac657 100644
  97. --- a/Source/WebCore/Target.pri
  98. +++ b/Source/WebCore/Target.pri
  99. @@ -6,11 +6,11 @@
  100.  
  101. TEMPLATE = lib
  102.  
  103. +DEFINES += BUILDING_WebCore BUILDING_WTF
  104. +
  105. load(webcore)
  106. load(javascriptcore)
  107.  
  108. -DEFINES += BUILDING_WebCore BUILDING_WTF
  109. -
  110. CONFIG += staticlib
  111.  
  112. TARGET = $$WEBCORE_TARGET
  113. diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
  114. index c6153c6..32cdd3d 100644
  115. --- a/Source/WebKit2/ChangeLog
  116. +++ b/Source/WebKit2/ChangeLog
  117. @@ -1,3 +1,12 @@
  118. +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
  119. +
  120. + [Qt] Speed up debug builds.
  121. +
  122. + Reviewed by NOBODY (OOPS!).
  123. +
  124. + * Target.pri: Make BUILDING_WebKit2 available, so it can be
  125. + used by the build system.
  126. +
  127. 2011-10-17 Antonio Gomes <agomes@rim.com>
  128.  
  129. Pass a Frame* parameter in EditorClient::respondToChangedSelection
  130. diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
  131. index 7b26da8..00b8d0b 100644
  132. --- a/Source/WebKit2/Target.pri
  133. +++ b/Source/WebKit2/Target.pri
  134. @@ -6,6 +6,8 @@
  135.  
  136. TEMPLATE = lib
  137.  
  138. +DEFINES += BUILDING_WebKit2
  139. +
  140. load(javascriptcore)
  141. load(webcore)
  142. load(webkit2)
  143. diff --git a/Tools/ChangeLog b/Tools/ChangeLog
  144. index a7f97d7..43d0a07 100644
  145. --- a/Tools/ChangeLog
  146. +++ b/Tools/ChangeLog
  147. @@ -1,3 +1,27 @@
  148. +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
  149. +
  150. + [Qt] Speed up debug builds.
  151. +
  152. + Reviewed by NOBODY (OOPS!).
  153. +
  154. + Introduce a special type of build that replaces the static jsc/wc/wk2
  155. + static libraries with shared libraries, that individually are much faster
  156. + to link and don't require relinking into the big library when changing just
  157. + one file in one module. It can be enabled with
  158. + --qmakearg="CONFIG+=force_static_libs_as_shared"
  159. +
  160. + * qmake/mkspecs/features/force_static_libs_as_shared.prf: Added. With this configuration,
  161. + disable symbol visibility, static linkage and enable rpath.
  162. + * qmake/mkspecs/features/functions.prf: Add a helper function to determine if
  163. + we need to link the convenience libraries together or not and renamed linkStaticLibrary
  164. + to just linkLibrary (because linkage is not necessarily static).
  165. + * qmake/mkspecs/features/qtwebkit.prf: When using the trick, make sure to also
  166. + link against jsc/wc/wk2 when linking app code against QtWebKit.
  167. + * qmake/mkspecs/features/javascriptcore.prf: Use new +needToLinkLibrary helper
  168. + function.
  169. + * qmake/mkspecs/features/webcore.prf: Ditto.
  170. + * qmake/mkspecs/features/webkit2.prf: Ditto.
  171. +
  172. 2011-11-20 Shinya Kawanaka <shinyak@google.com>
  173.  
  174. [Chromium] Layout test does not return correct misspelling positions if there are multiple misspelled words.
  175. diff --git a/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf
  176. new file mode 100644
  177. index 0000000..70df9aa
  178. --- /dev/null
  179. +++ b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf
  180. @@ -0,0 +1,16 @@
  181. +# -------------------------------------------------------------------
  182. +# Feature to allow speeding up link times for debug builds by avoiding
  183. +# re-linking the static libraries into the one big shared library.
  184. +#
  185. +# See 'Tools/qmake/README' for an overview of the build system
  186. +# -------------------------------------------------------------------
  187. +
  188. +contains(TEMPLATE, lib) {
  189. + contains(CONFIG, staticlib) {
  190. + CONFIG -= hide_symbols
  191. + CONFIG -= staticlib
  192. + CONFIG += rpath
  193. + DESTDIR = $${ROOT_BUILD_DIR}/lib
  194. + }
  195. +}
  196. +
  197. diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
  198. index c3cb36f..609b8df 100644
  199. --- a/Tools/qmake/mkspecs/features/functions.prf
  200. +++ b/Tools/qmake/mkspecs/features/functions.prf
  201. @@ -225,34 +225,54 @@ defineTest(prependEach) {
  202. return(true)
  203. }
  204.  
  205. -defineTest(linkStaticLibrary) {
  206. +defineTest(needToLinkLibrary) {
  207. + unset(name)
  208. +
  209. + name = $$1
  210. +
  211. + config_step {
  212. + return(true)
  213. + } else:force_static_libs_as_shared {
  214. + contains(DEFINES, BUILDING_$$name): return(false)
  215. + return(true)
  216. + }
  217. + return(false)
  218. +}
  219. +
  220. +defineTest(linkLibrary) {
  221. unset(path)
  222. unset(target)
  223.  
  224. path = $$1
  225. target = $$2
  226.  
  227. - mac {
  228. - LIBS = -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a $$LIBS
  229. - } else:win32-msvc*|wince*|win32-icc {
  230. - LIBS = /OPT:REF -l$$target $$LIBS
  231. + force_static_libs_as_shared {
  232. + LIBS = -L$${ROOT_BUILD_DIR}/lib -l$$target $$LIBS
  233. } else {
  234. - LIBS = -Wl,-whole-archive -l$$target -Wl,-no-whole-archive $$LIBS
  235. - }
  236.  
  237. - win32-msvc*|wince*|win32-icc {
  238. - LIBS = -L$$path $$LIBS
  239. - POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
  240. - } else {
  241. - QMAKE_LIBDIR = $$path $$QMAKE_LIBDIR
  242. - POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}lib$${target}.a
  243. - }
  244. + mac {
  245. + LIBS = -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a $$LIBS
  246. + } else:win32-msvc*|wince*|win32-icc {
  247. + LIBS = /OPT:REF -l$$target $$LIBS
  248. + } else {
  249. + LIBS = -Wl,-whole-archive -l$$target -Wl,-no-whole-archive $$LIBS
  250. + }
  251.  
  252. - # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
  253. - # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit
  254. - # statically in applications (which isn't used often because, among other things, of licensing obstacles).
  255. - CONFIG -= explicitlib
  256. - CONFIG -= staticlib
  257. + win32-msvc*|wince*|win32-icc {
  258. + LIBS = -L$$path $$LIBS
  259. + POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
  260. + } else {
  261. + QMAKE_LIBDIR = $$path $$QMAKE_LIBDIR
  262. + POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}lib$${target}.a
  263. + }
  264. +
  265. + # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
  266. + # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit
  267. + # statically in applications (which isn't used often because, among other things, of licensing obstacles).
  268. + CONFIG -= explicitlib
  269. + CONFIG -= staticlib
  270. +
  271. + }
  272.  
  273. export(LIBS)
  274. export(QMAKE_LIBDIR)
  275. diff --git a/Tools/qmake/mkspecs/features/javascriptcore.prf b/Tools/qmake/mkspecs/features/javascriptcore.prf
  276. index 8dcd0c7..960148d 100644
  277. --- a/Tools/qmake/mkspecs/features/javascriptcore.prf
  278. +++ b/Tools/qmake/mkspecs/features/javascriptcore.prf
  279. @@ -74,9 +74,9 @@ linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
  280. }
  281. }
  282.  
  283. -config_step {
  284. +needToLinkLibrary(JavaScriptCore) {
  285. pathToJavaScriptCoreOutput = $$buildDirForSource(Source/JavaScriptCore)/$$JAVASCRIPTCORE_DESTDIR
  286. - linkStaticLibrary($$pathToJavaScriptCoreOutput, $$JAVASCRIPTCORE_TARGET)
  287. + linkLibrary($$pathToJavaScriptCoreOutput, $$JAVASCRIPTCORE_TARGET)
  288.  
  289. win32-* {
  290. LIBS += -lwinmm
  291. diff --git a/Tools/qmake/mkspecs/features/qtwebkit.prf b/Tools/qmake/mkspecs/features/qtwebkit.prf
  292. index 90cbd6e..10b8e94 100644
  293. --- a/Tools/qmake/mkspecs/features/qtwebkit.prf
  294. +++ b/Tools/qmake/mkspecs/features/qtwebkit.prf
  295. @@ -25,5 +25,9 @@ config_step {
  296.  
  297. DEPENDPATH += $$ROOT_WEBKIT_DIR/Source/WebKit/qt/Api
  298. INCLUDEPATH += $${ROOT_BUILD_DIR}/include/QtWebKit
  299. +
  300. + force_static_libs_as_shared {
  301. + LIBS += -lwebkit2 -lwebcore -ljscore
  302. + }
  303. }
  304.  
  305. diff --git a/Tools/qmake/mkspecs/features/webcore.prf b/Tools/qmake/mkspecs/features/webcore.prf
  306. index 87adcc9..eaddd00 100644
  307. --- a/Tools/qmake/mkspecs/features/webcore.prf
  308. +++ b/Tools/qmake/mkspecs/features/webcore.prf
  309. @@ -285,7 +285,7 @@ unix|win32-g++* {
  310.  
  311. enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
  312.  
  313. -config_step {
  314. +needToLinkLibrary(WebCore) {
  315. pathToWebCoreOutput = $$buildDirForSource(Source/WebCore)/$$WEBCORE_DESTDIR
  316. - linkStaticLibrary($$pathToWebCoreOutput, $$WEBCORE_TARGET)
  317. + linkLibrary($$pathToWebCoreOutput, $$WEBCORE_TARGET)
  318. }
  319. diff --git a/Tools/qmake/mkspecs/features/webkit2.prf b/Tools/qmake/mkspecs/features/webkit2.prf
  320. index 50a2409..e476104 100644
  321. --- a/Tools/qmake/mkspecs/features/webkit2.prf
  322. +++ b/Tools/qmake/mkspecs/features/webkit2.prf
  323. @@ -64,7 +64,7 @@ WEBKIT2_INCLUDEPATH = \
  324.  
  325. INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$INCLUDEPATH
  326.  
  327. -config_step {
  328. +needToLinkLibrary(WebKit2) {
  329. pathToWebKit2Output = $$buildDirForSource(Source/WebKit2)/$$WEBKIT2_DESTDIR
  330. - linkStaticLibrary($$pathToWebKit2Output, $$WEBKIT2_TARGET)
  331. + linkLibrary($$pathToWebKit2Output, $$WEBKIT2_TARGET)
  332. }
Add Comment
Please, Sign In to add comment