wiki:CMakeDiscussion2015

Version 1 (modified by Joseph Pecoraro, 6 years ago) (diff)

Initial Draft

CMake:

General Discussion

  • Intro
    • Windows has officially moved over to CMake
    • 1 Port to go (Mac), may never officially but can for engineers
  • How many have built things on the mac with CMake
    • 2 hands (1 just JSC, 1 JSC+WebCore)
    • Issue with WebKit is that it isn't testable yet
  • JSC - FTL is disabled in CMake builds
    • other ports (GTK) have experience, feel likes it is close to turn on again
    • for Mac, there is already CMake code for linux to find LLVM builds, would need to customize for Mac
  • Make Usable on Mac - Executables need to be generated correctly
    • NetworkProcess, WebProcess binaries / executables
    • Once they are put in the right place, they should be usable for engineers
    • Allow engineers to do things like run layout tests with CMake builds
  • Build Speed Comparison
    • build-webkit --cmake to build-webkit not a fair comparison
      • no precompiled headers
      • different set of projects are built (minibrowser)
    • If you generate an Xcode project and build that it is compariable
      • 25-30% faster
      • potential for cross-compiling / distributed builds

  • Distributed Builds
    • Igalia used icc, ships the toolchain across the network
    • How much of a speedup do we see?
      • Hard to say. Depends on your laptop.
    • How long is a clean build?
      • It spreads, so it depends on users.
    • Does it sync SDKs?
      • On linux ports, it ships the toolchain.
    • rniwa: Tried distcc at Google
      • Slower than if you had a Mac with 24 cores
    • on Mac, linking is a very long task
    • Igalia saw some benefits changing linkers
      • different linker strategy allowed them to use debug builds
      • thin archives does less work upfront
  • Pros
    • faster incrementable builds
    • easier to move files around
    • easier to understand inputs/outputs
    • no DerivedSources.make duplicate info
      • can catch Makefile issues early in build time due to checking dependencies early
  • Cons
    • possible incompatibilities with future unreleased builds of Xcode
      • very unlikely there will be an Xcode project incompatibility change
      • may be an invalid concern
    • limited to what CMake can do correctly

Feature Flag Discussion

  • Toggling feature flags happen in many places
    • FeatureDefines.h
    • webkitpl build flags
    • Xcode Configuration files
    • Source/CMake/WebKitFeatures.cmake (and platform impls)
  • Cleanup
    • if everyone uses CMake yes, hopefully we can reduce this to just the CMake ones

Questions

  • What is the relationship between CMake and distributed builds?
    • cannot do distributed builds with Xcode.
  • When for Mac?
    • when executables get in the right place, should be suitable for engineering builds
    • AppKit links WebKit, so we need to generate a WebKit.framework
  • Is there good documentation for CMake commands?
    • documentation has improved
    • cmake --help --full
    • depends on the versions
  • If we got it to the point engineers could use it for tests, would people use it?
    • Number of yesses.