Commit Graph

3295 Commits

Author SHA1 Message Date
Jiyong Park
3007628413 Merge "Symbols for libs in APEXes are available"
am: 07feb07a16

Change-Id: I6ef148e599227633baf30b15f84fdd96062d1ea1
2019-01-11 09:51:07 -08:00
Stephen Hines
c0042a2c77 Switch to clang-r346389c.
This cherry-pick update picks up a few patches to improve hwasan, ELF
tls, and LLD for kernel builds.

Bug: http://b/122549771
Test: make checkbuild, boot
Change-Id: I8a90282af41ad4c74df819484ba2c3507e20100f
2019-01-11 09:21:46 -08:00
Jiyong Park
769e50b3c9 Symbols for libs in APEXes are available
The unstripped file for libraries in APEXes are available via
out/target/product/<device>/symbols/apex/<apex_name>/path_to_lib.

This change make the symbol files available by installing the individual
files in APEXes to the directory where the APEXes will be mounted at
(i.e. runtime directory which is /apex/<apex_name>). Note that the files
are not actually packaged to a filesystem image; they are installed just
to create the symbol files under the out directory where developers can
use them for debugging.

Bug: 120846816
Test: m com.android.runtime.debug
There are unstripped files under
out/target/product/walleye/symbols/apex/com.android.runtime.debug

Change-Id: Ib182e2bf8787b7669ccba13814491db35370f468
2019-01-11 23:45:20 +09:00
Jiyong Park
16cd51c9b4 Rename non-stubs variant of a lib if it is included in APEX am: b07885714c am: 8e071293b4
am: e45af66fc5

Change-Id: I2ea4c815c1b37508e235b35adab0b49b42b96fac
2019-01-09 19:35:43 -08:00
Jiyong Park
e45af66fc5 Rename non-stubs variant of a lib if it is included in APEX am: b07885714c
am: 8e071293b4

Change-Id: Id156d16ed3e5b8a224d692fbaf00e0d19a42f941
2019-01-09 19:29:36 -08:00
Jiyong Park
8e071293b4 Rename non-stubs variant of a lib if it is included in APEX
am: b07885714c

Change-Id: I01f9965ce641e561ec8429e037789718c73e951b
2019-01-09 19:26:21 -08:00
Jiyong Park
b07885714c Rename non-stubs variant of a lib if it is included in APEX
If a lib is directly included in an APEX (via native_shared_libs
property) and the lib has stubs (via stubs.versions property), then the
ordinary non-stubs variant of the library is renamed to
<libname>.bootstrap in the makefile. At the same time, the stubs variant
of the lib becomes visible and it's name is <libname>.

This ensures that modules in Android.mk build against the stubs
variant thus preventing them from using private APIs in the lib.

The non-stubs variant, however, is used if the module explicitly has
set the new 'bootstrap' property to true. This is useful for building
some early binaries (such as init and vold) which need to run before
APEXes are activated. Since they can't use the bionic libs from the
runtime APEX, they should use the bionic libs left in the system
partition which is called the boostrap bionic.

Bug: 120266448
Test: m
Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044

Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
2019-01-10 09:57:29 +09:00
Dan Willemsen
e119dceea0 Merge "Don't expect depfile from .s files" am: 9b84d34be3 am: 20541f773c
am: 0302e36cce

Change-Id: I25a2dcc281fa4b15a2f3dab5d3a884328e3267ce
2019-01-04 08:58:15 -08:00
Dan Willemsen
0302e36cce Merge "Don't expect depfile from .s files" am: 9b84d34be3
am: 20541f773c

Change-Id: Icf4ffa0c93ff7a50a47477e611913adc307b3773
2019-01-04 08:39:56 -08:00
Dan Willemsen
20541f773c Merge "Don't expect depfile from .s files"
am: 9b84d34be3

Change-Id: Ib87334c82091ea52883d5b0273cdcc2bcc43d315
2019-01-04 08:28:42 -08:00
Treehugger Robot
9b84d34be3 Merge "Don't expect depfile from .s files" 2019-01-04 15:19:33 +00:00
Logan Chien
c4282c2693 Do not build lsdump for APEX variants am: fa478c0234 am: e500da9ba6
am: 4d713ded4d

