Commit graph

45647 commits

Author SHA1 Message Date
Alexander Smundak
d8b1998990 Merge "Fix: negate the condition for is-vendor-board-qcom" 2021-11-05 21:30:58 +00:00
Treehugger Robot
c602297226 Merge "Collect generated rbc files under one folder" 2021-11-05 19:56:19 +00:00
Cole Faust
76b0c499d0 Merge "Generate board-specific launchers in mk2rbc" 2021-11-05 18:42:12 +00:00
Colin Cross
fc06a59904 Merge changes from topic "soong-cc-install"
* changes:
  Move cc module installation into Soong
  Temporarily add method to get java binary tool
2021-11-05 17:14:59 +00:00
Sasha Smundak
4f1f118a8d Fix: negate the condition for is-vendor-board-qcom
Bug: 193540681
Test: internal
Change-Id: Ia4087574f7cbcd5282687234892314c9a5fcc174
2021-11-05 08:45:49 -07:00
Ivan Lozano
925942127a Merge "rust: Emit toc files for cdylibs" 2021-11-05 13:09:20 +00:00
Treehugger Robot
dbb2a94cda Merge "Respect required property of apex modules" 2021-11-05 01:54:36 +00:00
Cole Faust
943ac416d2 Collect generated rbc files under one folder
Mk2rbc takes a .mk file and produces a .rbc file under the
same path, but with a different stem. For example:
build/test/foo.mk becomes out/build/test/foo.rbc

This makes it difficult to see everything that mk2rbc has
generated in the out folder. Move the generated files to
out/rbc instead, so they have a common stem that is separate
from the rest of the build outputs.

Fixes: 202249430
Test: m RBC_PRODUCT_CONFIG=1 nothing
Change-Id: If3edba3feef9c2d3631244d533b997ef0b8b4e8b
2021-11-04 16:39:59 -07:00
Cole Faust
6ed7cb493d Generate board-specific launchers in mk2rbc
Board config works slightly differently from product config.
It requires the product config variables to be passed into
it. Currently the only generic way to pass info into an RBC
script is via the arguments to rbcrun, which get passed
as global variables, not the product (cfg) variables.
Add a new form of launcher that reads the product variables
from a separate rbc file that is generated in make.

The board configuration also doesn't need inheritance, so it
doesn't call rblf.product_configuration() either.

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -b sdk_phone_x86_64-userdebug
Change-Id: I52fd65b33cf99b45a563284e2849da75a8af8688
2021-11-04 16:19:41 -07:00
Treehugger Robot
84e22da855 Merge "Add rbc product config checks to run_integration_tests.sh" 2021-11-04 22:19:00 +00:00
Liz Kammer
17acadbcb0 Merge "Make bazel action symlinks absolute paths" 2021-11-04 21:09:21 +00:00
Cole Faust
10bcb4c908 Add rbc product config checks to run_integration_tests.sh
We already have a rbc product config ci postsubmit target,
but we want to add a small presubmit check as well.
run_integration_tests.sh is already run on presubmit, so
add it there.

Test: Presubmits
Change-Id: Id6fc282261507fb49a57b578ce2fdf20855dd6fd
2021-11-04 13:40:24 -07:00
Treehugger Robot
51ade343eb Merge "Pass HWASan workarounds cflags to linker as well" 2021-11-04 19:39:07 +00:00
Trevor Radcliffe
6e9a38ee2a Merge "Reformat SDK Library docs" 2021-11-04 18:41:19 +00:00
Colin Cross
acfcc1f682 Move cc module installation into Soong
Move cc module installation rules into Soong by overriding
InstallBypassMake.  Update the locations that find host tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.

The methods that find host tools are also used on go binaries,
so update the config methods that tell Blueprint where to install
go binaries to the Make installation directory too.

