Commit graph

32278 commits

Author SHA1 Message Date
Colin Cross
e4e44bc61b Split vndk_libraries_txt into multiple module types
Replace the vndk_libraries_txt module type with llndk_libraries_txt,
etc. in preparation for making it a new SingletonModule, which will
only work with a single instance of the module type.

Bug: 176904285
Test: m checkbuild
Change-Id: Ie010a9eeee8f5849201aa4ab4eb9b2e7a9cd7d5b
2021-01-06 17:54:30 -08:00
Colin Cross
4f4f8ebd3f Fix llndk_library init
llndk_library modules were not calling module.Init(), which caused them
not to register ModuleBase.VendorProperties.  Unregistered property
structs lose their values during cloning, which caused the shared
variants of llndk_library modules to not have IsLLNDK set.

Call module.Init(), which registers ModuleBase.VendorProperties.  Also
add a helper function to filter out llndk_library modules that now
show up in the list of modules with IsLLNDK set.

Bug: 170784825
Test: m checkbuild
Change-Id: Iafde85f6a95e85a618f6f7d7a210398febb6b158
2021-01-06 17:50:48 -08:00
Treehugger Robot
47d186cd4e Merge "Create vndkproduct.libraries.txt" 2021-01-07 01:43:15 +00:00
Jooyung Han
26ab0f1051 Merge "Add "aidl.flags:" property for cc_/java_ modules" 2021-01-07 01:28:47 +00:00
Peter Collingbourne
b5d641ea3f Merge "Allow the clang version used for bindgen to be configured." 2021-01-07 01:22:34 +00:00
Yabin Cui
87b16fa3b4 Merge "Switch to clang-r407598 (12.0.1)." 2021-01-07 00:52:21 +00:00
Jose "Pepe" Galmes
7ba6f1cca7 Merge "Support for recovery snapshot." 2021-01-06 21:17:54 +00:00
Treehugger Robot
5bcf99a93a Merge "Remove patricearruda from OWNERS." 2021-01-06 19:21:28 +00:00
Bob Badour
a1b87c81ca Merge changes from topic "revert-1377717-metalics-BOEMJWNSHV"
* changes:
  Revert "Add ability to declare licenses in soong."
  Revert "Export soong license data to make."
  Revert "Define the standard license_kind rules."
2021-01-06 19:17:45 +00:00
Jerome Gaillard
df98d3e4a5 Revert "Add ability to declare licenses in soong."
Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: Iddf5468e0175831ddb642011f2768f87a5e4fcf2
2021-01-06 19:00:05 +00:00
Jerome Gaillard
61a55a0344 Revert "Export soong license data to make."
Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I51799c94a274eadab414abd80a07b5cda4584be9
2021-01-06 19:00:05 +00:00
Jerome Gaillard
cc49216079 Revert "Define the standard license_kind rules."
Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: Id0fc27abb9cfdb1415094615c47e5f784c9fc3fb
2021-01-06 19:00:05 +00:00
Bob Badour
659f11fcfc Merge changes from topic "metalics"
* changes:
  Define the standard license_kind rules.
  Export soong license data to make.
  Add ability to declare licenses in soong.
2021-01-06 18:08:07 +00:00
Jaewoong Jung
8584130063 Remove patricearruda from OWNERS.
Test: None
Change-Id: I95cbe15188913839352abd9ba37621014885389d
2021-01-06 09:21:00 -08:00
Jaewoong Jung
5542859c31 Merge "Skip old file cleanup for non-full builds." 2021-01-06 15:21:19 +00:00
Ulyana Trafimovich
0a984f559f Merge "Enforce <uses-library> checks for android_app and android_app_import." 2021-01-06 13:39:29 +00:00
Anton Hansson
22313cb192 Merge "Allow-list libderive_sdk" 2021-01-06 10:10:48 +00:00
Treehugger Robot
4c89f3e11f Merge "Static variant deps are not considered as being in the same APEX" 2021-01-06 05:54:16 +00:00
Inseob Kim
4a6d53d6cd Merge "Support building mixed versions of sepolicy" 2021-01-06 05:07:05 +00:00
Yabin Cui
db7dda89f3 Switch to clang-r407598 (12.0.1).
Also suppress a clang-tidy warning and a ubsan check to pass compilation.

Bug: 171348143
Test: build.
Change-Id: Ie5162c15df172cefd7cff9776e54531fd620bc23
2021-01-05 19:43:45 -08:00
Jiyong Park
12177fc962 Static variant deps are not considered as being in the same APEX
The shared variant of a cc_library module depends on the static variant
of the same module. The dependency is just to optimize the build time by
not compiling the same source files twice. It doesn't mean that the
"static:" dependencies of the static variant are used to build the
shared variant. Therefore, the inter-variant dependency is considered
as NOT being in the same APEX.

Bug: N/A
Test: m

