Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android SDK declares toolchains that should be registered. #11737

Closed

Conversation

katre
Copy link
Member

@katre katre commented Jul 9, 2020

No description provided.

@katre katre requested a review from juliexxia July 9, 2020 17:26
@katre katre requested review from ahumesky and jin as code owners July 9, 2020 17:26
@katre katre force-pushed the android-sdk-registers-toolchains branch 2 times, most recently from 3e8c9df to 8867c91 Compare July 13, 2020 12:49
bazel-io pushed a commit that referenced this pull request Jul 20, 2020
Currently, the android_sdk_repository and android_ndk_repository in the WORKSPACE are commented out by default, but the CI workers uncomment them before starting execution. Currently this isn't a problem. However, once #11737 is submitted, bazel_boostrap_distfile_test and bazel_determinism_test will begin to fail, because the uncommented android_sdk_repository will execute, then fail because either ANDROID_HOME is not set or points to an invalid directory.

Since the bootstrap process should never execute Android rules, I decided it would be clearer to remove the possibility entirely by removing the repo declarations from the WORKSPACE.

The cleanups to the tools/android are more for clarity, to ensure they match the actual @bazel_tools used by built bazel. In an ideal world we'd remove much more code from the distfile and this wouldn't be present at all.

Three changes:
1.  Use tools/android/BUILD.tools instead of tools/android/BUILD in the distfile.
2.  Re-comment android_sdk_repository and android_ndk_repository (they aren't needed for bootstrapping).
3. Fix srcs_test to handle the case where part of the distfile is generated by a genrule.

Closes #11744.

PiperOrigin-RevId: 322143408
@katre katre force-pushed the android-sdk-registers-toolchains branch from 8867c91 to 95042e6 Compare July 20, 2020 14:55
@bazel-io bazel-io closed this in 20b95dd Jul 20, 2020
@katre katre deleted the android-sdk-registers-toolchains branch July 20, 2020 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants