Skip to content

Commit

Permalink
Add back sdk_version entry to build targets
Browse files Browse the repository at this point in the history
ANGLE in android repo are failing to compile on
some lunch targets: e.g. mainline_modules*, with
sdk_version entry removed from build targets.

For instance, after removing sdk_version for
build target libEGL_angle, compilation failed with
this error message:

```
error: external/angle/Android.bp:8174:1: dependency
"libEGL_angle" of "ANGLE" missing variant:
  os:android,arch:arm64_armv8-a,sdk:sdk,link:shared
available variants:
  os:android,arch:arm64_armv8-a,link:shared
  os:android,arch:arm_armv8-a,link:shared
```

Add back sdk_version entry to the build targets.
END2END_TEST_TARGET needs to be disabled, because
with sdk_version entry added to END2END_TEST_TARGET,
the target failed to compile due to its' dependency
libgmock is missing the variant:

```
error: external/angle/Android.bp:699:1: dependency "libgmock"
of "libangle_end2end_tests__library" missing variant:
  os:android,arch:arm64_armv8-a,sdk:sdk,link:static
```

Bug: b/279980674
Change-Id: I96ea45b93519b84d72a70559d1ade9076ef9d955
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5857112
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Yuxin Hu <[email protected]>
  • Loading branch information
HuYuxin authored and Angle LUCI CQ committed Sep 13, 2024
1 parent 7dcfc32 commit 9673303
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion scripts/generate_android_bp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

BLUEPRINT_COMMENT_PROPERTY = '__android_bp_comment'

CURRENT_SDK_VERSION = 'current'
MIN_SDK_VERSION = '28'
TARGET_SDK_VERSION = '33'
STL = 'libc++_static'
Expand Down Expand Up @@ -431,6 +432,8 @@ def library_target_to_blueprint(target, build_info):

bp['defaults'].append('angle_common_library_cflags')

bp['sdk_version'] = CURRENT_SDK_VERSION

bp['stl'] = STL
if target in ROOT_TARGETS:
bp['defaults'].append('angle_vendor_cc_defaults')
Expand Down Expand Up @@ -569,6 +572,8 @@ def action_target_to_blueprint(abi, target, build_info):

bp['cmd'] = ' '.join(cmd)

bp['sdk_version'] = CURRENT_SDK_VERSION

return blueprint_type, bp


Expand Down Expand Up @@ -688,7 +693,9 @@ def get_angle_android_dma_buf_flag_config(build_info):
def get_blueprint_targets_from_build_info(build_info: BuildInfo) -> List[Tuple[str, dict]]:
targets_to_write = collections.OrderedDict()
for abi in ABI_TARGETS:
for root_target in ROOT_TARGETS + [END2END_TEST_TARGET, DMA_BUF_TARGET]:
# TODO(b/279980674): re-add END2END_TEST_TARGET
for root_target in ROOT_TARGETS + [DMA_BUF_TARGET]:

targets_to_write.update(get_gn_target_dependencies(abi, root_target, build_info))

generated_targets = []
Expand Down
8 changes: 4 additions & 4 deletions scripts/roll_aosp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ function generate_Android_bp_file() {
# rapidJSON is used for ANGLE's frame capture (among other things), which is unnecessary for AOSP builds.
"angle_has_rapidjson = false"

# end2end tests
"build_angle_end2end_tests_aosp = true"
"build_angle_trace_tests = false"
"angle_test_enable_system_egl = true"
# TODO(b/279980674): re-enable end2end tests
# "build_angle_end2end_tests_aosp = true"
# "build_angle_trace_tests = false"
# "angle_test_enable_system_egl = true"
)

if [[ "$1" == "--enableApiTrace" ]]; then
Expand Down

0 comments on commit 9673303

Please sign in to comment.