Commit graph

38198 commits

Author SHA1 Message Date
Treehugger Robot
57dd3c40e8 Merge "Add some more properties to the bp2build APEX converter." 2021-07-27 02:17:51 +00:00
Kiyoung Kim
ab9a31c9bc Create new module type 'snapshot_etc'
It requires new module type to generate 'prebuilt_etc' modules in the
snapshot, because of name conflict with existing modules. This change
defines new module type 'snapshot_etc' as prebuilt of 'prebuilt_etc', so
it can replace original module on certain conditions.

Bug: 192430376
Test: Tested with snapshot_etc of ld.config.recovery.txt module
Change-Id: Ia4d27ce2077a10591597d2614c7c29c23a245149
2021-07-27 10:36:30 +09:00
Jiyong Park
1b064ab3e7 Merge changes from topic "remove_ndk_platform"
* changes:
  *-ndk.so libraries are added to VndkMustUseVendorVariantList
  Reland: Add more target-specific properties
2021-07-27 01:01:58 +00:00
Treehugger Robot
2c405ff6ae Merge changes I19f0e104,I7994bee6
* changes:
  Emit mkpatsubst call for $(patsubst ...)
  Emit mksubst call for $(subst ...)
2021-07-27 00:41:21 +00:00
Kousik Kumar
b3a5d18470 Merge "Load RBE related env vars from config files" 2021-07-26 21:57:49 +00:00
Kousik Kumar
51c4091309 Load RBE related env vars from config files
This is as part of an effort to move environment variables into config
files so that configs can be tied down to source.

Test:
Ran a build with "ANDROID_BUILD_ENVIRONMENT_CONFIG=googler m"  which ran
a non-RBE build (since this is vanilla aosp).
Also ran a build with "ANDROID_BUILD_ENVIRONMENT_CONFIG= m" which ran a
non-RBE build.

https://paste.googleplex.com/5637282880028672

Bug: b/194679562
Change-Id: I416e8da75f84aa2b53995f525cf50501488dc972
2021-07-26 21:55:25 +00:00
Liz Kammer
c0c6609ef6 Set mixed builds use product-config based target
Rather than specifying a specific arch/os, use the android_target
platform that incorporates arch/os based on product config.

Test: build/bazel/ci/mixed_libc.sh
Change-Id: I2b30cfb9778444acbfd7648af2d331303cab416a
2021-07-26 17:41:49 -04:00
Sasha Smundak
b2ac859a69 Options processing: remove redundant check
Bug: 172923994
Test: N/A
Change-Id: I2b07c775f8e3cad78eb6992d3522bef3a9b701b8
2021-07-26 11:12:04 -07:00
Sasha Smundak
94b41c76da Emit mkpatsubst call for $(patsubst ...)
Bug: 172923994
Test: internal
Change-Id: I19f0e104d253230e603a098605736ac36e65818e
2021-07-26 11:12:04 -07:00
Sasha Smundak
f3e072a87e Do not flag as error 'define' directives for the known macros
Bug: 172923994
Test: internal
Change-Id: I4a562ccc1d14bd7d4e8a638823a62d775b056742
2021-07-26 11:12:04 -07:00
satayev
4102c0cc47 Merge "Rename UpdatableBootJars to ApexBootJars." 2021-07-26 17:59:36 +00:00
Sasha Smundak
9d011abcd5 Emit mksubst call for $(subst ...)
Bug: 172923994
Test: internal
Change-Id: I7994bee61f6f8bdee6eac50ecb8a6064830447a4
2021-07-26 10:25:43 -07:00
Rupert Shuttleworth
69bf4c0d60 Add some more properties to the bp2build APEX converter.
In particular:

- AndroidManifest
- file_contexts
- key
- certificate
- min_sdk_version
- updatable
- installable
- native_shared_libs
- binaries

Test: Updated unit test

Change-Id: I9ea13f021d63ec0f75006b3b0b23ec8178c7e9da
2021-07-26 07:32:36 -04:00
Jingwen Chen
b643c7a085 bp2build BUILD files for build/bazel/examples/apex.
The previous build/bazel recursive glob is too aggressive. Not all
directories should be ignored by bp2build.

Test: bp2build-incremental builds //bionic/... and everything it depends on in //build/bazel/...
Bug: 193658718
Change-Id: Icb48fd687f0fe6be144caa5b8c9a4f01d15b6c20
2021-07-26 06:26:36 +00:00
Jiyong Park
44a13ac401 *-ndk.so libraries are added to VndkMustUseVendorVariantList
We will replace the ndk_platform backend with the ndk backend. The
former hasn't been deleted yet because there already are references to
it. When the existing references are all replaced with the ndk backend,
we will remove the ndk_platform backend and the corresponding libraries
will be removed from this list.

Bug: 161456198
Test: m

