Commit Graph

11434 Commits

Author SHA1 Message Date
Inseob Kim
adabb74d08 Merge "Fix checking of empty slice properties" am: 6b200500cc
am: 2aad89a882

Change-Id: Ia4e1533586ce470b6718950421eb7fcf19fb2ca4
2019-03-21 18:48:14 -07:00
Inseob Kim
2aad89a882 Merge "Fix checking of empty slice properties"
am: 6b200500cc

Change-Id: Iee776c587b66a28e007545e47c35703dc5efdc7a
2019-03-21 18:36:09 -07:00
Treehugger Robot
6b200500cc Merge "Fix checking of empty slice properties" 2019-03-22 01:22:11 +00:00
Inseob Kim
6e93ac9a32 Fix checking of empty slice properties
Properties can be empty (not nil), and in that case some weird error
messages will happen to be emitted.

Bug: N/A
Test: try to build with api_pacakges: [] and srcs: []
Change-Id: I492077616e742072696265796520737465616b21
2019-03-21 22:04:01 +09:00
Anton Hansson
40286c75e4 Separate device and product overlays am: 53c88448fd
am: d24adcf68e

Change-Id: I25b593579f6eea9884ee4a869f470f72792e4b42
2019-03-21 04:41:50 -07:00
Anton Hansson
d24adcf68e Separate device and product overlays
am: 53c88448fd

Change-Id: I68b5fe44c44c886345b607d82d6f4e44ebc106d1
2019-03-21 04:36:34 -07:00
Anton Hansson
53c88448fd Separate device and product overlays
This change adds book-keeping of whether an overlay came from
DEVICE_PACKAGE_OVERLAYS or PRODUCT_PACKAGE_OVERLAYS. This is
later used when writing the output to soong_app_prebuilt.mk, to
use either LOCAL_SOONG_[DEVICE|PRODUCT]_RRO_PACKAGES depending
on the original source.

This change is intended to be a noop on its own, but allows a
follow-up make change to customize the location of the auto-generated
RRO packages.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ib24fe1d05be132c360dd6966f7c83968c9939f77
2019-03-21 11:25:46 +00:00
Jiyong Park
ba47ea108a Merge "Notice support for APEX" am: 21c81326ff
am: 602b6ba221

Change-Id: Idd7a4c7c736fdc55a15f1fe445408a2b57294b2a
2019-03-20 23:15:19 -07:00
Jiyong Park
602b6ba221 Merge "Notice support for APEX"
am: 21c81326ff

Change-Id: Icabbf6807ed8c3d5e8c83cc26c8b0d143fdf02fb
2019-03-20 23:10:15 -07:00
Treehugger Robot
21c81326ff Merge "Notice support for APEX" 2019-03-21 06:04:14 +00:00
Vic Yang
89ac74fed3 Add support for no-vendor-variant VNDK am: efd249e62a
am: 409b1d2375

Change-Id: I11cc3438265dcea0c3fc14246eac2558b9062f3b
2019-03-20 21:46:57 -07:00
Vic Yang
409b1d2375 Add support for no-vendor-variant VNDK
am: efd249e62a

Change-Id: I14b2a2ea2e613949f4f4394e58784ad1f54a8d3f
2019-03-20 21:40:07 -07:00
Vic Yang
efd249e62a Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed.  Since not all VNDK libraries will be
ready for this, we keep a list of library names in cc/vndk.go to
indicate which libraries must have their vendor variants always
installed regardless of whether no-vendor-variant VNDK is enabled.

Also add --remove-build-id option to the strip script to facilitate
the check of functional identity of the two variants.

Bug: 119423884
Test: Add a dummy VNDK library and build with
      TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding
      build/make change.

Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
2019-03-21 04:29:24 +00:00
Colin Cross
c2e1ffb736 Merge "Export genrules to Make as phony packages" am: f8d3be9cb7
am: 9f35fb9b37

Change-Id: I7742df8fea937a582a73829607db79f3b58ae690
2019-03-20 17:38:09 -07:00
Colin Cross
9f35fb9b37 Merge "Export genrules to Make as phony packages"
am: f8d3be9cb7

Change-Id: I36284e32fd5666aa5ad75e9e3725f70f4e5dde71
2019-03-20 17:26:39 -07:00
Treehugger Robot
f8d3be9cb7 Merge "Export genrules to Make as phony packages" 2019-03-21 00:07:21 +00:00
Jiyong Park
52818fcde8 Notice support for APEX
Notice file for an APEX is created by merging notice files for the
modules included in it (plus the notice file for the APEX itself if
specified).

Notice files having the same content are not duplicated; it is emitted
only once.

