Commit graph

21390 commits

Author SHA1 Message Date
Ulyana Trafimovich
79a94a27b6 Merge "Replace is_uses_lib property with provides_uses_lib." 2020-09-10 14:34:20 +00:00
Ulya Trafimovich
54027b572e Replace is_uses_lib property with provides_uses_lib.
The previous property was boolean-valued and provided only the
information whether the library should be treated as <uses-library>
by Soong. The new property is an optional string, which is the name of
the <uses-library>. The name can be different from the module name, as
in the case of "qcrilhook" module which provides <uses-library>
"com.qualcomm.qcrilhook".

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I65b68e6f7c420ab9c443a76de4c917d31fcd8c8f
2020-09-10 10:47:41 +01:00
Kousik Kumar
3e0b9c031c Merge "Check UseRBE is set before replacing any template with the RE version." 2020-09-10 09:24:17 +00:00
Treehugger Robot
4f35976c87 Merge "Notice files for prebuilt_etc are included in APEX" 2020-09-10 00:06:13 +00:00
Ivan Lozano
74fe471e7a Merge "rust: Fix rust_bindgen implicits" 2020-09-09 22:04:38 +00:00
Ivan Lozano
0eef27a556 Merge "rust: Pass lld flags from cc to rust linker args." 2020-09-09 22:03:23 +00:00
Ivan Lozano
6d45a9863a rust: Pass lld flags from cc to rust linker args.
Rust is not passing the sysroot flag to Clang when invoking it as the
linker. This means files from the host may leak in, and host targets
may fail if sysroot files are not available from the host.

This patch prepends the lld flags from cc into rust linkargs. This
pulls in the sysroots flag, and also ensures that we remain in sync
with linkage flags used in cc.

The '-Wl,--no-undefined-version' from cc is overridden to avoid
missing version assignment errors for rust's generated alloc
functions.

Bug: 167690054
Test: cd external/rust; mma
Test: strace -f -e %file <host libstd.dylib.so build command> pulls
      from correct sysroots.
Change-Id: Ic40597f546f3b112012155614056afed487c6ca1
2020-09-09 14:20:00 -04:00
Ivan Lozano
29139f9c02 Merge "[rust] Fix missing libclang for bindgen on darwin." 2020-09-09 12:27:34 +00:00
Jiyong Park
41f637d653 Notice files for prebuilt_etc are included in APEX
This change fixes a bug that notice files for some module type (e.g.
prebuilt_etc) were not included in APEX. This happened because we relied
on WalkPayloadDeps which actually doesn't traverse module types that
don't implement ApexModule interface. prebuilt_etc is one such module
type. Fixing the problem by also iterating the filesInfo array which
has info about all modules that are included in the APEX.

Bug: 166575301
Test: m com.android.tzdata and inspect the built artifact.
NOTICE.html.gz is there.

Change-Id: Iceb055b60184aef2a3e65e44680304853eb79a53
2020-09-09 13:19:56 +09:00
kellyhung
74b00521f8 Add test_mainline_module option.
Bug: 165425972

Test: m HelloWorldTests
Change-Id: I6e60b3895328c4f7aef0bfb30dcdefc30ee1d8ed
2020-09-09 02:15:39 +00:00
Treehugger Robot
daf735287b Merge "Don't assume host arch is always x86" 2020-09-09 00:13:50 +00:00
Treehugger Robot
f8123919aa Merge "Add vendor snapshot usage test" 2020-09-08 23:48:06 +00:00
Ivan Lozano
54a8ee12fe [rust] Fix missing libclang for bindgen on darwin.
The LIBCLANG_PATH provided to bindgen should point to the directory
containing libclang, not the file itself.

Bug: 167977778
Test: m profcollectd
Change-Id: Iabd9970a763c192249b401a618a2d6990b02eab0
2020-09-08 13:13:07 -04:00
Ulyana Trafimovich
117a5ef307 Merge "Be more strict about unknown install <uses-library> paths." 2020-09-08 15:21:30 +00:00
Jiyong Park
87788b5247 Don't assume host arch is always x86
This change fixes some places where host arch is assumed to be x86 to
form a path element like linux-x86. In preparation for non-x86 host
targets, the host arch part is derived from the context.

In addition, InstallForceOS() is refactored so that it can override not
only OsType, but also ArchType. Without this, the paths for the
robolectic modules will be changed from linux-x86 to linux-common, which
breaks several other places where the old paths are expected.