Merged-In: I7c7aa1025a876e45fc4779378825d91098164e84
Change-Id: I7c7aa1025a876e45fc4779378825d91098164e84
(cherry picked from commit b58719c156)
2021-07-26 13:22:49 +09:00
Jiyong Park
a592b6f8e0 Reland: Add more target-specific properties
Following properties are added:

* vendor.header_libs
* platform.cflags
* platform.header_libs
* platform.exclude_shared_libs

These are used in the *-ndk libraries generated from the aidl_interface
modules, so that we can build the platform variants of the libraries
just like the *-ndk_platform libraries. Eventually, we will remove the
*-ndk_platform libraries.

Bug: 161456198
Test: m
Merged-In: I126e272cd29eb1e03662c54bfa8bd64e704adc74
Change-Id: I126e272cd29eb1e03662c54bfa8bd64e704adc74
(cherry picked from commit bb14481408)
2021-07-26 11:19:35 +09:00
Treehugger Robot
04f3f07752 Merge "Disable lint checks which do not apply in the platform" 2021-07-24 16:10:31 +00:00
Tor Norbye
b015aecbfe Disable lint checks which do not apply in the platform
Lint is primarily targeted at Android app developers, and some of the
checks reflect that. Some of these checks do not apply to the platform
code, where they can produce false positives.

This CL adds a number of these to an exclude list passed in to lint.
Also reenables a check previously disabled because of a bug which has
since been fixed, HardcodedDebugMode, and downgrades from error to
warning a few more lint checks which have existing violations in the
codebase when lint is upgraded to the latest version.

Test: Existing
Bug: None
Change-Id: Icbfbcfd51516c43c342e0d3cdb6973278110fd35
2021-07-24 14:48:19 +00:00
Yi-Yo Chiang
c7e044f531 cc/cc.go: Support per-image-variation "required"
Support "core" and "recovery" variants for now. Might add more image
types if needed.

Bug: 191369319
Test: Presubmit
Test: Inspect out/soong/Android-*.mk
Change-Id: Iebab29ed5d6d8fe9c66b6d6e56e00246d10c36b3
2021-07-24 22:44:36 +08:00
Yi-Yo Chiang
4fcfb53f7b android/androidmk.go: Calls *RequiredModuleNames() to get required modules
Instead of writing commonProperties.*Required as
LOCAL_*REQUIRED_MODULES, call android.Module.*RequiredModuleNames() to
retrieve list of required, so that the required modules can be modified
by overriding the interface method.

Bug: 191369319
Test: Presubmit
Change-Id: I61fcb82496dcc06831fb42f5af1b53f01999a8d1
2021-07-24 22:44:36 +08:00
Colin Cross
dcbc76134d Merge "Reland "Split the x86 host toolchain into glibc and musl variants"" 2021-07-24 02:37:02 +00:00
Treehugger Robot
bfee43545f Merge "Product config makefiles to Starlark converter" 2021-07-23 23:14:41 +00:00
Colin Cross
528d67e523 Reland "Split the x86 host toolchain into glibc and musl variants"
Split the x86 host toolchain into glibc and musl variants

Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes
for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c.

Bug: 190084016
Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc
Test: TestArchMutator
2021-07-23 22:25:36 +00:00
Colin Cross
c5647ca16e Merge "Revert "Split the x86 host toolchain into glibc and musl variants"" 2021-07-23 22:22:11 +00:00
Colin Cross
5d6904e1cf Revert "Split the x86 host toolchain into glibc and musl variants"
This reverts commit 4fb4ef2242.

Reason for revert: crossed with aosp/1775072

Change-Id: Ied922850b810d82627ba4f9ee42f672cfe286c91
2021-07-23 22:20:29 +00:00
Colin Cross
7628e933b6 Merge changes Idbeb4819,Ifc02f9e5
* changes:
  Add dynamic_list property
  Split the x86 host toolchain into glibc and musl variants
2021-07-23 22:08:19 +00:00
Treehugger Robot
2231f8a21c Merge "Remove default_shared_libs" 2021-07-23 21:18:51 +00:00
Treehugger Robot
40fa08bfa7 Merge "Add a phony target for all Rust targets" 2021-07-23 20:28:02 +00:00
Treehugger Robot
02fa0c36e4 Merge "Update the Rust prebuilt version number" 2021-07-23 20:18:30 +00:00
Dan Willemsen
4591b6496d Upgrade to golang protobuf api v2
Major operations:
 * Fix the go_package entries to be consistent, as the new tool
   complains when it doesn't have a '/'.
 * Regenerate with the new protoc-gen-go tool.
 * github.com/golang/protobuf -> google.golang.org/protobuf
 * proto.[Un]MarshalText -> prototext.[Un]Marshal