Bug: 128701495
Test: m (apex_test is amended)
Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are
license entries for /system/apex/*.apex files

Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
2019-03-21 08:05:50 +09:00
Yi Kong
ca71f33520 Merge "Turn on string-plus-int warning" am: 5a3f31b284
am: abc025924a

Change-Id: If6f3356809774ab51db1315556fb0f3f07e8c79d
2019-03-20 14:56:00 -07:00
Yi Kong
abc025924a Merge "Turn on string-plus-int warning"
am: 5a3f31b284

Change-Id: I6e0e6a5a5d57a257edd3a62e89bf173b935abb4b
2019-03-20 14:47:14 -07:00
Yi Kong
5a3f31b284 Merge "Turn on string-plus-int warning" 2019-03-20 21:33:46 +00:00
Pirama Arumuga Nainar
c389bb4fda Enable lld for windows am: 3c21c0b1d9
am: 74eef36e44

Change-Id: I03db7c8ead9961578c6e4cf5717244416ef540bd
2019-03-20 14:26:52 -07:00
Pirama Arumuga Nainar
74eef36e44 Enable lld for windows
am: 3c21c0b1d9

Change-Id: Ib45b147ca91af7d43b65576ed5b416f8b1b31aff
2019-03-20 14:22:49 -07:00
Pirama Arumuga Nainar
3c21c0b1d9 Enable lld for windows
Bug: http://b/110800681

The following flags that the binutils linkers support are not available
in lld for Windows:
  -soname
  --no-undefined
  -rpath

Windows also uses "import libraries", which are stub libraries used only
for linking.  The binutils linkers accepted a DLL and treated them as an
import library.  But lld issues the following error:

  lld-link: error: ...DLL: bad file type. Did you specify a DLL instead
  of an import library?

To resolve this, pass '-out-implib=libFoo.a' to lld when linking
libFoo.dll.  Add libFoo.a as an implicit output to the 'ld' build rule.

Rewrite the shared libraries for a library/binary to use the import
library instead of the DLL.  As a side-effect, this also (correctly)
uses the AdbWinApi.a that's alongside
development/host/windows/prebuilt/usb/AdbWinApi.dll

Test: Run Windows tests (go/android-llvm-windows-testing) and check
absence of regressions.

Change-Id: I15a178589aa6882caa6e7e38650cc6ef48109764
2019-03-20 21:07:47 +00:00
Peter Collingbourne
7010be0096 Pass -hwasan-allow-ifunc when building with hwasan. am: 967511a4e8
am: b34551b875

Change-Id: I3816cfa924412b9f2be4ca64055f85e15b6c81bf
2019-03-20 13:14:30 -07:00
Peter Collingbourne
b34551b875 Pass -hwasan-allow-ifunc when building with hwasan.
am: 967511a4e8

Change-Id: Ia22447c870639cbb664e34783adfed79782d1c2b
2019-03-20 13:10:27 -07:00
Colin Cross
3cafca1d18 Replace ctx.ExpandSources with android.PathsForModuleSrc am: 8a49795df1
am: 9bcee1f400

Change-Id: Ie94f2abc0526f8121e1edf3230bd63134e552ff2
2019-03-20 12:48:29 -07:00
Colin Cross
055d480456 Remove ModuleSrcPath am: 07e51619a2
am: 734ad216fe

Change-Id: I0d11c34f99116f08054cfd1cfb5abc7102c9700d
2019-03-20 12:48:15 -07:00
Colin Cross
5bbf0dda95 Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir am: 2fafa3ec49
am: ba0fa9c339

Change-Id: I227aa1c687c8f456f17b5e1796d7bf8529421942
2019-03-20 12:48:00 -07:00
Colin Cross
5d56651745 Add dex_import module type am: 42be761ebd
am: 66f3f2a01a

Change-Id: I1c04bf82e83635624993fbaf181c49a4bd640d1b
2019-03-20 12:47:34 -07:00
Colin Cross
9bcee1f400 Replace ctx.ExpandSources with android.PathsForModuleSrc
am: 8a49795df1

Change-Id: I42fc5461cff28f58039787b434527500d4e88eb6
2019-03-20 12:44:10 -07:00
Colin Cross
734ad216fe Remove ModuleSrcPath
am: 07e51619a2

Change-Id: I3afb1d6e16cd8d9492edf00616a856864a350340
2019-03-20 12:44:00 -07:00
Colin Cross
ba0fa9c339 Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir
am: 2fafa3ec49

Change-Id: Ic23229e9c3269ecb15c21a43517dee29f88dd274
2019-03-20 12:43:50 -07:00
Colin Cross
66f3f2a01a Add dex_import module type
am: 42be761ebd

Change-Id: I620f5fde5ee7a24bf2e8886e6d2128ded59abf33
2019-03-20 12:43:29 -07:00
Peter Collingbourne
967511a4e8 Pass -hwasan-allow-ifunc when building with hwasan.
Now that the toolchain and bionic both support ifuncs in
static executables, we can turn this on. Reduces size of
walleye_hwasan-userdebug system.img by 11MB.

Change-Id: I2f19b22518153328eee3fdca79d0c851cc513c3a
2019-03-20 19:42:42 +00:00
Colin Cross
a4ad2b0921 Export genrules to Make as phony packages
Export genrules to Make, which will allow it to support
dist-for-goals.

Test: m PRODUCT-sdk_phone_armv7-win_sdk sdk_repo dist
Bug: 80494441
Bug: 128878015
Change-Id: Idb8dfcec2be5bfab94d17395826ef451b0dd9b63
2019-03-20 19:37:58 +00:00
Colin Cross
8a49795df1 Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them.  When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.

Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
2019-03-20 19:36:13 +00:00
Colin Cross
07e51619a2 Remove ModuleSrcPath
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file.  In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.

Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.

Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.

Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
2019-03-20 19:36:03 +00:00
Colin Cross
2fafa3ec49 Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir
Replace ExpandSourcesSubDir with ExpandSources plus
PathsWithModuleSrcSubDir, which loops over the paths and uses
Join to create paths relative to subdir on any results that
are ModuleSrcPaths.

Test: All soong tests
Change-Id: I11a7face88641e2c26ccdca0a3117d5c38ab588e
2019-03-20 19:35:52 +00:00
Colin Cross
42be761ebd Add dex_import module type
Add a module type for importing a prebuilt jar that contains
classes.dex files.

Test: m with a prebuilt jar that contains classes.dex files in
      PRODUCT_BOOT_JARS
Test: java_test.go, dexpreopt_test.go, dexpreopt_bootjars_test.go
Bug: 124804356
Bug: 125517186

Change-Id: I496848f9dca11f758d49b1cb68168cec7f8e1718
2019-03-20 19:29:59 +00:00
Yi Kong
efb4e863a8 [automerger skipped] Merge "Add -faddrsig to ClangExtraCflags" into stage-aosp-master
am: afe467154f -s ours
am skip reason: change_id I99511f038a6d4b88b5c849a0f8943c24731ab6ea with SHA1 a32b5e6a6b is in history

Change-Id: Ia1b7952db3599616987a5f6eb27026ef57785de0
2019-03-20 10:46:02 -07:00
Peter Collingbourne
c83efac0ba Merge "Remove workarounds for old compiler versions." am: 1b781e52e2
am: 98e6f7e4a1

Change-Id: I1ea0311b36464823b56ddfe0d6a3a10c8f4912b1
2019-03-20 10:43:59 -07:00
Yi Kong
afe467154f Merge "Add -faddrsig to ClangExtraCflags" into stage-aosp-master 2019-03-20 17:43:51 +00:00
Colin Cross
58350d8d33 Merge "Support package_splits" am: d62bfe5604
am: c20ea4c09f

Change-Id: I8d9db09c1e451a468ef73cfdf8ad5f025aaeb1a3
2019-03-20 10:43:35 -07:00
Adam Vartanian
637c287938 Merge "Add Conscrypt to coverage" am: 36c70bcfcb
am: cecf06a088

Change-Id: Ia51729c668ee26ead3b9da1fec68e58c018b662e
2019-03-20 10:43:02 -07:00
Inseob Kim
165bafc1ce Merge "Refine error messages in case of missing api files" am: 03a471a853
am: 1c033c09d8

Change-Id: If09250611b93fcc245fe3d545efac2a80684eb54
2019-03-20 10:42:35 -07:00
Yi Kong
776181534e [automerger skipped] Merge "Add -faddrsig to ClangExtraCflags" am: dd346af218 -s ours
am: 9053416151

Change-Id: I64bb21e3d4c7c3648eff68bc9ba6991cd582735c
2019-03-20 10:42:10 -07:00
Yi Kong
7e8b47b313 Add -faddrsig to ClangExtraCflags
Emit address-significance table which allows linker to perform safe ICF.
Clang does not emit the table by default on Android since NDK still uses
GNU binutils.

With the flag, binary size is decreased. For Marlin:
               -fno-addrsig  -faddrsig  diff
/system/bin    28012K        27108K     -3.33%
/system/lib    88220K        86964K     -1.44%
/system/lib64  151936K       148108K    -2.58%

Test: m checkbuild
Bug: 128940110
Change-Id: I99511f038a6d4b88b5c849a0f8943c24731ab6ea
Merged-In: I99511f038a6d4b88b5c849a0f8943c24731ab6ea
(cherry picked from commit a32b5e6a6b)
2019-03-20 10:40:44 -07:00
Peter Collingbourne
98e6f7e4a1 Merge "Remove workarounds for old compiler versions."
am: 1b781e52e2

Change-Id: I05f0960ef39eb9d0f3fd8592c7a3542cae9358ad
2019-03-20 10:40:27 -07:00
Colin Cross
c20ea4c09f Merge "Support package_splits"
am: d62bfe5604

Change-Id: Idf4f63ea566e22353430994465ecaaedd27d7bb2
2019-03-20 10:39:57 -07:00
Adam Vartanian
cecf06a088 Merge "Add Conscrypt to coverage"
am: 36c70bcfcb

Change-Id: I0bc5434716f7986f973ff16c77c649cde0cf88fc
2019-03-20 10:39:23 -07:00