Skip to content

Commit

Permalink
Update buildtools to latest, account for GN updates and use Clang on …
Browse files Browse the repository at this point in the history
…Android. (flutter#3064)
  • Loading branch information
chinmaygarde authored Sep 28, 2016
1 parent 4014a5b commit d60efb4
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 96 deletions.
12 changes: 6 additions & 6 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ vars = {
'fuchsia_git': 'https://fuchsia.googlesource.com',
'github_git': 'https://github.com',
'mojo_sdk_revision': '6b5fb1227c742f5ecc077486ebc029f2711c61fa',
'base_revision': '672b04e54b937ec899429a6bd5409c5a6300d151',
'base_revision': '75e70c3387cf327702a0533e93bc480446da0806',
'skia_revision': '5561e3ddbbf6c3e051075ada4a11ddc70760f03d',

# Note: When updating the Dart revision, ensure that all entries that are
# dependencies of dart are also updated
'dart_revision': '43231d9ff416e301206239b76ad645ca38f34116',
'dart_boringssl_gen_revision': 'e3a1b341a3890ab10d372dc2fe6d1c6798828293',
'dart_revision': 'b29788329baab1183f6e430bc2cf3c4169b20621',
'dart_boringssl_gen_revision': '922830c0aad900dd3d143eef1ba06faa83fe263b',
'dart_boringssl_revision': '8d343b44bbab829d1a28fdef650ca95f7db4412e',
'dart_observatory_packages_revision': '26aad88f1c1915d39bbcbff3cad589e2402fdcf1',
'dart_root_certificates_revision': 'aed07942ce98507d2be28cbd29e879525410c7fc',

'buildtools_revision': '565d04e8741429fb1b4f26d102f2c6c3b849edeb',
'buildtools_revision': '3d2e47bf14e4e67816a53e304dea422fa18f9180',
}

# Only these hosts are allowed for dependencies in this DEPS file.
Expand All @@ -45,7 +45,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '2f656511ecc11565bd975b0f0ac7aa7383950132',
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a0b7e3ef735fd558146113820c1f52b8415f095e',

# Fuchsia compatibility
#
Expand Down Expand Up @@ -77,7 +77,7 @@ deps = {
# Chromium-style dependencies.

'src/base':
Var('chromium_git') + '/external/github.com/domokit/base' + '@' + Var('base_revision'),
Var('github_git') + '/flutter/base.git' + '@' + Var('base_revision'),

'src/buildtools':
Var('chromium_git') + '/chromium/buildtools.git' + '@' + Var('buildtools_revision'),
Expand Down
5 changes: 5 additions & 0 deletions lib/snapshot/toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# found in the LICENSE file.

import("//mojo/dart/packages/mojo/sdk_ext_sources.gni")
import("//flutter/common/config.gni") # for flutter_aot

if (target_os == "ios") {
import("//build/config/ios/ios_sdk.gni") # For use_ios_simulator
}

dart_host_toolchain = host_toolchain

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/ui_dart_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "lib/tonic/dart_state.h"

namespace blink {
struct DartJniIsolateData;
class FontSelector;
class DartJniIsolateData;
class MojoServices;
class Window;

Expand Down
4 changes: 2 additions & 2 deletions services/activity/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import("//mojo/public/tools/bindings/mojom.gni")

group("activity") {
deps = [
public_deps = [
":interfaces",
]

if (is_android || is_ios) {
deps += [ ":activity_lib" ]
public_deps += [ ":activity_lib" ]
}
}

Expand Down
4 changes: 2 additions & 2 deletions services/editing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import("//mojo/public/tools/bindings/mojom.gni")

group("editing") {
deps = [
public_deps = [
":interfaces",
]

if (is_android || is_ios) {
deps += [ ":editing_lib" ]
public_deps += [ ":editing_lib" ]
}
}

Expand Down
4 changes: 2 additions & 2 deletions services/media/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import("//mojo/public/tools/bindings/mojom.gni")

group("media") {
deps = [
public_deps = [
":interfaces",
]

if (is_android || is_ios) {
deps += [ ":media_lib" ]
public_deps += [ ":media_lib" ]
}
}

Expand Down
4 changes: 2 additions & 2 deletions services/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ if (is_ios) {
}

group("platform") {
deps = [
public_deps = [
":interfaces"
]
if (is_android || is_ios) {
deps += [ ":platform_lib" ]
public_deps += [ ":platform_lib" ]
}
}
2 changes: 1 addition & 1 deletion services/semantics/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import("//mojo/public/tools/bindings/mojom.gni")

group("semantics") {
deps = [
public_deps = [
":interfaces",
]
}
Expand Down
5 changes: 4 additions & 1 deletion services/vsync/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ source_set("vsync_lib_fallback") {
}

group("vsync") {
deps = [ ":vsync_lib", ":vsync_lib_fallback" ]
public_deps = [
":vsync_lib",
":vsync_lib_fallback",
]
}

if (is_android) {
Expand Down
1 change: 1 addition & 0 deletions shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ source_set("common") {
"//mojo/public/cpp/bindings:utility",
"//mojo/public/interfaces/application",
"//mojo/services/vsync/interfaces",
"//third_party/libjpeg",
":generate_embedder_diagnostic_server_resources_cc",
]
}
17 changes: 10 additions & 7 deletions shell/platform/darwin/desktop/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,21 @@ executable("shell_standalone") {
]
}

resource_copy_mac("mac_desktop_resources") {
app_name = "SkyShell"

resources = [
"//third_party/icu/android/icudtl.dat",
]

bundle_directory = "."
}

mac_app("shell_application_bundle") {
app_name = "SkyShell"
info_plist = "Info.plist"
xibs = [ "sky_mac.xib" ]

resource_copy_mac("mac_desktop_resources") {
resources = [
"//third_party/icu/android/icudtl.dat",
]
bundle_directory = "."
}

deps = [
":mac_desktop_platform",
":mac_desktop_resources",
Expand Down
140 changes: 70 additions & 70 deletions shell/platform/darwin/ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ assert(is_ios)
import("//build/config/ios/rules.gni")
import("//build/config/ios/ios_sdk.gni")

_flutter_framework_dir = "$root_out_dir/Flutter.framework"

shared_library("flutter_framework_dylib") {
visibility = [ ":*" ]

Expand Down Expand Up @@ -79,77 +81,75 @@ shared_library("flutter_framework_dylib") {
]
}

group("flutter_framework") {
framework_dir = "$root_out_dir/Flutter.framework"

copy("framework_dylib") {
visibility = [ ":*" ]
sources = [ "$root_out_dir/libFlutter.dylib" ]
outputs = [ "$framework_dir/Flutter" ]

deps = [
":flutter_framework_dylib",
]
}

action("framework_install_name") {
visibility = [ ":*" ]
stamp_file = "$root_out_dir/flutter_install_name_stamp"
script = "//flutter/sky/tools/change_install_name.py"

inputs = [ "$framework_dir/Flutter" ]
outputs = [ stamp_file ]

args = [
"--dylib",
rebase_path("$framework_dir/Flutter"),
"--install_name",
"@rpath/Flutter.framework/Flutter",
"--stamp",
rebase_path(stamp_file),
]

deps = [
":framework_dylib"
]
}

copy("framework_info_plist") {
visibility = [ ":*" ]
sources = [ "framework/Info.plist" ]
outputs = [ "$framework_dir/Info.plist" ]
}

copy("framework_module_map") {
visibility = [ ":*" ]
sources = [ "framework/module.modulemap" ]
outputs = [ "$framework_dir/Modules/module.modulemap" ]
}

copy("framework_headers") {
visibility = [ ":*" ]
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterAsyncMessageListener.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
]
outputs = [ "$framework_dir/Headers/{{source_file_part}}" ]
}

copy("framework_icu") {
visibility = [ ":*" ]
set_sources_assignment_filter([])
sources = [
"//third_party/icu/android/icudtl.dat",
]
set_sources_assignment_filter(sources_assignment_filter)
outputs = [ "$framework_dir/{{source_file_part}}" ]
}
copy("framework_dylib") {
visibility = [ ":*" ]
sources = [ "$root_out_dir/libFlutter.dylib" ]
outputs = [ "$_flutter_framework_dir/Flutter" ]

deps = [
":flutter_framework_dylib",
]
}

action("framework_install_name") {
visibility = [ ":*" ]
stamp_file = "$root_out_dir/flutter_install_name_stamp"
script = "//flutter/sky/tools/change_install_name.py"

inputs = [ "$_flutter_framework_dir/Flutter" ]
outputs = [ stamp_file ]

args = [
"--dylib",
rebase_path("$_flutter_framework_dir/Flutter"),
"--install_name",
"@rpath/Flutter.framework/Flutter",
"--stamp",
rebase_path(stamp_file),
]

deps = [
":framework_dylib"
]
}

copy("framework_info_plist") {
visibility = [ ":*" ]
sources = [ "framework/Info.plist" ]
outputs = [ "$_flutter_framework_dir/Info.plist" ]
}

copy("framework_module_map") {
visibility = [ ":*" ]
sources = [ "framework/module.modulemap" ]
outputs = [ "$_flutter_framework_dir/Modules/module.modulemap" ]
}

copy("framework_headers") {
visibility = [ ":*" ]
sources = [
"framework/Headers/Flutter.h",
"framework/Headers/FlutterAppDelegate.h",
"framework/Headers/FlutterAsyncMessageListener.h",
"framework/Headers/FlutterDartProject.h",
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
]
outputs = [ "$_flutter_framework_dir/Headers/{{source_file_part}}" ]
}

copy("framework_icu") {
visibility = [ ":*" ]
set_sources_assignment_filter([])
sources = [
"//third_party/icu/android/icudtl.dat",
]
set_sources_assignment_filter(sources_assignment_filter)
outputs = [ "$_flutter_framework_dir/{{source_file_part}}" ]
}

group("flutter_framework") {
public_deps = [
":framework_dylib",
":framework_headers",
Expand Down
2 changes: 1 addition & 1 deletion skia/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ component("skia") {
configs += [ "//build/config/compiler:optimize_max" ]
}

if (use_glfw) {
if (is_linux) {
deps += [ "//third_party/glfw" ]
}
}
Expand Down
2 changes: 2 additions & 0 deletions sky/dist/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if (is_android) {

deps = [
"//flutter/sky/packages/sky_engine",
"//flutter/sky/packages/sky_engine:sky_engine_pkg_helper",
]
}

Expand All @@ -62,6 +63,7 @@ if (is_android) {

deps = [
"//flutter/sky/packages/sky_services",
"//flutter/sky/packages/sky_services:sky_services_pkg_helper",
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def to_gn_args(args):
gn_args = {}

gn_args['is_debug'] = args.unoptimized
gn_args['is_clang'] = args.clang and args.target_os not in ['android']
gn_args['is_clang'] = True

ios_target_cpu = 'arm64'

Expand Down

0 comments on commit d60efb4

Please sign in to comment.