Bug: 134795810
Test: m
Change-Id: Ib38c715948ae546e55021ece82bac1d82e9e5da0
2020-09-08 15:12:10 +09:00
Paul Duffin
4964a5e000 Merge "Propagate vendor_available property through to sdk snapshot" 2020-09-07 14:58:20 +00:00
Ulya Trafimovich
045e11ad0d Be more strict about unknown install <uses-library> paths.
Allow default install paths only for compatibility libraries. For other
libraries that are explicitly specified in `uses_libs` and
`optional_uses_libs` unknown install path should be an error.

Bug: 132357300
Test: lunch cf_x86_phone-userdebug && m
Change-Id: I2209c90a939a8aa46c42e13bb42d09c07e4d0895
2020-09-07 13:58:51 +01:00
Inseob Kim
5f58ff7839 Add vendor snapshot usage test
In addition to capture test, this adds vendor snapshot usage test to
ensure the snapshots of BOARD_VNDK_VERSION are used correctly.

Bug: 167642944
Test: m nothing
Change-Id: I200c95626479a2b2d982edd7488d816e01376734
2020-09-07 19:56:43 +09:00
Ulyana Trafimovich
bb3467d297 Merge "Allow non-SDK Java libraries to masquerade as <uses-library>." 2020-09-07 09:49:07 +00:00
Mark Chien
66a0ae60f8 Merge "Include bpf program in APEXes" 2020-09-04 08:58:21 +00:00
Treehugger Robot
bfb98ece49 Merge "Iterate <uses-library> in deterministic order in manifest_fixer." 2020-09-04 00:45:48 +00:00
Treehugger Robot
cda9a92efb Merge "Add imports_compile_dex to prebuilt_apis" 2020-09-03 23:50:17 +00:00
Bill Peckham
e1359af34d Merge "Add exclude_from_vendor_snapshot property, related logic" 2020-09-03 17:52:29 +00:00
Paul Duffin
d1edbd4eed Propagate vendor_available property through to sdk snapshot
Test: m nothing
Change-Id: I68dcba111d290ae8a84c2bc023e1a4e0eaa43408
2020-09-03 18:49:35 +01:00
Ulya Trafimovich
d2c7ddc82a Iterate <uses-library> in deterministic order in manifest_fixer.
Bug: 132357300
Test: lunch cf_x86_phone-userdebug && m
Change-Id: Ideb7e0f7beae8c80561f841b8ce9129003f1aa96
2020-09-03 15:52:01 +01:00
Paul Duffin
3f98d148df Remove unnecessary methods/fields of DefaultsModule/Base
The commonProperties and defaultsVisibilityProperties fields are only
used as containers for default values for properties and only within
the InitDefaultsModule() and so can be removed and replaced with an
empty structure instead.

Test: m checkbuild and TH
Change-Id: Ic5038d6b84b33afdf4859ced08e59871b9cde4a2
2020-09-03 10:12:10 +01:00
Paul Duffin
ed87513b0b Extract dist properties from commonProperties
Common properties are automatically inherited from a parent module
(i.e. one that calls CreateModule()) to the child module that it
creates. This makes no sense for dist/dists properties so this change
extracts them into their own structure separate to the
commonProperties.

Test: m checkbuild and TreeHugger
Bug: 160448975
Change-Id: Icceb20455e13394dd3b3bce464fb9bb34882d6c3
2020-09-03 10:12:10 +01:00
Yi Kong
4f78c512d4 Merge "Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""" 2020-09-03 07:25:24 +00:00
Ramy Medhat
16f23a4038 Check UseRBE is set before replacing any template with the RE version.
Test: presubmit
Change-Id: I6df58b4e700f0d231367af2710672d731d20a736
2020-09-03 01:29:49 -04:00
Colin Cross
02789ab327 Merge "Revert "Create os and arch variants for GoBinaryTool modules"" 2020-09-03 03:46:26 +00:00
Colin Cross
d4bdabcfad Revert "Create os and arch variants for GoBinaryTool modules"
This reverts commit 1ec1255476.

Reason for revert: b/167632665, broke linux_bionic builds.

Change-Id: I544fb5fd8aab06efa5618f076af3032271d4020f
2020-09-03 03:45:42 +00:00
Treehugger Robot
52ddbe25f9 Merge "AutoGen: Support NativeTest with vendor namespace." 2020-09-03 02:26:11 +00:00
Colin Cross
0329f2398c Merge changes I59b7a32a,Ida7bc75a
* changes:
  Only request image and version variations for device SDK dependencies
  Create os and arch variants for GoBinaryTool modules
2020-09-02 23:51:53 +00:00
Bill Peckham
945441c09a Add exclude_from_vendor_snapshot property, related logic
When building a vendor snapshot, the general rule the
build system uses to select a module for inclusion into
the vendor snapshot is if it's a framework module.
However, there are cases where a partner may modify the
framework module, thereby assuming control of that
module.

