RBE is not used with standalone builds, and it adds unnecessary
overhead.
Test: without this change, b info no-op takes 24s on my machine. with
this change, it drops to 9s.
Fixes: 251441524
Bug: 243596580
Change-Id: I564629064f51e2b2cad836915aacf6f72e84aaeb
The target gcc toolchains have been removed from the tree, remove them
from the PATH set up by envsetup.sh. Also remove GCC_COLORS, since
we always use clang.
Test: source envsetup.sh
Change-Id: I6020816a78d0f3e03ade13812313adb156864ab6
This benefits interactive workflows of folks who are used to typing just
module names on the command line, and lowers the cognitive load to find
the package name, and can be used to check if a module is converted.
Can be used as :
$ bmod libaapt2
//frameworks/base/tools/aapt2:libaapt2
$ b build $(bmod aapt2)
If the mod is not in the bp2build metrics file, it returns:
$ bmod nonexistent
nonexistent is not converted to Bazel.
Test: build/make/core/tests/b_tests.sh
Change-Id: I245665a393621a47598e6743c0fedcd87ac33631
Zsh has some incompatibilties that we've been trying to work around in
the b command. Hopefully this prevents future issues.
Bug: 242759256
Test: build/make/tests/roboleaf_tests.sh
Change-Id: I5e887932e943112377d38e77a77a0f294b43d9b6
Now that orchestrator code has moved into its own project, update the
paths in multitree envesetup
Test: multitree_lunch locally
Change-Id: Ic718b9fa169c68ac161ac3448b6e46635ec2ae10
Context: zsh doesn't do string splitting like bash, so it passes the
post-processed bazel args to bazel as a single arg. So this CL adds a
conditional to split explicitly with zsh using the {=<arg>} flag
syntax.
Reference: https://zsh.sourceforge.io/FAQ/zshfaq03.html (for shwordsplit)
Reference: https://zsh.sourceforge.io/Guide/zshguide05.html (Section 5.4.4)
For bash, this uses array[@] to split the list into separate
shell words.
Test: zsh; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Test: bash; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Change-Id: Id92462661bbe1799a6de8dd3393799d91e3044e8
zsh doesn't do string splitting like bash, so it passes the
post-processed bazel args to bazel as a single arg. So this CL adds a
conditional to do the splitting correctly for zsh with `setopt
shwordsplit`.
Reference: https://zsh.sourceforge.io/FAQ/zshfaq03.html
For bash, this uses array[@] to split the list into separate
shell words.
Test: zsh; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Test: bash; source build/envsetup.sh && b test
//system/logging/logd:logd-unit-tests --config=linux_x86_64
Change-Id: I4e19a062b7f7e119b1612a8ce5c801878378cc69
Note that b autocompletion isn't perfect, given that the autocompletion
script looks into the workspace root for BUILD files, instead of
out/soong/workspace. (Also, out/soong/workspace may not even be
available if bp2build has not yet been run!) However, this is a good
start to autocompletion, as bazel commands, flags, and packages
autocomplete correctly.
Fixes: 196945896
Test: Treehugger
Test: Manual verification of `b` autocompletion
Change-Id: Ia99abcfe50d195c48644c7b3455243c03d5d38f7
eval doesn't seem to be necessary and using it breaks quoted args to query.
$ b cquery 'kind(test, //build/bazel/...)'
-bash: eval: line 99: syntax error near unexpected token `('
-bash: eval: line 99: ')`bazel cquery kind(test, //build/bazel/...)
---config=bp2build ''
Test: source and rerun b cquery with quoted args
Change-Id: I2b8c4387ab729b5f927fe5a629d3a4cd58bcf901
As a replacement for the removal of the avbtool symlink
Bug: 198619163
Test: Manually running `avbtool`
Change-Id: I54d504a5132e5ac89337e67a07bca0a6f410c272
It doesn't really make sense to incur the cost of running Soong tests to
Bazel users. We can shave off 20 seconds from the local critical path
during clean builds (or if Soong itself has changed) by enabling
--skip-soong-tests in the b command.
Test: b build '...'
Test: b build '...' --run-soong-tests
Bug: 240231596
Change-Id: I2325e1992099534b41ae996cee99e126a12f3c62
Bazel also supports `--foo bar` as another way to mean `--foo=bar`,
The current implementation would accidentally catch that and make it
`--foo --config=bp2build bar`. This CL instead requires that additional
arguments to the target come after a `--`.
E.g.
```
b run --args-for-bazel //foo -- --args-for-foo
```
Test: b build //build/bazel/scripts/difftool:difftool
Test: b run //build/bazel/scripts/difftool/difftool.py --level=FINE /tmp/legacyBuildFiles /tmp/bazelBuildFiles --file_type=object
Change-Id: I534caab04e4c919d4e7b6dc83b8a88e020626b18
This reverts commit 56e576dc12.
Reason for revert: breaks `b cquery //foo:bar` - it strips out `//foo:bar`.
Change-Id: I92d8b1c2732efad3160d26ee78116eccc9f8e48a
It doesn't really make sense to incur the cost of running Soong tests to
Bazel users. We can shave off 20 seconds from the local critical path
during clean builds (or if Soong itself has changed) by enabling
--skip-soong-tests in the b command.
Test: b build '...'
Test: b build '...' --run-soong-tests
Bug: 240231596
Change-Id: I77d652502dc000908166e13045aa3e245c2e762c
The grep doesn't work because "Reboot" is capitalized in the
enable-verity output. Now, syswrite gets farther, but fails before the
final remount.
$ syswrite
adbd is already running as root
Successfully disabled verity
Enabled overlayfs
rebooting
restarting adbd as root
error: closed
Test: ran syswrite on freshly flashed device
Change-Id: I26aaa6278d76dcab56fd4bde3d70ac7841ae2a3b
Having the --config flag at the end of a bazel command
will make it get passed to the command you're running
with b run instead of bazel.
Fixes: 242759256
Test: Manually
Change-Id: I6d23a0b022fdee5f822a873c1578674d1eab39c0
Shared trees are supported by specifying the inner-tree as a list in the
mcombo file. This change enables that work.
Bug: None
Test: manual, unittests pass
Change-Id: I161d707d0aada66d134b49b158bf538f0e2a2572
-P means PID to affect (default $PPID), while -p means Pipe buffer (512 bytes), we should use -P here.
Bug: 234049197
Test: Perform ". build/envsetup.sh" in host, then run "coredump_enable $PID".
Change-Id: Id373f2a7adc56d6a40720ec900b2561c9dbea2b1
Devices that only support 32-bit are very uncommon. Default
to the arch that module authors are most likely to be using.
Test: banchan com.android.sdkext | grep TARGET_PRODUCT
Test: banchan com.android.sdkext arm | grep TARGET_PRODUCT
Test: banchan com.android.sdkext arm64 | grep TARGET_PRODUCT
Change-Id: I31734660318eabbe3279214980b5cdecb55ab80b
The adb module has been moved from system/core to packages/modules/adb.
Update the path to the adb tab completion script accordingly.
Also teach envsetup.sh to complain if completion files are not found.
Test: manual: adb tab completion works
Test: source build/envsetup.sh && declare -F _adb
Change-Id: I7d6fda3813b95e64de7b1953675f66659e750c31
aosp/2045666 attempted to permit passing the `--skip-soong-tests` flag
through the `b` command to `soong_ui`, but it has been causing problems.
Test: b build '...' --skip-soong-tests is not recognized
Test: build/bazel/ci/bp2build.sh
Change-Id: I02487841d8081218dc941cb04bfa1a9e148ab6af