Change-Id: I13c208fda441a170558e942391df9f43acb2cc64
2019-01-04 00:45:34 -08:00
Logan Chien
4d713ded4d Do not build lsdump for APEX variants am: fa478c0234
am: e500da9ba6

Change-Id: If18fe0a061fea7e23b59b6ce261b70ae278b2122
2019-01-04 00:40:27 -08:00
Logan Chien
e500da9ba6 Do not build lsdump for APEX variants
am: fa478c0234

Change-Id: I05e604c67099562282fddd9cfc5a2f8672ad584b
2019-01-04 00:35:18 -08:00
Dan Willemsen
fcabb1c518 Don't expect depfile from .s files
.s files (unlike .S files) aren't run through the preprocessor, so -M*
doesn't actually write out a depfile.

Since our ninja is now going to be verifying that the depfile is created
(https://android-review.googlesource.com/861510), don't specify a
depfile for .s files.

Bug: 121058584
Test: apply https://android-review.googlesource.com/861510
Test: cd external/libavc; mma
Change-Id: I1697aa020c63639317c8f4771147026601ae72fc
2019-01-03 23:25:11 -08:00
Logan Chien
fa478c0234 Do not build lsdump for APEX variants
This commit stops building lsdump files for APEX variants since APEX
variants are local to APEX modules themselves.

Bug: 121986692
Test: make findlsdumps  # compare $ANDROID_PRODUCT_OUT/lsdump_paths.txt
Change-Id: I37fcd152d0d84d235a354ea53e53e808dd71464a
2019-01-04 13:28:06 +08:00
Jiyong Park
5abc51a1fb Merge "Fix: stubs lib is installed in APEX" am: f17284e05d am: 368c7463b5
am: dafd8fa529

Change-Id: Ib3f434b173b4abecbaeb6d8d210b7c67a80b9f57
2019-01-03 15:47:14 -08:00
Jiyong Park
dafd8fa529 Merge "Fix: stubs lib is installed in APEX" am: f17284e05d
am: 368c7463b5

Change-Id: I9e6d49a7c8da72fdbe4cd2fe8988306133942e88
2019-01-03 15:35:38 -08:00
Jiyong Park
368c7463b5 Merge "Fix: stubs lib is installed in APEX"
am: f17284e05d

Change-Id: I56b89e36a260bf0cb1792285b0eddda775523772
2019-01-03 15:28:53 -08:00
Jiyong Park
67883b3ec6 Fix: stubs lib is installed in APEX
This CL fixes the problem that when a lib is defined with stubs, the
stubs variantof the lib is installed to the APEX. This was happening
because the non-stubs variant is the last variant of the 'version'
variants and addFarVariationDependencies selects the first variant when
the 'version' variant isn't specified.

Fixing the problem by making the non-stubs variant (whose name is "")
the first variant.

Test: m (apex_test)

Change-Id: I1505fd2f29a0d70c916bad51000aa06f2b80b137
2019-01-04 03:37:00 +09:00
Jiyong Park
3879b56e72 Fix: 'required' property is ignored am: f7df9b7e55 am: f71e439bc9
am: 31b2ec74d3

Change-Id: Ic5743cd01b3db0d47fe741dfe6ce88a5692fe198
2019-01-03 09:57:42 -08:00
Jiyong Park
31b2ec74d3 Fix: 'required' property is ignored am: f7df9b7e55
am: f71e439bc9

Change-Id: Id621ffc23766da4e6854de363f26a455cfb64186
2019-01-03 09:54:40 -08:00
Jiyong Park
f71e439bc9 Fix: 'required' property is ignored
am: f7df9b7e55

Change-Id: I9f9be8cc1da6d598c54d7a71ac672819f35e15da
2019-01-03 09:48:33 -08:00
Jiyong Park
f7df9b7e55 Fix: 'required' property is ignored
This change fixes a bug that the 'required' property of a module is
ignored when the module is using a shared from an APEX. This is
happening because LOCAL_REQUIRED_MODULES is overwritten (with := instead
of +=) when ApexesProvidingSharedLibs is not empty.

Fixing the bug by appending ApexesProvidingSharedLibs to
AndroidMkData.Reuired so that it is handled in android/androidmk.go

Test: m
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
and make sure that system/bin/vold_prepare_subdirs exist.

Change-Id: Ie57bca480ba4198b4da0df1c73e92fa42b5ebda8
2019-01-04 01:19:44 +09:00
Dan Willemsen
c52ad8c15e Remove incorrect file comments am: d56097dc27 am: 6053fd4ba7
am: 60e8a8ddd4

Change-Id: I9f9b454dc924207e110ccb9428217e5cab6f46a5
2018-12-27 14:48:50 -08:00
Dan Willemsen
60e8a8ddd4 Remove incorrect file comments am: d56097dc27
am: 6053fd4ba7

Change-Id: Ibab200a85543999cc347f8f31e5c7f2c7c823aee
2018-12-27 14:39:35 -08:00
Dan Willemsen
6053fd4ba7 Remove incorrect file comments
am: d56097dc27

Change-Id: I5cfee829375c83b182d4bd78a80f21fed899a674
2018-12-27 14:23:27 -08:00
Dan Willemsen
d56097dc27 Remove incorrect file comments
Test: none
Change-Id: Ia2889ee29c2c0bf18adf5d90e506cfce4b14fdcc
2018-12-27 12:26:30 -08:00
Yi Kong
fae5dac8fd Move -Wno-null-dereference to external only
Test: m checkbuild
Bug: 29823425
Change-Id: Icd675e451b2a2a8e3f489706e533f92d991de9c0
2018-12-21 14:51:41 -08:00
Jiyong Park
6da7056621 Fix: static dependency across an APEX is lost am: 16e91a067d am: 53cfd00417
am: 980f53d05e

Change-Id: I8a3c6273052122507549552900002d1ecd817e21
2018-12-21 13:00:51 -08:00
Jiyong Park
980f53d05e Fix: static dependency across an APEX is lost am: 16e91a067d
am: 53cfd00417

Change-Id: I3bf3c9e2c790de063c8670f55482088c55a9f0f4
2018-12-21 12:56:47 -08:00
Jiyong Park
53cfd00417 Fix: static dependency across an APEX is lost
am: 16e91a067d

Change-Id: I3686643a6606dda25dba39971198e43c6e638404
2018-12-21 12:52:45 -08:00
Jiyong Park
16e91a067d Fix: static dependency across an APEX is lost
This change fixes following problem:

1) a native lib having stubs is defined.
2) the lib is included in an APEX.
3) a static binary is linking the lib from outside of the APEX.
4) then, the dependency from the binary to the lib is vanishing.