This change adds the exclude_from_vendor_snapshot
property allowing the partner to mark a module that
would normally be included in the vendor snapshot for
exclusion. This module is then built from source when
building the vendor image against the vendor snapshot.

Bug: 165705527
Test: m nothing
Test: build partner code against vendor snapshot
Change-Id: I6c5c15f13eeeb8f29717a4abd84b65fa72096889
2020-09-02 22:27:45 +00:00
Pirama Arumuga Nainar
fe1da75972 Revert "Revert "[pgo] Return updated Flags after adding flags for PGO/AFDO""
This reverts commit 988ff8d149.

Reason for revert: RBE can now handle PGO profiles during remote linking.

Bug: http://b/162702246

Test: m ANDROID_PGO_INSTRUMENT=hwui hwuimacro and check hwuimacro has
      PGO instrumentation.

Change-Id: I724b53dc086923beeb6f4b8903136545d18f4ece
2020-09-02 17:44:06 +00:00
Liz Kammer
4e7f2607ed Add imports_compile_dex to prebuilt_apis
Allows specifying compile_dex for java_import modules generated by
prebuilt_apis.

Bug: 160455085
Test: m sdk_public_current_android
Change-Id: Id316ba740577b2c9c0522368c01072864cda6cca
2020-09-02 09:27:35 -07:00
markchien
2f59ec98d1 Include bpf program in APEXes
bpf program is put to an APEX via 'bpfs' property. It is
placed under etc/bpf directory in it.

Fix: 167530625
Test: m
Change-Id: Ia36b486f0cffb619ecc4f7a318cde881abc5baf4
2020-09-02 22:18:25 +08:00
Anton Hansson
3652018b83 Merge "Change sdk_library child visibility semantics" 2020-09-02 14:13:49 +00:00
Anton Hansson
e0b81e4472 Merge "java_sdk_library: Add annotations_enabled property" 2020-09-02 11:36:35 +00:00
Paul Duffin
e22c2ab14b java_sdk_library: Add annotations_enabled property
Passes it through to droidstubs.

Bug: 155164730
Test: m droid
Change-Id: I8b23a959ce33716dfc4572488a1fd3f6bab73a17
Merged-In: I8b23a959ce33716dfc4572488a1fd3f6bab73a17
(cherry picked from commit 2ce1e81b3e)
2020-09-02 11:30:54 +01:00
Chih-hung Hsieh
21928dbbdd Merge "Keep only out file dependency rule in output .d files" 2020-09-02 05:39:36 +00:00
Jooyung Han
3a92fbeaff Merge "apex: support prebuilt_firmware for vendor apexes" 2020-09-02 04:17:43 +00:00
Treehugger Robot
e263af74db Merge "Add compile_dex for java_import" 2020-09-02 01:23:54 +00:00
Ramy Medhat
bca0d4c450 Merge "Fallback to /tmp when socket address is longer than max length." 2020-09-01 22:13:39 +00:00
Liz Kammer
d6c31d274e Add compile_dex for java_import
Test: go java tests
Test: m
Bug: 160455085
Change-Id: I2db95dfe565e78b630007adc3360a58614d0127e
2020-09-01 12:34:08 -07:00
Steve Kim
b695937f12 Merge "Revert "Remove create_stubs and checkapi from droiddoc"" 2020-09-01 19:11:47 +00:00
Steve Kim
3666c7023f Revert "Remove create_stubs and checkapi from droiddoc"
This reverts commit 3a55c91f9d.

Reason for revert: build failed. Guess this is the cause but needs to confirm. Creating a revert per instructions

Change-Id: I30f1c8cd63e5ab84dba5d21ed354a42695c24ec4
2020-09-01 17:58:01 +00:00
Ulya Trafimovich
21a7375205 Allow non-SDK Java libraries to masquerade as <uses-library>.
Extend usesLibraryProperties with a boolean is_uses_lib property and
move these properties from java.AndroidApp to java.Module to allow
java.Library modules set the new propery and be recognized as
<uses-library> by Soong.

Bug: 132357300
Test: lunch cf_x86_phone-userdebug && m
Change-Id: I01cd5e0da3dd543c1c0597249d37d0914b213ca7
2020-09-01 17:45:39 +01:00
Liz Kammer
4297552423 Merge "Remove create_stubs and checkapi from droiddoc" 2020-09-01 16:39:48 +00:00
Anton Hansson
944e77d219 Change sdk_library child visibility semantics
If specified, the more specific *_visibility attribute override the
visibility attribute.

This is a temporary solution local to java_sdk_library. Ideally this
should be applied to all modules that create child modules.

Bug: 165017290
Test: m
Change-Id: Ia8c5ae119623a83d8ac583c602320915bb8c7f33
2020-09-01 15:17:41 +01:00