Change-Id: I7b8ff8e5bd5c9eb31fc4d8d18bd93dd80296fb81
2021-01-06 11:40:37 +09:00
Inseob Kim
16ebd5a006 Support building mixed versions of sepolicy
Now newer system policy and older vendor policy can be built together by
setting following variables:

- BOARD_SEPOLICY_VERS
- BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask)
- BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor)
- BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of
  older system_ext and product policies)

Bug: 168159977
Test: try normal build and mixed build
Test: boot and check selinux denials
Change-Id: I20e1986cc1c877f5e3a7965e03bd8ade84fd7230
2021-01-06 10:42:19 +09:00
Jaewoong Jung
6e49493dac Skip old file cleanup for non-full builds.
There are few build targets that don't generate an installed file list,
e.g. product-graph. Skip the old installed file cleanup step so that the
func doesn't complain about a lack of the list file.

Fixes: 168105598
Test: m product-graph
Change-Id: Ib7dce6b801979bb565b74d6355143bac23b84fe6
2021-01-05 16:47:04 -08:00
Treehugger Robot
0d96ed8d5b Merge "Add TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION" 2021-01-06 00:09:54 +00:00
Treehugger Robot
f33786d3ec Merge "Correct mismatched string format in bazel_handler" 2021-01-05 23:57:53 +00:00
Liz Kammer
097de78352 Merge "Check whether value_variables are set" 2021-01-05 17:42:11 +00:00
Bob Badour
13351b2c7d Define the standard license_kind rules.
See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: I26ac54ca900b0c9697f92063ebb7b19fd4630251
2021-01-05 08:42:48 -08:00
Bob Badour
74fab31712 Export soong license data to make.
See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: If9d661dfcaa732c459d38d8ad7ec4a0e540846b8
2021-01-05 08:42:48 -08:00
Bob Badour
8a36d94714 Add ability to declare licenses in soong.
See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: I97943de53b071cd9918679c17015ed3397c172e9
2021-01-05 08:42:48 -08:00
Ulya Trafimovich
22890c466e Enforce <uses-library> checks for android_app and android_app_import.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ib9653aa27a173f0f0c03c7c9b0963d8ea71bb155
2021-01-05 12:04:17 +00:00
Jiyong Park
4da079732d Add TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION
The APEX symlink optimization is a build-time trick to save the
storage/RAM usage of APEX by replacing some files in APEX with symlinks
to the files in the system partition. The optimization however is
automatically turned off for 'updatable: true' APEXes because doing the
optimization for them will hide the sys-health implication until when
the APEXes are built unbundled (i.e. prebuilt) and thus the
optimization is impossible.

TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION forcibly disables the safety net.
When it is set to true, the symlink optimization is done regardless of
the 'updatable' property. This is useful for some of the devices like Go
where most APEXes (even the 'updatable: true' ones) should be
effectively non-updatable.

Bug: 175630508
Test: TARGET_FORCE_APEX_SYMLINK_OPTIMIZATION=true m and check that
updatable APEXes have symlinks to system libs

Change-Id: I26f72e5d5ebccc2d1e09c2a2f743db14937eb39a
2021-01-05 21:01:11 +09:00
Justin Yun
8a2600cfc9 Create vndkproduct.libraries.txt
Some VNDKs will be available to product modules by adding
'product_available' property. These VNDK libs will be listed in
vndkproduct.libraries.txt and tracked by the build system for the
changes. The product available VNDK list will be frozen by the
release process.

Bug: 174323911
Test: build
Change-Id: Ie1b085851413a8f2273925fefdc14fec3bfc7892
2021-01-05 20:05:39 +09:00
Jooyung Han
e197d8b174 Add "aidl.flags:" property for cc_/java_ modules
The property can be used to pass additional flags to the AIDL compiler.
For example,

  cc_library {
    ..
    srcs: ["Foo.aidl"],
    aidl: {
      flags: [
        "-Werror",      // warnings as error
        "-Weverything", // turn on all warnings
      ],
    },
  }

Bug: 168028537
Test: soong test
Change-Id: I8120eeae7cd7b1acdd34c554af996a29e760a368
2021-01-05 10:40:22 +09:00
Anton Hansson
880109bd68 Allow-list libderive_sdk
This is an apex-safe library.

Bug: 176574970
Bug: 173188089
Test: m apex-allowed-deps-check
Change-Id: Ia789ca673a43339c95551dc6fbff1c4ca8e2ec16
Merged-In: Ia789ca673a43339c95551dc6fbff1c4ca8e2ec16
2021-01-01 16:55:06 +00:00
Anton Hansson
e6056153cf Remove Ignore_missing_latest_api
This flag was only used by sdk_library.go, and is no longer needed
since sdk_library.go now knows which libraries are missing latest_api
tracking files.