Bug: 204136549
Test: m checkbuild
Change-Id: Id172592c195e506102982a4af0084f6d9c68a896
2021-11-04 10:28:58 -07:00
Colin Cross
3e3eda6eb6 Temporarily add method to get java binary tool
cc binaries are moving from out/soong/host/linux-x86/bin to
out/host/linux-86/bin first, to be followed by java binaries.
Temporarily add a method that gets the java binary path while
it is different from the cc binary path.

Bug: 204136549
Test: m checkbuild
Change-Id: I04a7e741436da6be68078f23d074870413a5bb5e
2021-11-04 10:28:58 -07:00
Lukács T. Berki
ed7cc80be2 Merge "Fix paths rbc-run uses to access the rbc tools." 2021-11-04 17:12:05 +00:00
Lukács T. Berki
a64bd73b18 Merge "Bump the bootstrap epoch number." 2021-11-04 17:10:35 +00:00
Lukacs T. Berki
04bd17ecb9 Fix paths rbc-run uses to access the rbc tools.
This was broken in aosp/1878498; ccross@ submitted aosp/1875758 between
writing that change and submitting it, which changed the paths to mk2rbc
and rbcrun, thereby breaking Starlark product configuration.

Test: Presubmits.
Change-Id: I185489589997e6bdc815a54a8f6f328c18f813d0
2021-11-04 18:02:22 +01:00
Liz Kammer
c773778bfe Make bazel action symlinks absolute paths
hardlinks are incompatible with sandboxing
relative links are incopatible with Soong's use of `cp -d`

Test: build/bazel/ci/mixed_libc.sh
Change-Id: I8c776cda6a27c680c51466d9a7af1b499f2f566d
2021-11-04 12:42:52 -04:00
Anton Hansson
c24f0855d9 Merge "Make PrebuiltStubsSources support srcjar properly" 2021-11-04 16:27:26 +00:00
Lukács T. Berki
5a60909cbd Merge "Remove the out/soong/.bootstrap directory." 2021-11-04 14:59:12 +00:00
Trevor Radcliffe
df8aa1fbcf Reformat SDK Library docs
We're not sure what formatting is applied to this but it sure
isn't markdown.

Fixes: 204572072
Test: Build and compare docs
Change-Id: Ib023f0cb490a7c7c5605d426ce5e70a7130d5162
2021-11-04 14:39:06 +00:00
Yi Kong
286abc6f17 Pass HWASan workarounds cflags to linker as well
ThinLTO shifts codegen to linking stage. Need to pass the same set of
workaround flags to linker.

Test: m GLOBAL_THINLTO=true; adb shell incident_helper
Bug: 159343917
Bug: 204746309
Change-Id: I1e42bb043d6a86d880054b85e8831386ae4ea7e5
2021-11-04 20:19:57 +08:00
Treehugger Robot
9f76be59f1 Merge "Dedup logic for selecting system modules" 2021-11-04 11:35:25 +00:00
Lukacs T. Berki
9985d9a3a5 Bump the bootstrap epoch number.
The bpglob changes in build/blueprint submitted together with this
change make it necessary.

Test: Presubmits.
Change-Id: I3d19761ec1a199c2f77693a882f8744ce404c6de
2021-11-04 11:47:42 +01:00
Lukacs T. Berki
90b4334a64 Remove the out/soong/.bootstrap directory.
It's better not to have state hidden in dotfiles (or rather,
dotdirectories) if we can help.

It's questionable whether the "linux-x86" path segment makes sense since
soong_build only ever runs on one operating system, but I didn't want to
rock the boat now.

Drive-by fixed some quoting fixes in rbc-run. Notably, I didn't wrap
`$@` into double quotes because I don't know whether the lack of double
quotes was intended or not.

Also drive-by fixed the fact that "out/soong" was added twice to the
directory name of bpglob. This turned out not to be a problem because
bpglob doesn't need to be explicitly built: if it's needed, it's
declared as an input of the glob files so it'll be built automatically
(at the cost of the first "null build" not actually being a null build)

