Commit graph

46663 commits

Author SHA1 Message Date
Colin Cross
c899d7808e Revert "Temporarily add method to get java binary tool"
Java binaries and cc binaries are in the same directory again, the
separate method can be removed.

Bug: 204136549
Test: m checkbuild
Change-Id: I2e7ca82448aba5c7e54d3c3c376fe14a953ef4af
2021-11-05 14:26:53 -07:00
Colin Cross
24cc4be60b Move java module installation into Soong
Move java module installation rules into Soong by overriding
InstallBypassMake.  Update the locations that find host java tools
to look in the Make installation directory instead of the Soong
installation directory, which will no longer be used.

Bug: 204136549
Test: m checkbuild
Change-Id: I5af6d764c97e7ddb5ee121fc9830166c25d831b1
2021-11-05 14:24:51 -07:00
Colin Cross
1d0eb7a9d0 Fix ctx.InstallFile calls for java modules
Call ctx.InstallFile on the primary install file last so that the
primary install file can depend on the extra install files, and so that
the primary install file can be inferred from the last installed file.

Add missing ctx.InstallFile calls for the dexpreopt and hostdex outputs.

Fix the install subdirectory for modules installing to the testcases
directory.

Bug: 204136549
Test: m checkbuild
Change-Id: I7edd7647be27439d3ca0ecc589ca5e89d4ba8474
2021-11-05 14:20:28 -07:00
Colin Cross
ae5330a2d9 Make HostJavaToolPath use pathForInstall
Use pathForInstall instead of PathForOutput for HostJavaToolPath
so that it internally produces an InstallPath that can later support
being converted to Make installpath.

Bug: 204136549
Test: m checkbuild
Change-Id: If4f5d3552b27ffe6b9bc709c4a08d9513c49ef7d
2021-11-05 14:20:28 -07:00
Colin Cross
6a4d3ba138 Fix location of host tools
Host tools are in out/host/linux-x86/bin now instead of
out/soong/host/linux-x86/bin.

Bug: 204136549
Test: forrest
Change-Id: I293accdde5ee4d1d21a471e12ba66e169f9410fc
2021-11-05 14:10:01 -07:00
Treehugger Robot
bc177adebd Merge "Collect generated rbc files under one folder" am: c602297226
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880606

Change-Id: I2c68c0c66b6614a721a87cfd0511dabd4e7ef60c
2021-11-05 20:17:57 +00:00
Treehugger Robot
c602297226 Merge "Collect generated rbc files under one folder" 2021-11-05 19:56:19 +00:00
Cole Faust
e52dd5eabc Merge "Generate board-specific launchers in mk2rbc" am: 76b0c499d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849699

Change-Id: If5ced6884dcce23ffe2602d672cd8762bb6b63d9
2021-11-05 19:09:57 +00:00
Cole Faust
76b0c499d0 Merge "Generate board-specific launchers in mk2rbc" 2021-11-05 18:42:12 +00:00
Colin Cross
f8d0d6db23 Merge changes from topic "soong-cc-install" am: fc06a59904
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869554

Change-Id: I31fb434c67f797af65497a51910adc4acbc07997
2021-11-05 17:34:44 +00:00
Colin Cross
de02e95b6b Temporarily add method to get java binary tool am: 3e3eda6eb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881030

Change-Id: I37f7d2d8033001951e05ab3f13b86b5cad901892
2021-11-05 17:34:43 +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
d1d040f36a Merge "rust: Emit toc files for cdylibs" am: 925942127a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879645

Change-Id: I5ceb2de78e11a123c07944e767c84d8a7830959b
2021-11-05 13:25:10 +00:00
Ivan Lozano
925942127a Merge "rust: Emit toc files for cdylibs" 2021-11-05 13:09:20 +00:00
Inseob Kim
a92d10bdf2 Add seapp_contexts to allowlist of makefile goal
This is an interim solution before seapp_contexts and seapp_neverallows
are migrated into Soong. CtsSecurityHostTests needs these two modules.

