Commit graph

18947 commits

Author SHA1 Message Date
Jooyung Han
055418a56a apex: remove compat symlinks to vndk apex
For R+, symlinks from /system/lib to VNDK APEX are not necessary. (Note
that, symlinks to older VNDK are still necessary because older vendor
may access old locations.)

Hence, do not make symlinks for R+ VNDK APEX.

Bug: 142911355
Test: m # check /system/lib[64]/ for symlinks
        # cf should contain 28/29 symlinks but no symlinks for R
Exempt-From-Owner-Approval: cp from internal
Merged-In: I852fad7edebed3e4edc03c374b3643da6b053fed
Change-Id: I852fad7edebed3e4edc03c374b3643da6b053fed
(cherry picked from commit 84026389e7)
2020-04-16 04:01:48 +00:00
Diego Wilson
10e564a98e Dereference paths to be mounted into soong sandbox
Bind mounts require source paths without symbolic links.

Fixes: 153378837
Test: lunch aosp_cf_x86_phone-userdebug && make dist
Change-Id: I5c128f94233d81c52ec5692241b711b3e9d15a85
2020-04-15 20:29:06 +00:00
satayev
4cb47c6ffc Merge "Allow defining neverallow in packages other than android." 2020-04-15 13:45:42 +00:00
satayev
0b3e45abd0 Merge "Check updatable APKs compile against managed SDKs." 2020-04-15 13:45:29 +00:00
Artur Satayev
c5570ac9b1 Allow defining neverallow in packages other than android.
This exposes test func on ValueMatcher and helpers relevant for testing neverallows.

Bug: 153333044
Test: m
Change-Id: Ied07cd33afa537f9d7aa3c33e59f4ac985901a0f
2020-04-15 12:06:13 +01:00
Artur Satayev
2db1c3f1c4 Check updatable APKs compile against managed SDKs.
As a follow up, this property will be set to APKs participating in mainline program.

Bug: 153333044
Test: m
Change-Id: I6ea2f3c1d26992259e4e9e6a6d8cecf091d39c43
2020-04-15 12:06:13 +01:00
Treehugger Robot
7f64ed9dcf Merge "Clean up unused flags for LLD." 2020-04-14 22:17:16 +00:00
Treehugger Robot
e152ada4e7 Merge "Fix missing NOTICE targets for static libs that aren't available to platform." 2020-04-14 13:43:46 +00:00
Jooyung Han
e5fce6cdbf Merge "Remove PLATFORM_VERSION_FUTURE_CODENAMES" 2020-04-14 04:00:03 +00:00
Jooyung Han
03302eee13 Remove PLATFORM_VERSION_FUTURE_CODENAMES
It has been wrong to split ALL_VERSIONS into exclusive two sets of
before/after TARGET_PLATFORM_VERSION.

And PLATFORM_VERSION_ALL_CODENAMES supports all *active* list of
non-finalized codenames.

Bug: 152960049
Test: m
Exempt-From-Owner-Approval: cp from master
Merged-In: I78ca88758998e440bea72ba2d56d90eea3ec99ae
Change-Id: I78ca88758998e440bea72ba2d56d90eea3ec99ae
(cherry picked from commit 424175d72a)
2020-04-14 02:06:57 +00:00
Ivan Lozano
0b14d0f500 Merge "Remove rust execute-only memory linker flag." 2020-04-13 17:35:32 +00:00
Jaewoong Jung
f472871e00 Merge "Add libs properties to runtime_resource_overlay." 2020-04-13 13:27:25 +00:00
Yo Chiang
a3ad9b204e cc_prebuilt_library respect module name and stem
Installed name of prebuilt shared library should be stem or module name.
For example:

cc_prebuilt_library_shared {
  name: "libfoo",
  srcs: ["libbar.so"],
}
should install with the filename libfoo.so, and

cc_prebuilt_library_shared {
  name: "libfoo",
  stem: "libbaz",
  srcs: ["libbar.so"],
}
should install with the filename libbaz.so.

Prebuilt Windows PE library should specify its import library.
For example:

cc_prebuilt_library_shared {
  name: "libfoo",
  srcs: ["libfoo.dll"],
  windows_import_lib: "libfoo.lib",
  enabled: false,
  target: {
    windows: {
      enabled: true,
    },
  },
}

Bug: 151744695
Test: prebuilt_test.go && built walleye-userdebug
Change-Id: Ia8d0afb7fa46783c670870440432779c5fc7321a
2020-04-13 17:02:27 +08:00
Treehugger Robot
624dec0b03 Merge "Don't allow a lib having stubs to become a member of VNDK" 2020-04-13 04:05:31 +00:00
Treehugger Robot
aba65adbbf Merge "Create prebuilt api modules in load hook not mutator" 2020-04-11 18:40:07 +00:00
Jaewoong Jung
fe3c7f6261 Add libs properties to runtime_resource_overlay.
(This is a cherry-pick change.)