This is happening because cc.depsToPaths() mistakely does not
distinguish static lib deps from shared lib deps. For shared lib deps,
it creates two dependencies (one for stubs variant and the other for
non-stubs variant) and choose the stubs variant when the lib and the
current module is not in the same APEX (i.e. dependency to the non-stubs
variant is discarded). However, since we don't have stubs variant for
static library, it ends up having no dependency to the library if the
link is static.

Fixing the issue by skipping the variant selection routine when the link
is static.

Test: m (apex_test added)
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
Change-Id: I21102a31cc5c0b105da2affdd035bd5cc571a6ab
2018-12-21 18:01:39 +09:00
Jiyong Park
d60c977c13 Add use_vendor to APEX module am: da6eb592bf am: d3447f29f2
am: 23e17e4406

Change-Id: I54ecf636279b00da55dd5d54677b1651fc450193
2018-12-20 22:53:46 -08:00
Jiyong Park
23e17e4406 Add use_vendor to APEX module am: da6eb592bf
am: d3447f29f2

Change-Id: Ic01572a209a75e03356027f6fee058c68e714f73
2018-12-20 22:49:44 -08:00
Jiyong Park
d3447f29f2 Add use_vendor to APEX module
am: da6eb592bf

Change-Id: I7e5f7a24d6058e7a0fef0f9907e5f0da9e3e2a56
2018-12-20 22:45:38 -08:00
Jiyong Park
da6eb592bf Add use_vendor to APEX module
use_vendor, when set to true, brings vendor variant of the native
libraries and binaries to the APEX.