Bug: 194096505
Test: build
Change-Id: I5596d6f00b957afd86c752501c1e83b3d4089d9e
2021-11-05 05:10:26 +00:00
Jim Tang
c44ba2a6f9 Dump deps for native and java to json files.
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS,
soong can generate module_bp_cc_deps.json and module_bp_java_deps.json
without passing any variables.

BUG: 204397180

Test: rm out/soong/module_bp*json
"m nothing" should see both json files were generated.

Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
2021-11-05 12:06:15 +08:00
Treehugger Robot
9f1798a838 Merge "Respect required property of apex modules" am: dbb2a94cda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1872878

Change-Id: Ibf66a2478aa4f018d8b3d21d36113ab470166465
2021-11-05 02:08:15 +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
34591d9ce6 Merge "Add rbc product config checks to run_integration_tests.sh" am: 84e22da855
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880418

Change-Id: I133b8f1614c8e5615e045fceac454dd515dff1bb
2021-11-04 22:35:35 +00: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
cc05f6d691 Merge "Make bazel action symlinks absolute paths" am: 17acadbcb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880827

Change-Id: I108214d19baa07105f922b0a2e3f8b0eeb1eaf0d
2021-11-04 21:28:15 +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
53f0f3e683 Merge "Pass HWASan workarounds cflags to linker as well" am: 51ade343eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880991

Change-Id: I29a6c75b0765770c910625150ccc891564808840
2021-11-04 19:50:00 +00:00
Treehugger Robot
51ade343eb Merge "Pass HWASan workarounds cflags to linker as well" 2021-11-04 19:39:07 +00:00
Trevor Radcliffe
42ec26f2cb Merge "Reformat SDK Library docs" am: 6e9a38ee2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881268

Change-Id: Ic0444fb840573e13e65327edcbc5ecb876c9ef61
2021-11-04 19:00:44 +00:00
Trevor Radcliffe
6e9a38ee2a Merge "Reformat SDK Library docs" 2021-11-04 18:41:19 +00: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
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
Lukács T. Berki
1a39581271 Merge "Fix paths rbc-run uses to access the rbc tools." am: ed7cc80be2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1881272

Change-Id: Ideea12616367650a2efaa405aed55bae5779bc23
2021-11-04 17:28:36 +00:00
Lukács T. Berki
7d48540233 Merge "Bump the bootstrap epoch number." am: a64bd73b18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879603

Change-Id: Ic96e8fb7ffdd8f908d4def42e8100d9754e39bab
2021-11-04 17:28:28 +00: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
Anton Hansson
d88eb89740 Merge "Make PrebuiltStubsSources support srcjar properly" am: c24f0855d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1879682

Change-Id: Iae43c6bbdcd6c5039cb3a978a64b8a9c59b0e23c
2021-11-04 16:47:06 +00: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
53c59a8abb Merge "Remove the out/soong/.bootstrap directory." am: 5a60909cbd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1878498

Change-Id: I9925039218ebf3ae496ed14cb0dbbea0d64c8363
2021-11-04 15:22:15 +00:00
Lukács T. Berki
5a60909cbd Merge "Remove the out/soong/.bootstrap directory." 2021-11-04 14:59:12 +00:00
Ivan Lozano
62cd0388eb rust: Support MTE memtag_heap sanitizer
This CL adds support for the MTE memtag_heap sanitizer. This is
controlled via inclusion of an ELF note.

Bug: 170672854
Test: Heap MTE-enabled Rust test binary triggers MTE
Change-Id: I2619818785e86a94667d02b30d102c83456b7925
2021-11-04 10:51:54 -04: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
13b567905a Merge "Dedup logic for selecting system modules" am: 9f76be59f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1880030

Change-Id: I38976dd90a86313150bf4027dc3cdc1eec49343d
2021-11-04 11:49:34 +00: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