diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 355ef38cb0b..85f1faaf934 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -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 } diff --git a/build/config/dcheck_always_on.gni b/build/config/dcheck_always_on.gni new file mode 100644 index 00000000000..20118f4790e --- /dev/null +++ b/build/config/dcheck_always_on.gni @@ -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 +} diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni index a7b965824a7..2d58f9fd5d5 100644 --- a/build/config/sanitizers/sanitizers.gni +++ b/build/config/sanitizers/sanitizers.gni @@ -18,3 +18,5 @@ declare_args() { # GCS. use_prebuilt_instrumented_libraries = false } + +use_fuzzing_engine = false diff --git a/build/config/ui.gni b/build/config/ui.gni index ec95ce4cf74..d533be9a4e9 100644 --- a/build/config/ui.gni +++ b/build/config/ui.gni @@ -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 diff --git a/build/secondary/testing/libfuzzer/fuzzer_test.gni b/build/secondary/testing/libfuzzer/fuzzer_test.gni new file mode 100644 index 00000000000..8f8f3e750fe --- /dev/null +++ b/build/secondary/testing/libfuzzer/fuzzer_test.gni @@ -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) { + } +} diff --git a/build/secondary/testing/test.gni b/build/secondary/testing/test.gni new file mode 100644 index 00000000000..ff724df0896 --- /dev/null +++ b/build/secondary/testing/test.gni @@ -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. diff --git a/build/secondary/third_party/jsoncpp/BUILD.gn b/build/secondary/third_party/jsoncpp/BUILD.gn new file mode 100644 index 00000000000..ff255b0add1 --- /dev/null +++ b/build/secondary/third_party/jsoncpp/BUILD.gn @@ -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") { +} diff --git a/build/secondary/third_party/swiftshader_flutter/BUILD.gn b/build/secondary/third_party/swiftshader_flutter/BUILD.gn index 5c6e6c3dd90..3702fcae04a 100644 --- a/build/secondary/third_party/swiftshader_flutter/BUILD.gn +++ b/build/secondary/third_party/swiftshader_flutter/BUILD.gn @@ -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" } diff --git a/build/secondary/ui/ozone/ozone.gni b/build/secondary/ui/ozone/ozone.gni new file mode 100644 index 00000000000..5231439ad6d --- /dev/null +++ b/build/secondary/ui/ozone/ozone.gni @@ -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 diff --git a/build_overrides/angle.gni b/build_overrides/angle.gni new file mode 100644 index 00000000000..cf0faacacbd --- /dev/null +++ b/build_overrides/angle.gni @@ -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" diff --git a/build_overrides/build.gni b/build_overrides/build.gni new file mode 100644 index 00000000000..dd18cef4fa5 --- /dev/null +++ b/build_overrides/build.gni @@ -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