Bug: 176092454
Test: m
Change-Id: I5a967f784bde99f103b85654c794e8d7110fd0db
2020-12-31 10:44:38 +00:00
Anton Hansson
591920fcfa Merge "Stop allowing missing last-api files by default" 2020-12-31 08:53:45 +00:00
Anton Hansson
6b8c40036c Merge "Set previous_api correctly for java_sdk_library" 2020-12-31 08:53:18 +00:00
Peter Collingbourne
9a868f1238 Allow the clang version used for bindgen to be configured.
This is useful when experimenting with new compiler flags that the
existing compiler does not support.

Change-Id: I45b8a2980b247d60a7f4e2ba55169267aeceef2b
2020-12-30 21:18:54 -08:00
Cindy Zhou
18417cbd72 Skip apex dep check when sanitizer diag is enabled
To avoid adding ubsan to the apex allowed_dep list, this commit adds a
check on depedency tags to see if apex check should be skipped.
The check is only used on sharedLib dependencies when diag mode are enabled
for sanitizers.

Bug: 158010610

Test: make build for aosp-sargo and aosp_cf_x86_phone-userdebug

Change-Id: I3d7dbb70d8c80ffae1854819cf8cf9e6b0b15c00
2020-12-29 14:48:37 +00:00
Anton Hansson
e87b03d1bb Set previous_api correctly for java_sdk_library
Metalava used this attribute to potentially re-write some nullness
annotations from @Nullable to @RecentlyNonNull, and not doing so can
cause problems when compiling kotlin.

Bug: 176092452
Test: m art.module.public.api.stubs && \
      rm -rf /tmp/lib && \
      unzip -qd /tmp/lib art.module.public.api.stubs.jar && \
      javap -v /tmp/lib/java/util/concurrent/ConcurrentHashMap.class | \
      grep Recently
Change-Id: I9012798f27e39d9a53dbcf0976548f6cec2d3150
2020-12-29 13:24:02 +00:00
Anton Hansson
0615864046 Stop allowing missing last-api files by default
Bug: 176092454
Test: m nothing
Change-Id: I9eadcb774e9898bb4f43054661826326b2c527c2
2020-12-29 13:20:42 +00:00
Jaewoong Jung
8bfb63c5a9 Merge "Break up app.go." 2020-12-28 17:50:44 +00:00
Bill Peckham
3d419e3b3d Merge "Automatically set uncompress_dex for java_import." 2020-12-28 17:20:14 +00:00
Justin Yun
31094b10d2 Skip product variant for core-variant VNDK
VNDK "mustUseVendorVariant" option checks only for the vendor
variant. Since the product variant of the VNDK is skipped from
installing, we don't need check product variant for
"mustUseVendorVariant" check.

Bug: 176268903
Test: m libxml2.product
      m libxml2.vendor
Change-Id: I3b10f0579aceca1fb32fa4d6fb21dc020a35874d
2020-12-24 16:11:23 +09:00
Treehugger Robot
2187e41f05 Merge changes I81769f57,I28fb6886
* changes:
  Define vndk.private property for VNDK-private libraries
  'vendor_available: *' will not create product variant
2020-12-24 05:11:31 +00:00
Treehugger Robot
b2d77d4a52 Merge "Use soong_zip -srcjar for proto and aidl srcjars" 2020-12-24 03:04:37 +00:00
Justin Yun
fd9e804470 Define vndk.private property for VNDK-private libraries
To define VNDK-private libraries, we used `vendor_available: false`.
Because of it, `vendor_available == nil` had different meaning from
`vendor_available: false` for the VNDK libraries.
To clarify this, we change the logic for defining VNDK-private
libraries which was:

cc_library {
    name: "vndk_private",
    vendor_available: false,
    product_available: false,
    vndk: {
        enabled: true,
    },
}

It must be replaced with

cc_library {
    name: "vndk_private",
    vendor_available: true,
    product_available: true,
    vndk: {
        enabled: true,
        private: true,
    },
}

Bug: 175768895
Test: m nothing
Change-Id: I81769f57c2231e54b682a28e4b82631ab9f3d390
2020-12-24 10:51:07 +09:00
Colin Cross
cf02ec8747 Use soong_zip -srcjar for proto and aidl srcjars
IntelliJ's indexer is unhappy with the full paths in the proto
and aidl srcjars.  Use the -srcjar argument to soong_zip, which
causes it to extract the correct filename for .java files based on
the package statement in the file.

Bug: 176209347
Test: manual
Change-Id: I63d9d4f6ba670e3b851835d719519d675ae54c7f
2020-12-23 17:13:16 -08:00
Bill Peckham
ff89ffae0b Automatically set uncompress_dex for java_import.
Setting uncompress_dex for java_import in the same way
as java_library enables using a java_import as an art
jar or a boot jar.

Bug: 175619567
Test: m nothing
Test: TestHiddenAPISingletonWithPrebuilt
Change-Id: I0b552a11d1630a014cf978520ccc5977fdf74066
2020-12-23 16:13:04 -08:00
Treehugger Robot
7dbc5786e3 Merge "Fix library order in class loader context to agree with PackageManager." 2020-12-23 19:58:25 +00:00