| # Copyright 2019 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/gclient_args.gni") |
| import("//build/config/ios/ios_sdk.gni") |
| |
| if (checkout_ios_webkit) { |
| action("webkit") { |
| script = "build_webkit.py" |
| |
| inputs = [ |
| # Because it's difficult to list every webkit source file as an input |
| # here, use the ChangeLog files as a proxy to determine whether or not |
| # source files have changed. |
| # TODO(crbug.com/934252): This will not pick up local edits to source |
| # files, so find a way to properly rebuild when those change. |
| "src/Tools/ChangeLog", |
| "src/ChangeLog", |
| "src/Source/WebKit/ChangeLog", |
| "src/Source/JavaScriptCore/ChangeLog", |
| "src/Source/WebKitLegacy/ChangeLog", |
| "src/Source/WebKitLegacy/ios/ChangeLog", |
| "src/Source/WebKitLegacy/mac/ChangeLog", |
| "src/Source/bmalloc/ChangeLog", |
| "src/Source/WebCore/ChangeLog", |
| "src/Source/WTF/ChangeLog", |
| "src/Source/ThirdParty/ChangeLog", |
| "src/WebKitLibraries/ChangeLog", |
| ] |
| |
| outputs = [ |
| # The frameworks themselves include many resource files, but as a first |
| # step, use just the binaries. |
| "$target_out_dir/Debug-iphonesimulator/JavaScriptCore.framework/JavaScriptCore", |
| "$target_out_dir/Debug-iphonesimulator/WebCore.framework/WebCore", |
| "$target_out_dir/Debug-iphonesimulator/WebKit.framework/WebKit", |
| "$target_out_dir/Debug-iphonesimulator/WebKitLegacy.framework/WebKitLegacy", |
| ] |
| |
| # TODO(crbug.com/934252): "-j 4" restricts xcodebuild to four simultaneous |
| # jobs. This is intended to prevent overloading the machine, because ninja |
| # will already be spawning a large number of jobs in parallel with |
| # xcodebuild, but it causes the webkit build to run very slowly. Find a way |
| # to increase the parallelism here. |
| args = [ |
| "--output_dir", |
| rebase_path("$target_out_dir"), |
| "-j", |
| "4", |
| "-quiet", |
| ] |
| } |
| } |