Add support for ANGLE using upstream build rules (#290)

Reland of fe3b82877e (#276)

This adds minimal (in some cases dummy) files sufficient to allow
building ANGLE in this buildroot using the build_with_chromium option.
This commit is contained in:
stuartmorgan 2019-08-06 13:39:44 -07:00 committed by GitHub
parent 2654d10111
commit 182ad4097e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 77 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import("//build/config/allocator.gni")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//build/config/dcheck_always_on.gni")
declare_args() {
# When set, turns off the (normally-on) iterator debugging and related stuff
@ -13,9 +14,6 @@ declare_args() {
# catching bugs but in some cases may cause conflicts or excessive slowness.
disable_iterator_debugging = false
# Set to true to enable dcheck in Release builds.
dcheck_always_on = false
# Set to true to compile with the OpenGL ES 2.0 conformance tests.
internal_gles2_conform_tests = false
}

View File

@ -0,0 +1,11 @@
# Copyright (c) 2016 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.
# Needed for ANGLE build.
dcheck_is_configurable = false
declare_args() {
# Set to true to enable dcheck in Release builds.
dcheck_always_on = false
}

View File

@ -18,3 +18,5 @@ declare_args() {
# GCS.
use_prebuilt_instrumented_libraries = false
}
use_fuzzing_engine = false

View File

@ -18,3 +18,9 @@ declare_args() {
# window system events and input.
use_glfw = false
}
# For ANGLE build. It's a build option there, but hard-coded here.
use_x11 = false
# For ANGLE build. It's a build option there, but hard-coded here.
use_ozone = false

View File

@ -0,0 +1,11 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This is a dummy implementation to satisfy the ANGLE build, using the no-op
# implementation from the real (Chromium) fuzzer_test.gni.
template("fuzzer_test") {
not_needed(invoker, "*")
group(target_name) {
}
}

View File

@ -0,0 +1,6 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This is a dummy file to satisfy the ANGLE build. Flutter's use of ANGLE
# doesn't actually require any of the real content.

View File

@ -0,0 +1,11 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# The ANGLE build rules have a target that depends on jsoncpp, but the Flutter
# engine never actually builds that target, so just this provides empty dummy
# dependencies to satisfy the generation-time resolution.
config("jsoncpp_config") {
}
group("jsoncpp") {
}

View File

@ -587,7 +587,7 @@ source_set("main") {
shared_library("egl") {
if (is_win) {
output_name = "libEGL"
output_name = "libEGL64_translator"
} else {
output_name = "EGL"
}
@ -645,7 +645,7 @@ shared_library("egl") {
shared_library("gles") {
if (is_win) {
output_name = "libGLESv2"
output_name = "lib64GLES_V2_translator"
} else {
output_name = "GLESv2"
}

View File

@ -0,0 +1,7 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# ANGLE requires this variable, but it doesn't need to be configurable for
# Flutter so just unconditionally set it to false.
ozone_platform_gbm = false

12
build_overrides/angle.gni Normal file
View File

@ -0,0 +1,12 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# The ANGLE build requires this file to point to the location of third-party
# dependencies.
angle_googletest_dir = "//third_party/googletest/src"
angle_libpng_dir = "//third_party/libpng"
# Note: This path doesn't actually exist; see
# //build/secondary/third_party/jsoncpp/BUILD.gn
angle_jsoncpp_dir = "//third_party/jsoncpp"

View File

@ -0,0 +1,8 @@
# Copyright 2019 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Set for ANGLE. This buildroot is close enough to Chromium's buildroot
# (with the addition of some dummy files) to allow building in this mode; the
# non-Chromium build mode for ANGLE is far too different.
build_with_chromium = true