Test: Presubmits.
Change-Id: I710d8d16cd8212059a0ca1ee95378505303eed83
2021-11-04 09:47:58 +01:00
Ivan Lozano
7b0781d14c rust: Emit toc files for cdylibs
Write toc files that list the exported symbols so dependents are
only rebuilt if the exported symbols change.

This exports the CC function TransformSharedObjectToToc, and also
removes an unused arg from its signature.

Bug: 178185435
Test: New Soong test passes.
Test: m <toc file path>
Change-Id: I7ab69bf7e7f32f25eb4c7ca9d18d877dac1511db
2021-11-03 15:34:50 -04:00
Paul Duffin
e5ad90c37b Dedup logic for selecting system modules
Previously, the selection of system modules was duplicated, once for
source and once for prebuilts. This change dedups that by switching the
source code to use the same mechanism as the prebuilts which will ensure
consistent behavior in future.

Bug: 204189791
Test: m	nothing
Change-Id: Ia1729017ae332181c95f7b205dab87fb47d43fb8
2021-11-03 18:44:45 +00:00
Paul Duffin
9de51af72c Merge "Rename core-current-stubs-system-modules to be more consistent" 2021-11-03 18:43:50 +00:00
Treehugger Robot
c37663aad9 Merge "Convert .meta_lic files to textproto" 2021-11-03 18:31:02 +00:00
Paul Duffin
10fb76f467 Rename core-current-stubs-system-modules to be more consistent
Renames to core-public-stubs-system-modules so that it is of the format
core-<sdk-kind>-stubs-system-modules.

Bug: 204189791
Test: m nothing
Change-Id: Iac565c940c2ef92be9cc64c0c6b8102a26afe0dd
2021-11-03 16:58:29 +00:00
Anton Hansson
86758ac94c Make PrebuiltStubsSources support srcjar properly
Initially prebuilt stub sources only supported directories as input, but
support has been added for packaging them up in srcjar as well. However
the build action was not updated accordingly.

Add support to determine if our input is a srcjar, and if so just use
it directly.

Bug: 204978699
Test: m sdk (with prebuilts)
Change-Id: I302cd34ebd55414d35c4f936cd563a4af89b22c6
2021-11-03 15:59:30 +00:00
Treehugger Robot
a3bd963988 Merge changes Id11f4fb1,Id573d970,Ia94a0b5c
* changes:
  Fix //conditions:default excludes computation for LabelListAttribute.
  bp2build: split Bazel conversion context into smaller ones, and change TopDownMutatorContext signatures to use Bazel conversion context.
  Add an error check in `bazelPackage` for malformed labels.
2021-11-03 15:36:28 +00:00
Paul Duffin
8380ee66a5 Merge "Use module-lib system modules when building from prebuilts" 2021-11-03 15:32:42 +00:00
Liz Kammer
5506c1658c Merge "Update bp2build denylist cause" 2021-11-03 14:19:16 +00:00
Treehugger Robot
ed078675d0 Merge "Revert "Fix python_binary_host module in mixed build."" 2021-11-03 11:05:58 +00:00
Rupert Shuttleworth
ffc4cc41a3 Revert "Fix python_binary_host module in mixed build."
Revert submission 1861755-fix_python_binary_host_in_mixed_build

Reason for revert: Broke Bazel CI, please see https://android-build.googleplex.com/builds/submitted/7879108/mixed_droid-clean/latest/view/logs/build_error.log and https://android-build.googleplex.com/builds/submitted/7879108/mixed_droid-incremental/latest/view/logs/build_error.log
Reverted Changes:
Ica457ee71:Add platform needed by python_binary_host.
Ibc8b99a92:Fix python_binary_host module in mixed build.

