Commit Graph

11406 Commits

Author SHA1 Message Date
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
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
Inseob Kim
1c033c09d8 Merge "Refine error messages in case of missing api files"
am: 03a471a853

Change-Id: I3ba37c61837bce1cd70562409ab1ebaed5d35723
2019-03-20 10:38:57 -07:00
Yi Kong
9053416151 [automerger skipped] Merge "Add -faddrsig to ClangExtraCflags"
am: dd346af218 -s ours
am skip reason: SHA1 dd346af218 skipped by user yikong

Change-Id: I79281f2b9a944a13ff6b967490d7b8aaf8255e15
2019-03-20 10:37:55 -07:00
Peter Collingbourne
1b781e52e2 Merge "Remove workarounds for old compiler versions." 2019-03-20 16:33:23 +00:00
Treehugger Robot
d62bfe5604 Merge "Support package_splits" 2019-03-20 15:45:13 +00:00
Treehugger Robot
36c70bcfcb Merge "Add Conscrypt to coverage" 2019-03-20 14:52:06 +00:00
Treehugger Robot
03a471a853 Merge "Refine error messages in case of missing api files" 2019-03-20 09:47:15 +00:00
Yi Kong
dd346af218 Merge "Add -faddrsig to ClangExtraCflags" 2019-03-20 07:57:01 +00:00
Inseob Kim
8098faad9f Refine error messages in case of missing api files
Some non-interpretable error messages has been shown in case of missing
current api files. Instead of that messy errors, This clearly tells
users what is the problem and how to fix it.

Bug: 126259114
Test: 1) try to build a sysprop_library and a java_sdk_library without
creating txt files under api/, and see it fails.
Test: 2) Copy and paste the emitted command, and try to build again.

Change-Id: I986781cc710475647c2b996b0f1c51a6f50c0ba2
2019-03-20 15:33:06 +09:00
Jiyong Park
09d120a7c9 Fix the symbol file paths for files in APEXes am: 05e70ddc60
am: 735ec296ea

Change-Id: I0872761bd6b99bad4f269e04bd5973390f61d6eb
2019-03-19 21:24:34 -07:00
Colin Cross
318c318f97 Merge "Support go 1.12" am: bb3deefa9d
am: 930ae2f702

Change-Id: I19f6307e417a7d25ec4ac195e29770b6bae41a3b
2019-03-19 21:24:11 -07:00
Jiyong Park
735ec296ea Fix the symbol file paths for files in APEXes
am: 05e70ddc60

Change-Id: I11420262e3f4fc67a38ac78632bdfa2b2e75a51a
2019-03-19 21:18:12 -07:00
Colin Cross
930ae2f702 Merge "Support go 1.12"
am: bb3deefa9d

Change-Id: I7dd228e6bc91632ddd59acb9b6c9329d627ef3fb
2019-03-19 21:17:48 -07:00
Yi Kong
a32b5e6a6b 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
2019-03-20 03:21:10 +00:00
Jiyong Park
05e70ddc60 Fix the symbol file paths for files in APEXes
This change fixes the problem that symbol files for APEXes are installed to
incorrect path when TARGET_FLATTEN_APEX is set to true or the canonical
name of an APEX is different fro the module name of the APEX.

For the case when TARGET_FLATTEN_APEX is true, LOCAL_SOONG_SYMBOL_PATH
is set to point to the runtime path of a file (e.g. /apex/<name>/*).

For the case of the different canonical and module names, apex_name
property is added to explicitly specify the canonical name

Bug: 120846816
Test: m and inspect that symbol files exist under
$(PRODUCT_OUT)/symbols/apex/com.android.runtime/

Change-Id: Idfec88d6a30a18c225b0d87b868b9f1e0a617e38
2019-03-20 11:55:04 +09:00
Treehugger Robot
bb3deefa9d Merge "Support go 1.12" 2019-03-20 02:33:28 +00:00
Ng Zhi An
2f1a8b7d9f Merge "Rename test description" am: bb3fe2fc85
am: d23fc10137

Change-Id: Ia33dd3be333b88e7077e77ac22442dc6fe079472
2019-03-19 17:15:28 -07:00
Ng Zhi An
d23fc10137 Merge "Rename test description"
am: bb3fe2fc85

Change-Id: I14555fde8abbe041696b096f1e5a9424af32a5a4
2019-03-19 17:12:14 -07:00
Treehugger Robot
bb3fe2fc85 Merge "Rename test description" 2019-03-19 23:55:26 +00:00
Colin Cross
3020fee889 Support go 1.12
go 1.12 changed the stack trace of a function call during global
variable initialization to contain a function called
"PKG.init.ializers".  Fix callerName to split the package path
and function name on the first "." after the last "/", and look
for functions called "init.ializers" or functions with the
prefix "init."

Test: Soong tests with go 1.12
Change-Id: I25f1ba989ef2d65ca85cb7c9d84454cca230ff86
2019-03-19 23:47:22 +00:00
Colin Cross
e560c4aabc Support package_splits
Pass the package_splits list from the property to aapt2 as
--split arguments, sign the extra outputs, install them, and
add them as extra output files for SourceFileProducer.

Bug: 127921149
Test: TestAppSplits
Change-Id: Id94a53ae6a8a68ec81e98abba2fefc9c23feaa7a
2019-03-19 23:33:47 +00:00
Jiyong Park
425c3ad0dc Merge "respect relative_install_path for binaries in APEXes" am: 1b7a4b0074
am: b6195afa0d

Change-Id: Ied4dbf864557723a24b55d2e4567ea1efaf7f68b
2019-03-19 15:18:52 -07:00
Jiyong Park
b6195afa0d Merge "respect relative_install_path for binaries in APEXes"
am: 1b7a4b0074

Change-Id: Iea11f82e57d44f4df30348412f520c3e32f2e109
2019-03-19 15:02:41 -07:00
Treehugger Robot
1b7a4b0074 Merge "respect relative_install_path for binaries in APEXes" 2019-03-19 21:47:18 +00:00
Julien Desprez
e0036d8b4a Merge "Support test_suite and test_config with sh_test" am: 8c84e60f38
am: 542c4cb03f

Change-Id: Id3546a4e65d6933e3e1a85ed4029ad705be1f94e
2019-03-19 14:16:27 -07:00
Julien Desprez
542c4cb03f Merge "Support test_suite and test_config with sh_test"
am: 8c84e60f38

Change-Id: If173efcf86a77d4855c3e9a07515cb824bddd2a5
2019-03-19 14:12:24 -07:00
Julien Desprez
8c84e60f38 Merge "Support test_suite and test_config with sh_test" 2019-03-19 21:05:13 +00:00
Ng Zhi An
2935b409fc Rename test description
Bug: 127712304
Test: m androidmk
Change-Id: I1ffb07c2bce0c3890d8e8d8a5661ba351bcadd68
2019-03-19 12:50:13 -07:00