Bug: 115707625
Test: m (apex_test updated)
Change-Id: Ib4e996f8652f4ce4645a9c22f6914e2ab35edda6
2018-12-20 14:33:02 +09:00
Jaewoong Jung
749562aa8e Merge "Ignore shared libs for static executables." am: 3a0989ce4c am: 23dbe700a4
am: c8d9f14958

Change-Id: I1bb2886b84d1c230dc8a02a0f92d5d63f1d81066
2018-12-19 08:36:06 -08:00
Jaewoong Jung
c8d9f14958 Merge "Ignore shared libs for static executables." am: 3a0989ce4c
am: 23dbe700a4

Change-Id: I24a0ba472a8af71faf729b4967dbfdff15f70e97
2018-12-19 08:32:07 -08:00
Jaewoong Jung
23dbe700a4 Merge "Ignore shared libs for static executables."
am: 3a0989ce4c

Change-Id: I338b355c60ec18558d5002c0c70ae85f7b89713e
2018-12-19 08:26:56 -08:00
Jaewoong Jung
3a0989ce4c Merge "Ignore shared libs for static executables." 2018-12-19 16:16:24 +00:00
Sundong Ahn
fad87b6e5b Merge "Add dependency for sysprop" am: 6ebbf3da29 am: 32f04e838b
am: 1a5a13465c

Change-Id: I3901054b227801c3d99df4217f6534a557b567f9
2018-12-19 03:43:49 -08:00
Sundong Ahn
1a5a13465c Merge "Add dependency for sysprop" am: 6ebbf3da29
am: 32f04e838b

Change-Id: Ie11cc8568d604481732dc25c1b7db65949b16808
2018-12-19 03:38:44 -08:00
Sundong Ahn
32f04e838b Merge "Add dependency for sysprop"
am: 6ebbf3da29

Change-Id: Icd09bef563aa335a36327c6e0e252667ac3f5371
2018-12-19 03:29:43 -08:00
Jiyong Park
d9a84950c7 Merge changes Idb2b552b,I190bca35 am: 8cc51b5620 am: e3c89e73b7
am: 184cf73914

Change-Id: I45602b728f20584599784a84c5ec855e48e54d08
2018-12-19 00:48:51 -08:00
Evgenii Stepanov
6677e55dce Merge "[hwasan] Reduce history size to save memory." am: 3181721a1e am: 8801703a91
am: cff8c6cd03

Change-Id: I67acf57ba309fd9a28e8e07dea96020b6d4d8b31
2018-12-19 00:44:53 -08:00
Jiyong Park
184cf73914 Merge changes Idb2b552b,I190bca35 am: 8cc51b5620
am: e3c89e73b7

Change-Id: Ia71c4b780b690c810461295c0d1b5adeefbf853c
2018-12-19 00:38:16 -08:00
Evgenii Stepanov
cff8c6cd03 Merge "[hwasan] Reduce history size to save memory." am: 3181721a1e
am: 8801703a91

Change-Id: I27705b2f968660d117c1870f9c4b3aa28c319e6e
2018-12-19 00:35:13 -08:00
Jiyong Park
e3c89e73b7 Merge changes Idb2b552b,I190bca35
am: 8cc51b5620

Change-Id: I045c83d128ed0efbd477cd3a43e80c9bbbc46a09
2018-12-19 00:22:36 -08:00
Evgenii Stepanov
8801703a91 Merge "[hwasan] Reduce history size to save memory."
am: 3181721a1e

Change-Id: Iae83ccfc53a363d45ad4793c3f9d17c697f52a74
2018-12-19 00:19:40 -08:00