Commit Graph

2324 Commits

Author SHA1 Message Date
Dan Willemsen
01a3c25ed7 Configure the default arch variant features per-OS
The minimum set of supported features are different between Android and
Linux with X86_64. So while the list of variants and features are still
technically correct, and may be shared more in the future, the default
needs to be configured differently.

Bug: 120208462
Test: add `host_supported: true` to libopus; m libopus
Change-Id: Ib79707d17b852f77341026085230c026b6386b78
2019-01-15 00:53:28 +00:00
Stephen Hines
f1d56697e8 Merge "Switch to clang-r346389c." am: db89aa2c1d
am: 053e24087b

Change-Id: I861a7a8b5ff491f84c27f0c546afbcaf80e8da32
2019-01-14 14:34:03 -08:00
Stephen Hines
053e24087b Merge "Switch to clang-r346389c."
am: db89aa2c1d

Change-Id: I93384b066fc2a6aafd89e46ad7c20b80f2e7010d
2019-01-14 14:04:15 -08:00
Stephen Hines
db89aa2c1d Merge "Switch to clang-r346389c." 2019-01-14 21:47:17 +00:00
Vic Yang
b70617a160 Add Symbol_ordering_file property
We add an optional Symbol_ordering_file property to linker properties
to allow modules to specify the order of symbols in the binary.

Bug: 112073665
Test: Build libc with a symbol ordering file and check the resulting
      binary.

Change-Id: Ibb24697cfdee4a5750442cb74f1ee6390d8a6430
2019-01-14 11:00:10 -08:00
Yi Kong
92071899bd Merge "Move -Wno-null-dereference to external only" am: 98975c301e
am: 52e8b1e270

Change-Id: I39e74436a541b308c88cc09995a7887e5f3680a5
2019-01-13 17:53:37 -08:00
Yi Kong
52e8b1e270 Merge "Move -Wno-null-dereference to external only"
am: 98975c301e

Change-Id: Iaeb4dfe5dd99f8b368b4aaeea94868e434653d75
2019-01-13 17:49:15 -08:00
Yi Kong
98975c301e Merge "Move -Wno-null-dereference to external only" 2019-01-14 01:38:38 +00:00
Jiyong Park
dd11dcd66e Merge "Stubs libs are built with version script" am: a374cbb445
am: c287271902

Change-Id: I1658eb55c13121a74ba7618089db43b0481268e5
2019-01-12 16:26:48 -08:00
Jiyong Park
c287271902 Merge "Stubs libs are built with version script"
am: a374cbb445

Change-Id: If72f30160049bb8b40aba9f049db274c6d2db934
2019-01-12 16:22:44 -08:00
Jiyong Park
c1e7f48b4c Stubs libs are built with version script
Stubs libs are built with the generated version script file.

Bug: 120266448 (comment #23)
Test: lunch walleye_hwasan-userdebug
make SANITIZE_TARGET=hwaddress oatdump

Change-Id: I38652e61d0b336227b7f541590b0e70fe291f0a3
2019-01-13 03:11:27 +09:00
Jiyong Park
379de2fab0 APEXes can be sanitized
This change first introduces the interface "Sanitizeable" that
module types other than cc.Module can use to be handled by the sanitizer
mutator. APEX module, by implementing the interface, gets sanitizer
variants.

In doing so, sanitizer.go is refactored so that modules have explicit
dependencies to the runtime sanitizer libraries. This allows the runtime
library to be packaged into the APEX when required. This also completes
the dependency graph; updating the prebuilt sanitizer runtime will
trigger rebuilding of modules using the runtime.

Bug: 120894259
Bug: 121038155
Test: SANITIZE_TARGET=hwaddress m apex.test
Test: TARGET_FLATTEN_APEX=true SANITIZE_TARGET=address m
Change-Id: Ia91576ff48cda3c996350308b75bf83fcf7c23d7
2019-01-13 00:48:47 +09:00
Michael Butler
6cc8462dc2 Merge "Revert "Symbols for libs in APEXes are available"" am: 4fd001280d
am: 54c454d064

Change-Id: Ife218d4a331975d0754fdaeda4593867e218a217
2019-01-11 13:13:55 -08:00
Michael Butler
54c454d064 Merge "Revert "Symbols for libs in APEXes are available""
am: 4fd001280d

Change-Id: I564df995f01f27eea5a44ffc70fd7baf404d3cd1
2019-01-11 13:02:38 -08:00
Michael Butler
eaebd76656 Revert "Symbols for libs in APEXes are available"
This reverts commit 769e50b3c9.

Reason for revert: Likely causing build failure on aosp_x86_64-eng in aosp_master:

"build/make/core/base_rules.mk:271: error: art/build/apex: MODULE.TARGET.SHARED_LIBRARIES.com.android.runtime.host.libart-compiler already defined by art/build/apex."

Change-Id: I83b7caa04b2648e4e4914aae2fa5878516634eed
2019-01-11 20:23:36 +00:00
Jiyong Park
40236a3498 Merge "Symbols for libs in APEXes are available" am: 07feb07a16
am: 3007628413

Change-Id: I3170fcf6ba7f1a4ff46f2dd04d8f152e35ad122c
2019-01-11 10:11:39 -08:00
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
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
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
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
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
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
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
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
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
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
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