Change-Id: I3d6c4f6edee2d00bdc78efd5cee64f4c915baeaa
2021-11-03 09:07:26 +00:00
Lukács T. Berki
c2fc91e52b Merge "Update debugging instructions." 2021-11-03 07:48:39 +00:00
Wei Li
c989eaf4c3 Keep the following targets disabled in mixed build since there are errors in mixed_droid CI after go/oag/1861755 is submitted.
func_to_syscall_nrs
libseccomp_policy_app_zygote_sources
libseccomp_policy_app_sources
libseccomp_policy_system_sources

Test: CI
Bug: 204949078

Change-Id: Iaf9d7cd8831da984bcee82399be138ebe3aab9e8
2021-11-03 04:15:36 +00:00
Jingwen Chen
9af49a49f8 Fix //conditions:default excludes computation for LabelListAttribute.
Previously, excludes computation for the default condition in label list
selects was clobbering pre-existing values. This CL fixes it by
performing a union of the new values with existing ones instead.

Test: properties_test.go
Bug: 198556411
Change-Id: Id11f4fb14e359201304afde0d8ba856851d41395
2021-11-03 01:56:42 +00:00
Colin Cross
fe8ceadabf Merge "Move bpglob out of ToolDir" 2021-11-02 20:50:26 +00:00
Liz Kammer
b84b8c9c9a Update bp2build denylist cause
The binary is converted; however, there are still issues with the host
toolchain.

Test: build/bazel/ci/bp2build.sh
Change-Id: Idf864ea6c64c0c7bbbaa0c9d43d6eac5120e0268
2021-11-02 15:03:12 -04:00
Wei Li
664a4fd0af Fix python_binary_host module in mixed build.
Test: USE_BAZEL_ANALYSIS=1 m genfunctosyscallnrs
Test: USE_BAZEL_ANALYSIS=1 m func_to_syscall_nrs
Test: USE_BAZEL_ANALYSIS=1 m libseccomp_policy
Bug: 201094425, 197135289

Change-Id: Ibc8b99a92149410c8a879b7a4facf6c8961a7b9f
2021-11-02 17:04:38 +00:00
Colin Cross
9191df23df Move bpglob out of ToolDir
ToolDir is going to become unstable when switching between KatiEnabled
and Soong-only builds while the duplication between out/soong/host and
out/host is resolved.  bpglob gets executed very early during bootstrap,
before the primary builder has run to update the paths to match the
current configuration.  Move it into SoongOutDir() so that its path
is more stable.

Moving bpglob causes incremental build issues, so add a bootstrapEpoch
constant that can be changed when making incompatible changes and will
wipe bootstrap intermediates.

Bug: 204136549
Test: m nothing
Change-Id: I7b1bd1ebfe1209d11db691b3ee00873ef92658cd
2021-11-02 15:30:36 +00:00
Ivan Lozano
c7a4de25c1 Merge changes I2373d366,I908496d9
* changes:
  rust: Add common interface for binaries
  rust: Support whole static libraries with any name
2021-11-02 12:37:11 +00:00
Mohammad Islam
569f032a9e Merge "Add exemption for test_framework-apexd and test_service-apexd jars" 2021-11-02 08:51:01 +00:00
Treehugger Robot
31ec5a0709 Merge "Adding jdk.internal in the allowed package list" 2021-11-02 08:49:31 +00:00
Jingwen Chen
55bc820d66 bp2build: split Bazel conversion context into smaller ones,
and change TopDownMutatorContext signatures to use Bazel conversion context.

This minimizes the context interfaces/functions actually needed to
convert a module, and makes such interfaces easier to mock/test.

Test: CI
Change-Id: Id573d97023d59e06ef70e1f54437024d3f7aadbd
2021-11-02 06:51:27 +00:00
Jingwen Chen
80b6b64db5 Add an error check in bazelPackage for malformed labels.
Bug: 204281595
Test: CI
Change-Id: Ia94a0b5c8dd3a0294475e9bc816a19ae03f7342d
2021-11-02 06:24:31 +00:00