Change-Id: Ie1147bd2457fafb66ba555461b3bf14f0561a25d
2021-07-23 11:12:05 -07:00
Chris Wailes
74be764496 Add a phony target for all Rust targets
Test: m rust
Change-Id: Id347edf9998f6714622c9f173420477a9e534723
2021-07-23 10:38:01 -07:00
Chris Parsons
a66c0b5900 Skip unnecessary repeititon in validation
Test: Unit tests
Change-Id: I492d3157b1dee358871924071b26a73e8b83a9a5
2021-07-23 17:23:29 +00:00
Kalesh Singh
295ae69b04 Merge "Update VndkMustUseVendorVariantList" 2021-07-23 17:16:28 +00:00
Colin Cross
5942238966 Add dynamic_list property
Add a dynamic_list property that is similar to version_script but uses
a -Wl,--dynamic-list flag instead of -Wl,--version-script.

Bug: 190084016
Test: TestLibraryDynamicList
Change-Id: Idbeb4819ce4d92e50c4e9b27ec8f150d566d380a
2021-07-23 10:15:13 -07:00
Colin Cross
4fb4ef2242 Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546
2021-07-23 08:57:17 -07:00
Dan Willemsen
00d21ce8a5 Merge "go2bp: Add -limit and -skip-tests to more easily limit imported modules" 2021-07-23 15:38:35 +00:00
Christopher Parsons
2f1102fe58 Merge "Remove bp2build deps mutator" 2021-07-23 14:55:40 +00:00
Colin Cross
b8d69871a8 Merge "Remove Fuchsia support from Soong" 2021-07-23 14:54:49 +00:00
Joel Galenson
850edab344 Merge "Add libc to Rust allowlist." 2021-07-23 14:46:55 +00:00
Ivan Lozano
c76c802e6a Merge "rust: Add support for bootstrap linker." 2021-07-23 14:00:23 +00:00
Treehugger Robot
65eb794a5a Merge "Reland "Add TestArchProperties"" 2021-07-23 12:42:15 +00:00
Yi Kong
f8e53703f0 Fix build on older Macs with universal binary Clang
Our Clang is not built to handle old linkers by default, so if we do not
configure this explicitly it may attempt to use flags that are not
supported by the version of the Darwin linker installed on the build
machine.

Bug: 191276541
Test: build rs on 10.13
Change-Id: Ia40170b6aeba11fb6997021ec3f73e911e0b057c
2021-07-23 07:54:01 +00:00
Colin Cross
4e87990cf2 Reland "Add TestArchProperties"
Add a test that verifies appropriate arch properties are squashed
into each variant.

This relands I4a5044f3b2b3ca0a51dc457dec7157411ebad7e3 with a fix for the darwin test.

Test: TestArchProperties
Change-Id: I7e71eb839856c7121c60713c480df09f30f3cd7c
2021-07-23 00:21:00 +00:00
Colin Cross
f8c466633f Merge "Revert "Add TestArchProperties"" 2021-07-23 00:18:28 +00:00
Colin Cross
239de0ac22 Revert "Add TestArchProperties"
This reverts commit 34c32fabea.

Reason for revert: broke mac build

Change-Id: Ibe9d854f65e5ae109ba690e878946e212016434f
2021-07-23 00:17:54 +00:00
Colin Cross
4e1d5dd083 Merge "Add TestArchProperties" 2021-07-23 00:07:14 +00:00
Colin Cross
78fd15f7d6 Merge "Replace android.BuildOs with Config.BuildOS" 2021-07-23 00:07:01 +00:00
Chris Wailes
f498417977 Update the Rust prebuilt version number
This CL changes the Rust prebuilt version number from 1.51.0 to 1.52.1.

Test: TH
Change-Id: I02bf6166323040621dcbfe9c823bb1982a2e9a36
2021-07-22 16:22:05 -07:00
Chris Parsons
5a34ffb350 Remove bp2build deps mutator
Refactor bp2build to retrieve modules directly by name, instead of via
DirectDeps. This functions properly as bp2build has no need for variant
information of the blueprint graph.

Test: USE_BAZEL_ANALYSIS=1 m fmtlib
Change-Id: Ief4b67bc56f24929871af772f3a742f07085bf8c
2021-07-22 18:09:34 -04:00
Colin Cross
6b8f4253eb Remove default_shared_libs
system_shared_libs has been modified to have the same behavior as
the newly added default_shared_libs, remove default_shared_libs in
favor of system_shared_libs.

This reverts Ia2349d84c70e503916f90a5d2702e135248f73df and renames
the default_shared_libs property in cc_object (which never had
system_shared_libs) to system_shared_libs.

Bug: 193559105
Test: m checkbuild
Change-Id: I46672e3a096b6ea94ff4c10e1c31e8fd010a163c
2021-07-22 12:10:11 -07:00