Test: app_test.go
Test: Converted an existing RRO module.
Bug: 148788111
Change-Id: I723c7175760da019d38893e54f236c45f4c973ea
Merged-In: I723c7175760da019d38893e54f236c45f4c973ea
2020-04-10 16:29:40 -07:00
Anton Hansson
d0615e7019 Merge "Expand neverallow for sdk_version: none" 2020-04-10 14:00:16 +00:00
Paul Duffin
d4c0356dad Create prebuilt api modules in load hook not mutator
An attempt to reference one of the prebuilt modules directly from an
Android.bp file highlighted a bug. The prebuilt_apis module used a
mutator to create filegroup and java_import modules for a set of api
versions. That mutator ran after the "prebuilts" mutator which handled
the renaming of prebuilt modules when the matching source module was
not present. That meant that the only way to reference the module was
by explicitly adding the prefix "prebuilt_".

This change fixed that bug by creating the modules in a load hook rather
that a mutator. This ensures that the prebuilt modules are present well
before the "prebuilts" mutator is run. Removing the mutator also removes
an unnecessary traversal of the whole dependency tree.

It also updated the documentation to explain that it creates
java_import modules as well as the filegroup modules.

(cherry picked from 47f6315f01)

Bug: 153649372
Test: m droid
Change-Id: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
Merged-In: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
2020-04-10 07:44:52 +01:00
Yabin Cui
bb5ee50e29 Merge "Disable cert-dcl51-cpp and -cert-dcl37-c." 2020-04-10 05:39:59 +00:00
Treehugger Robot
318f68226b Merge "Export API files as part of the java_sdk_library" 2020-04-10 03:57:11 +00:00
Treehugger Robot
b661961825 Merge "Export stub sources as part of the java_sdk_library" 2020-04-10 03:57:04 +00:00
Hsin-Yi Chen
f81bb657d3 Do not check ABI for coverage variants
Bug: 153119422
Test: make NATIVE_COVERAGE=true out/target/product/generic_x86/lsdump_paths.txt
Change-Id: I1cfa1526436d0587b801bd222f1037f743c0528d
2020-04-10 10:51:24 +08:00
Yabin Cui
70ba0e23a4 Disable cert-dcl51-cpp and -cert-dcl37-c.
Disable them for the next clang compiler update.

Bug: 153464409
Test: WITH_TIDY=1 make

Change-Id: I27c315637e02c7c6c708a24a04220f10136b681a
2020-04-09 16:28:51 -07:00
Jooyung Han
f7f717875e Merge "Build VNDK APEX for VNDK-Lite" 2020-04-09 23:27:48 +00:00
Jooyung Han
73d20d086d Build VNDK APEX for VNDK-Lite
For VNDK-Lite devices, which doesn't define BOARD_VNDK_VERSION, VNDK
APEX is built with only VNDK-Sp libraries with core variants.

Bug: 141908078
Bug: 152353068
Bug: 151635128
Test: TH
Merged-In: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
Change-Id: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
(cherry picked from commit 65d8a6262c)

Exempt-From-Owner-Approval: cp from internal
Change-Id: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
2020-04-09 23:27:25 +00:00
Treehugger Robot
1062943c8a Merge "soong config: add value_variable substitution" 2020-04-09 20:16:08 +00:00
Treehugger Robot
c8d1da1146 Merge "Document the file format used by gen_stub_libs.py." 2020-04-09 19:31:26 +00:00
Treehugger Robot
522bca3b26 Merge changes If74eea67,I9d8089b2
* changes:
  Extract createJavaImportForStubs()
  Support java_sdk_library as member of sdk
2020-04-09 17:01:51 +00:00
Paul Duffin
f9cb1204e1 Merge "Generate struct with field for each api scope" 2020-04-09 17:01:40 +00:00
Yi Kong
2ae41725b5 Merge "Pass -Brepro ldflag to Windows builds" 2020-04-09 16:50:23 +00:00
Jaewoong Jung
9b38447d48 Merge "Collect JNI coverage data only for first target." 2020-04-09 16:42:34 +00:00
Paul Duffin
e03749b9ad Merge "Allow droidstubs to not generate any stubs" 2020-04-09 15:42:07 +00:00
Jaewoong Jung
46984eeb58 Collect JNI coverage data only for first target.
Modules with compile_multilib property set to "both" cause builds to
fail due to duplicate Make recipes. Fix it by outputting reports only
for the first target for now.

(This is a cherry-pick change.)

Bug: 153461674
Test: Built cts with the coverage flags set.
Change-Id: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
Merged-In: Ibb8da6e9c112a857695cd7095a62c910cddfbb94
2020-04-09 08:32:40 -07:00
Anton Hansson
453764070d Expand neverallow for sdk_version: none
Allow the platform stubs to specify sdk_version: none,
and add generic support for a regexp matcher.

Bug: 144149403
Test: m
Change-Id: Icaece0d9797bace8ae9741f7a029b9ea57fcbbb9
2020-04-09 14:59:16 +01:00
Ivan Lozano
78e5ee0b8d Remove rust execute-only memory linker flag.
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

Bug: 153457617
Test: Rust binaries no longer have execute-only text sections.
Change-Id: I19cfb5b347a1f44394a619e17bb0c057c09e76a9
2020-04-09 09:40:50 -04:00
Treehugger Robot
0d4b9e32d0 Merge "Clean com.android.neuralnetworks APEX whitelist" 2020-04-09 12:16:37 +00:00
Yi Kong
a3c22e7ee2 Pass -Brepro ldflag to Windows builds
The default build-id is generated using timestamp. Pass -Brepro to
avoid using timestamp for deterministic build.

Bug: 153462962
Test: build fastboot.exe twice, got same shasum
Change-Id: I38fe993eec23c60bfcf1b76188774bfe06839fa4
2020-04-09 15:53:11 +08:00
Jooyung Han
aed150d6ed Apex: support codenames for min_sdk_version
Apex can use codenames like "Q", "R" for its min_sdk_version property.
Also, cc_library can use codenames for its stubs.versions.

Bug: 152655956
Test: m
Merged-In: I077ad7b2ac5d90b4c8708921e43846206f05ba70
Change-Id: I077ad7b2ac5d90b4c8708921e43846206f05ba70
(cherry picked from commit 29e91d2121)
2020-04-09 16:04:17 +09:00
Treehugger Robot
b54015fa54 Merge "Remove conscrypt.module.intra.core.api.stubs from apex white list" 2020-04-09 02:06:41 +00:00
Paul Duffin
1fd005d5b3 Export API files as part of the java_sdk_library
Bug: 153443117
Test: m nothing

Change-Id: I9d6f5b91a7cc25019e2eb9e3c138f0874d2831de
2020-04-09 01:33:46 +01:00
Paul Duffin
3d1248ceb6 Export stub sources as part of the java_sdk_library
Minor refactoring of checkMergeZip(string) -> checkMergeZips(...string)
to allow testing of multiple merge zips.

Bug: 153443117
Test: m nothing
Change-Id: I8db00f611ced15f8476ba16f2834a72e8c913596
2020-04-09 01:32:38 +01:00
Paul Duffin
bbb546b2da Extract createJavaImportForStubs()
Bug: 153443117
Test: m nothing
Change-Id: If74eea675b7ab4aeaa821294f2a137c95f794d4f
2020-04-09 01:32:38 +01:00
Paul Duffin
46a26a8871 Generate struct with field for each api scope
Makes it easier to add new api scopes by generating a struct with a
field for each scope.

Bug: 153443117
Test: m nothing
Change-Id: Iec77a858d2c851d99e56568b89cb30aa3ff2a244
2020-04-09 01:32:38 +01:00
Paul Duffin
dd46f71493 Support java_sdk_library as member of sdk
Bug: 153443117
Test: m nothing
Change-Id: I9d8089b2555038e3f10ad5939a6a7b01839c67ea
2020-04-09 01:32:38 +01:00
Chih-hung Hsieh
88a7176174 Merge "Disable bugprone-reserved-identifier" 2020-04-08 22:29:26 +00:00
Dan Albert
2347bd076a Document the file format used by gen_stub_libs.py.
Test: None, docs
Bug: None
Change-Id: Ice3d9f324beba4695e4abf64632ad766865a72da
2020-04-08 15:03:25 -07:00
Colin Cross
ff550f3e13 Merge "Revert^2 "Add sdk mutator for native modules"" 2020-04-08 18:29:30 +00:00
Paul Duffin
e2cfe9ce92 Remove conscrypt.module.intra.core.api.stubs from apex white list
It is no longer needed because non-static java_library dependencies are
not considered to be part of the depending APEX.

Bug: 153443117
Test: m nothing
Change-Id: I7d58d1047b2d400395a253e492b35008284778ff
2020-04-08 19:12:58 +01:00
Paul Duffin
3ae2951296 Allow droidstubs to not generate any stubs
Needed to optimize the handling of the module_lib API surface which
currently has to be generated with two separate droidstubs instances,
one to generate the stubs and another to generate the .txt file. This
allows the module generating the .txt file to avoid also wasting time
generating stubs that are not used.

This change:
* Adds a generate_stubs property that defaults to true to allow the
  behavior to be customized on a per module basis.
* Uses either the stubs srcjar or the api .txt file as the OutputFile
  for the AndroidMkEntries to ensure that they get written out properly.
* Rearranges the code for generating stubs to make it easier to
  turn it off.

Bug: 146727827
Test: m droid
      Check output dir of framework-sdkextensions-api-module_libs_api
	  to make sure it does not contain any sources or srcjars.
Change-Id: Ib8025019f8a7a8cf5fa8765d76b5ad470af20006
2020-04-08 18:50:37 +01:00
Chih-Hung Hsieh
3d3df826c1 Disable bugprone-reserved-identifier
* Disable it for the next clang compiler update
  until all source files with this warning are fixed.

Bug: 153464409
Test: WITH_TIDY=1 make
Change-Id: I126d2f5170f3883192348577e523ef99f5c5a70e
2020-04-08 10:42:16 -07:00