Skip to content

[Engine] Cannot use "./tools/gn --android --enable-unittests" #132611

@matanlurey

Description

@matanlurey

Problem: I'd like to use an IDE when editing tests in the engine repo; for example, dl_sk_conversions_unittests.cc.

Example of what VSCode Looks Like Screenshot 2023-08-15 at 6 26 29 PM

From prior experience with Vulkan headers missing, I tried to enable including the gtest.h headers by running:

$ ./tools/gn --unopt --android --android-cpu=arm64 --enable-vulkan --enable-unittests

ERROR at //third_party/angle/gni/angle.gni:133:38: Undefined identifier
        (!angle_64bit_current_cpu && android32_ndk_api_level >= 26) ||
                                     ^----------------------
See //third_party/angle/BUILD.gn:6:1: whence it was imported.
import("gni/angle.gni")
^---------------------
See //flutter/shell/common/BUILD.gn:339:9: which caused the file to be included.
        "//third_party/angle:libEGL_static",
        ^----------------------------------

I also tried the simpler ./tools/gn --android --enable-unittests (./tools/gn --enable-unittests does work).

This appears to be caused by (as noted above), //flutter/shell/common/BUILD.gn:

if (shell_enable_gl) {
  deps += [
    "//third_party/angle:libEGL_static",
    "//third_party/angle:libGLESv2_static",
    "//third_party/swiftshader",
  ]
}

... which appears to be added by @dnfield ~5 months ago.

I'm not sure how to proceed further, I could hypothetically add a flag to allow disabling shell_enable_gl? Or maybe this shouldn't be enabled at all when I run --enable-vulkan? Not quite sure, I'll need some help figuring out how to move forward here :)

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: local-engine-developmentLocal builds of the engine working betterengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions