Changeset 198669 in webkit


Ignore:
Timestamp:
Mar 25, 2016, 9:14:20 AM (9 years ago)
Author:
Brent Fulgham
Message:

[Win] Improve CMake build performance
https://bugs.webkit.org/show_bug.cgi?id=155871
<rdar://problem/24747822>

Reviewed by Alex Christensen.

.:

Add a flag to the PROCESS_ALLINONE_FILE macro so that it does not remove
the files contained in the passed all-in-one file, since this breaks
dependency checking and generation of the derived sources from the IDL.
Instead, include the header files in the project so that all files get
generated.

  • Source/cmake/WebKitMacros: Updated for 'DerivedSources.cpp' use case.

Source/WebCore:

Treat DerivedSources.cpp as an 'All-in-one' file. Pass a flag to the
PROCESS_ALLINONE_FILE macro so that it does not remove the contents of
the file, since this breaks dependency checking and generation of the
sources from the IDL files. Instead, include the header files in the
project so that all files get generated.

  • CMakeLists.txt: Updated for 'DerivedSources.cpp'
  • DerivedSources.cpp: Add some generated files that were missing.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r198666 r198669  
     12016-03-25  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Improve CMake build performance
     4        https://bugs.webkit.org/show_bug.cgi?id=155871
     5        <rdar://problem/24747822>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Add a flag to the PROCESS_ALLINONE_FILE macro so that it does not remove
     10        the files contained in the passed all-in-one file, since this breaks
     11        dependency checking and generation of the derived sources from the IDL.
     12        Instead, include the header files in the project so that all files get
     13        generated.       
     14       
     15        * Source/cmake/WebKitMacros: Updated for 'DerivedSources.cpp' use case.
     16
    1172016-03-25  Konstantin Tokarev  <annulen@yandex.ru>
    218
  • trunk/Source/WebCore/CMakeLists.txt

    r198657 r198669  
    29462946    )
    29472947    foreach (allInOne ${allInOnes})
    2948         PROCESS_ALLINONE_FILE("${WebCore_SOURCES}" ${allInOne} newSources ${AllInOne})
     2948        PROCESS_ALLINONE_FILE("${WebCore_SOURCES}" ${allInOne} newSources FALSE)
    29492949        set(WebCore_SOURCES
    29502950            ${allInOne}
     
    38013801list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/XMLNames.cpp)
    38023802
     3803if (ENABLE_ALLINONE_BUILD)
     3804    message(STATUS "All-in-One DerivedSources build is enabled.")
     3805    PROCESS_ALLINONE_FILE("${WebCore_SOURCES}" DerivedSources.cpp newSources TRUE)
     3806    set(WebCore_SOURCES DerivedSources.cpp ${newSources})
     3807    list(APPEND WebCore_SOURCES DerivedSources.cpp)
     3808endif ()
     3809
    38033810WEBKIT_WRAP_SOURCELIST(${WebCore_IDL_FILES} ${WebCore_SOURCES})
    38043811WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOURCES})
  • trunk/Source/WebCore/ChangeLog

    r198665 r198669  
     12016-03-25  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Improve CMake build performance
     4        https://bugs.webkit.org/show_bug.cgi?id=155871
     5        <rdar://problem/24747822>
     6
     7        Reviewed by Alex Christensen.
     8
     9        Treat DerivedSources.cpp as an 'All-in-one' file. Pass a flag to the
     10        PROCESS_ALLINONE_FILE macro so that it does not remove the contents of
     11        the file, since this breaks dependency checking and generation of the
     12        sources from the IDL files. Instead, include the header files in the
     13        project so that all files get generated.       
     14       
     15        * CMakeLists.txt: Updated for 'DerivedSources.cpp'
     16        * DerivedSources.cpp: Add some generated files that were missing.
     17
    1182016-03-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    219
  • trunk/Source/WebCore/DerivedSources.cpp

    r197142 r198669  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008-2016 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2626// This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build.
    2727
     28// The following files do not work well with the new CMake system. Don't include in this file
     29// #include "HTMLEntityTable.cpp"
     30// #include "JSSVGElementWrapperFactory.cpp"
     31// #include "PlugInsResourcesData.cpp"
     32// #include "UserAgentStyleSheetsData.cpp"
     33
     34#include "ExceptionCodeDescription.h"
    2835#include "HTMLElementFactory.cpp"
    29 #include "HTMLEntityTable.cpp"
    3036#if ENABLE(WEBGL)
    3137#include "JSANGLEInstancedArrays.cpp"
     
    3743#include "JSBeforeLoadEvent.cpp"
    3844#include "JSBeforeUnloadEvent.cpp"
     45#if ENABLE(WEB_AUDIO)
     46#include "JSBiquadFilterNode.cpp"
     47#endif
    3948#include "JSBlob.cpp"
    4049#include "JSCanvasGradient.cpp"
    4150#include "JSCanvasPattern.cpp"
     51#include "JSCanvasProxy.cpp"
    4252#include "JSCanvasRenderingContext.cpp"
    4353#include "JSCanvasRenderingContext2D.cpp"
     
    4555#include "JSByteLengthQueuingStrategy.cpp"
    4656#include "JSCountQueuingStrategy.cpp"
     57#endif
     58#if ENABLE(WEB_AUDIO)
     59#include "JSChannelMergerNode.cpp"
     60#include "JSChannelSplitterNode.cpp"
     61#include "JSConvolverNode.cpp"
     62#endif
     63#include "JSChildNode.cpp"
     64#if ENABLE(SUBTLE_CRYPTO)
     65#include "JSCryptoKey.cpp"
     66#include "JSCryptoKeyPair.cpp"
    4767#endif
    4868#if ENABLE(WEBGL)
     
    116136#include "JSCSSStyleSheet.cpp"
    117137#include "JSCSSSupportsRule.cpp"
     138#include "JSCSSUnknownRule.cpp"
    118139#include "JSCSSValue.cpp"
    119140#include "JSCSSValueList.cpp"
     
    125146#include "JSDataTransferItemList.cpp"
    126147#include "JSDedicatedWorkerGlobalScope.cpp"
     148#if ENABLE(WEB_AUDIO)
     149#include "JSDelayNode.cpp"
     150#endif
     151#if ENABLE(DEVICE_ORIENTATION)
     152#include "JSDeviceMotionEvent.h"
    127153#include "JSDeviceOrientationEvent.cpp"
     154#endif
     155#if ENABLE(PROXIMITY_EVENTS)
     156#include "JSDeviceProximityEvent.cpp"
     157#endif
    128158#include "JSDocument.cpp"
    129159#include "JSDocumentFragment.cpp"
     
    146176#include "JSDOMTokenList.cpp"
    147177#include "JSDOMURL.cpp"
     178#include "JSDOMURLMediaSource.cpp"
     179#include "JSDOMURLMediaStream.cpp"
    148180#include "JSDOMWindow.cpp"
    149181#include "JSDOMWindowCSS.cpp"
     182#include "JSDOMWindowFetch.cpp"
     183#include "JSDOMWindowIndexedDatabase.cpp"
     184#include "JSDOMWindowNotifications.cpp"
     185#include "JSDOMWindowSpeechSynthesis.cpp"
     186#include "JSDOMWindowWebDatabase.cpp"
    150187#include "JSElement.cpp"
    151188#include "JSErrorEvent.cpp"
     
    165202#include "JSFocusEvent.cpp"
    166203#include "JSFontFace.cpp"
     204#include "JSFontFaceSet.cpp"
     205#if ENABLE(WEB_AUDIO)
     206#include "JSGainNode.cpp"
     207#endif
    167208#include "JSGeolocation.cpp"
    168209#include "JSGeoposition.cpp"
     210#include "JSGlobalEventHandlers.cpp"
    169211#include "JSHashChangeEvent.cpp"
    170212#include "JSHistory.cpp"
     
    203245#include "JSHTMLHRElement.cpp"
    204246#include "JSHTMLHtmlElement.cpp"
     247#include "JSHTMLHyperlinkElementUtils.cpp"
    205248#include "JSHTMLIFrameElement.cpp"
    206249#include "JSHTMLImageElement.cpp"
     
    214257#include "JSHTMLMarqueeElement.cpp"
    215258#include "JSHTMLMediaElement.cpp"
     259#include "JSHTMLMediaElementMediaSession.cpp"
     260#include "JSHTMLMediaElementMediaStream.cpp"
    216261#include "JSHTMLMenuElement.cpp"
    217262#include "JSHTMLMetaElement.cpp"
     
    226271#include "JSHTMLParagraphElement.cpp"
    227272#include "JSHTMLParamElement.cpp"
     273#include "JSHTMLPictureElement.cpp"
    228274#include "JSHTMLPreElement.cpp"
    229275#include "JSHTMLProgressElement.cpp"
     
    252298#include "JSHTMLUListElement.cpp"
    253299#include "JSHTMLVideoElement.cpp"
     300#if ENABLE(INDEXED_DATABASE)
    254301#include "JSIDBAny.cpp"
    255302#include "JSIDBCursor.cpp"
     303#include "JSIDBCursorWithValue.cpp"
    256304#include "JSIDBDatabase.cpp"
    257305#include "JSIDBFactory.cpp"
     
    259307#include "JSIDBKeyRange.cpp"
    260308#include "JSIDBObjectStore.cpp"
     309#include "JSIDBOpenDBRequest.cpp"
    261310#include "JSIDBRequest.cpp"
    262311#include "JSIDBTransaction.cpp"
     312#include "JSIDBVersionChangeEvent.cpp"
     313#endif
    263314#include "JSImageData.cpp"
    264315#include "JSInspectorFrontendHost.cpp"
     
    268319#if ENABLE(MEDIA_CONTROLS_SCRIPT)
    269320#include "JSMediaControlsHost.cpp"
     321#endif
     322#if ENABLE(MEDIA_STREAM)
     323#include "JSMediaDeviceInfo.cpp"
     324#include "JSMediaDeviceso.cpp"
     325#endif
     326#if ENABLE(VIDEO) && ENABLE(WEB_AUDIO)
     327#include "JSMediaElementAudioSourceNode.cpp"
    270328#endif
    271329#include "JSMediaError.cpp"
     
    280338#include "JSMediaQueryList.cpp"
    281339#include "JSMediaQueryListListener.cpp"
     340#include "JSMediaRemoteControls.cpp"
     341#include "JSMediaSession.cpp"
     342#include "JSMediaSource.cpp"
     343#include "JSMediaStream.cpp"
     344#include "JSMediaStreamAudioDestinationNode.cpp"
     345#include "JSMediaStreamAudioSourceNode.cpp"
     346#include "JSMediaStreamEvent.cpp"
     347#include "JSMediaStreamTrack.cpp"
     348#include "JSMediaStreamTrackSourcesCallback.cpp"
     349#include "JSMediaTrackConstraint.cpp"
     350#include "JSMediaTrackConstraintSet.cpp"
     351#include "JSMediaTrackConstraints.cpp"
     352#include "JSMediaTrackSupportedConstraints.cpp"
    282353#include "JSMessageChannel.cpp"
    283354#include "JSMessageEvent.cpp"
     
    289360#include "JSNamedNodeMap.cpp"
    290361#include "JSNavigator.cpp"
     362#include "JSNavigatorBattery.cpp"
     363#include "JSNavigatorContentUtils.cpp"
     364#include "JSNavigatorGeolocation.cpp"
     365#include "JSNavigatorMediaDevices.cpp"
     366#include "JSNavigatorUserMedia.cpp"
     367#include "JSNavigatorUserMediaError.cpp"
     368#include "JSNavigatorVibration.cpp"
    291369#include "JSNode.cpp"
    292370#include "JSNodeFilter.cpp"
    293371#include "JSNodeIterator.cpp"
    294372#include "JSNodeList.cpp"
     373#include "JSNonDocumentTypeChildNode.cpp"
     374#include "JSNonElementParentNode.cpp"
     375#include "JSNotification.cpp"
    295376#include "JSNotificationCenter.cpp"
    296 #include "JSNotification.cpp"
     377#include "JSNotificationPermissionCallback.cpp"
    297378#include "JSOverflowEvent.cpp"
     379#include "JSOfflineAudioCompletionEvent.cpp"
     380#include "JSOfflineAudioContext.cpp"
     381#include "JSOscillatorNode.cpp"
    298382#include "JSPageTransitionEvent.cpp"
     383#include "JSPannerNode.cpp"
     384#include "JSParentNode.cpp"
    299385#include "JSPerformance.cpp"
     386#include "JSPerformanceEntry.cpp"
     387#include "JSPerformanceEntryList.cpp"
     388#include "JSPerformanceMark.cpp"
     389#include "JSPerformanceMeasure.cpp"
    300390#include "JSPerformanceNavigation.cpp"
     391#include "JSPerformanceResourceTiming.cpp"
    301392#include "JSPerformanceTiming.cpp"
     393#include "JSPeriodicWave.cpp"
    302394#include "JSPopStateEvent.cpp"
    303395#include "JSPositionCallback.cpp"
     
    317409#include "JSRequestAnimationFrameCallback.cpp"
    318410#include "JSRGBColor.cpp"
     411#include "JSRTCConfiguration.cpp"
     412#include "JSRTCDataChannel.cpp"
     413#include "JSRTCDataChannelEvent.cpp"
     414#include "JSRTCDTMFSender.cpp"
     415#include "JSRTCDTMFToneChangeEvent.cpp"
     416#include "JSRTCIceCandidate.cpp"
     417#include "JSRTCIceCandidateEvent.cpp"
     418#include "JSRTCIceServer.cpp"
     419#include "JSRTCPeerConnection.cpp"
     420#include "JSRTCRtpReceiver.cpp"
     421#include "JSRTCRtpSender.cpp"
     422#include "JSRTCSessionDescription.cpp"
     423#include "JSRTCStatsReport.cpp"
     424#include "JSRTCStatsResponse.cpp"
     425#include "JSRTCTrackEvent.cpp"
    319426#include "JSScreen.cpp"
     427#include "JSScriptProcessorNode.cpp"
    320428#include "JSScriptProfile.cpp"
    321429#include "JSScriptProfileNode.cpp"
     
    323431#include "JSSecurityPolicyViolationEvent.cpp"
    324432#endif
     433#include "JSSourceBuffer.cpp"
     434#include "JSSourceBufferList.cpp"
     435#include "JSSourceInfo.cpp"
     436#include "JSSpeechSynthesis.cpp"
     437#include "JSSpeechSynthesisEvent.cpp"
     438#include "JSSpeechSynthesisUtterance.cpp"
     439#include "JSSpeechSynthesisVoice.cpp"
     440#include "JSSubtleCrypto.cpp"
    325441#include "JSSQLError.cpp"
    326442#include "JSSQLException.cpp"
     
    365481#include "JSSVGEllipseElement.cpp"
    366482#include "JSSVGException.cpp"
     483#include "JSSVGExternalResourcesRequired.cpp"
    367484#include "JSSVGFEBlendElement.cpp"
    368485#include "JSSVGFEColorMatrixElement.cpp"
     
    391508#include "JSSVGFETurbulenceElement.cpp"
    392509#include "JSSVGFilterElement.cpp"
     510#include "JSSVGFilterPrimitiveStandardAttributes.cpp"
     511#include "JSSVGFitToViewBox.cpp"
    393512#include "JSSVGFontElement.cpp"
    394513#include "JSSVGFontFaceElement.cpp"
     
    458577#include "JSSVGSwitchElement.cpp"
    459578#include "JSSVGSymbolElement.cpp"
     579#include "JSSVGTests.cpp"
    460580#include "JSSVGTextContentElement.cpp"
    461581#include "JSSVGTextElement.cpp"
     
    468588#include "JSSVGTSpanElement.cpp"
    469589#include "JSSVGUnitTypes.cpp"
     590#include "JSSVGURIReference.cpp"
    470591#include "JSSVGUseElement.cpp"
    471592#include "JSSVGVKernElement.cpp"
     
    476597#include "JSShadowRoot.cpp"
    477598#include "JSStorage.cpp"
     599#if ENABLE(QUOTA)
    478600#include "JSStorageErrorCallback.cpp"
     601#endif
    479602#include "JSStorageEvent.cpp"
     603#if ENABLE(QUOTA)
    480604#include "JSStorageInfo.cpp"
    481605#include "JSStorageQuota.cpp"
    482606#include "JSStorageQuotaCallback.cpp"
    483607#include "JSStorageUsageCallback.cpp"
     608#endif
    484609#include "JSStringCallback.cpp"
    485610#include "JSStyleMedia.cpp"
     
    514639#include "JSTreeWalker.cpp"
    515640#include "JSUIEvent.cpp"
     641#include "JSUIRequestEvent.cpp"
     642#include "JSURLUtils.cpp"
     643#include "JSUserMessageHandler.cpp"
     644#include "JSUserMessageHandlersNamespace.cpp"
    516645#include "JSValidityState.cpp"
     646#include "JSVideoPlaybackQuality.cpp"
    517647#include "JSVoidCallback.cpp"
     648#include "JSWaveShaperNode.cpp"
    518649#include "JSWebKitAnimationEvent.cpp"
    519650#include "JSWebKitCSSFilterValue.cpp"
     
    521652#include "JSWebKitCSSMatrix.cpp"
    522653#include "JSWebKitCSSRegionRule.cpp"
     654#include "JSWebKitCSSViewportRule.cpp"
    523655#include "JSWebKitNamedFlow.cpp"
     656#include "JSWebKitNamespace.cpp"
     657#include "JSWebKitPlaybackTargetAvailabilityEvent.cpp"
    524658#include "JSWebKitPoint.cpp"
    525659#include "JSWebKitTransitionEvent.cpp"
    526660#include "JSWebSocket.cpp"
    527661#include "JSWheelEvent.cpp"
     662#include "JSWindowBase64.cpp"
     663#include "JSWindowEventHandlers.cpp"
     664#include "JSWindowTimers.cpp"
    528665#include "JSWorker.cpp"
    529666#include "JSWorkerGlobalScope.cpp"
     667#include "JSWorkerGlobalScopeFetch.cpp"
     668#include "JSWorkerGlobalScopeIndexedDatabase.cpp"
     669#include "JSWorkerGlobalScopeNotifications.cpp"
    530670#include "JSWorkerLocation.cpp"
    531671#include "JSWorkerNavigator.cpp"
    532672#include "JSXMLDocument.cpp"
    533673#include "JSXMLHttpRequest.cpp"
    534 #include "JSXMLHttpRequestException.cpp"
     674#include "JSXMLHttpRequestEventTarget.cpp"
    535675#include "JSXMLHttpRequestProgressEvent.cpp"
    536676#include "JSXMLHttpRequestUpload.cpp"
     
    542682#include "JSXPathResult.cpp"
    543683#include "JSXSLTProcessor.cpp"
    544 #include "PlugInsResourcesData.cpp"
    545 #include "UserAgentStyleSheetsData.cpp"
    546684
    547685// On MSVC, including StaticConstructors.h causes all global objects not to be
  • trunk/Source/cmake/WebKitMacros.cmake

    r197886 r198669  
    358358# _all_in_one_file is an all-in-one cpp file includes other cpp files
    359359# _result_file_list is the output file list
    360 macro(PROCESS_ALLINONE_FILE _file_list _all_in_one_file _result_file_list)
     360macro(PROCESS_ALLINONE_FILE _file_list _all_in_one_file _result_file_list _no_compile)
    361361    file(STRINGS ${_all_in_one_file} _all_in_one_file_content)
    362362    set(${_result_file_list} ${_file_list})
     363    set(_allins "")
    363364    foreach (_line ${_all_in_one_file_content})
    364365        string(REGEX MATCH "^#include [\"<](.*)[\">]" _found ${_line})
     
    369370
    370371    foreach (_allin ${_allins})
    371         string(REGEX REPLACE ";[^;]*/${_allin};" ";" _new_result "${${_result_file_list}};")
     372        if (${_no_compile})
     373            # For DerivedSources.cpp, we still need the derived sources to be generated, but we do not want them to be compiled
     374            # individually. We add the header to the result file list so that CMake knows to keep generating the files.
     375            string(REGEX REPLACE "(.*)\\.cpp" "\\1" _allin_no_ext ${_allin})
     376            string(REGEX REPLACE ";([^;]*/)${_allin_no_ext}\\.cpp;" ";\\1${_allin_no_ext}.h;" _new_result "${${_result_file_list}};")
     377        else ()
     378            string(REGEX REPLACE ";[^;]*/${_allin};" ";" _new_result "${${_result_file_list}};")
     379        endif ()
    372380        set(${_result_file_list} ${_new_result})
    373381    endforeach ()
Note: See TracChangeset for help on using the changeset viewer.