cc_library for Android builds very slow on WSL #12761
Labels
category: sandboxing
P2
We'll consider working on this in future. (Assignee optional)
stale
Issues or PRs that are stale (no activity for 30 days)
team-Android
Issues for Android team
type: bug
Description of the problem / feature request:
On Windows Subsystem for Linux, building a
cc_library
for Android takes 15+ seconds. Building the same code without targeting Android takes under a second. I've only been able to repro this issue on WSL.Feature requests: what underlying problem are you trying to solve with this feature?
Build native Android apps on WSL.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
My minimal repo:
Change the
return 1;
to a different number to have incremental builds. A basictime bazelisk build :libtest
takes 1-2 seconds. But if I create an Android build viatime bazelisk build :libtest --crosstool_top=@androidndk//:default_crosstool --cpu=x86 --profile=prof
or use anandroid_binary
, I get:Also, if I run
...build -s...
to get the actual Android commands and then manually run those, the commands complete instantly.What operating system are you running Bazel on?
Microsoft Windows [Version 10.0.19041.685]
andUbuntu 18.04 bionic [Ubuntu on Windows 10]
What's the output of
bazel info release
?release 3.7.2
Have you found anything relevant by searching the web?
Maybe #7527 is related based on the profile info below?
Any other information, logs, or outputs that you want to share?
I've attached a profile. Remove the file extension to view in
chrome://tracing
. The two big chunks aresandbox.CreateFileSystem
andsandbox.delete
.prof_NOT_A_ZIP.zip
The text was updated successfully, but these errors were encountered: