Commit Graph

6170 Commits

Author SHA1 Message Date
Colin Cross
945aebf48e Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503 am: 1b5599e462
am: b3407069ee

Change-Id: Ib0f7f8e93842cea36b915c1e10929f96249c20e3
2018-02-23 02:38:58 +00:00
Colin Cross
b3407069ee Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503
am: 1b5599e462

Change-Id: If6ed7347189045341276d527b1fd555400203899
2018-02-23 02:34:06 +00:00
Treehugger Robot
1b5599e462 Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503
* changes:
  Use PathForSource instead of PathsForSource
  Move AllowMissingDependencies check from PathsForSource to PathForSource
  Propagate errors out of validatePath
  Add t.Run and t.Helper to paths_test.go
  Remove unused intermediates parameter from ExistentPathForSource
2018-02-23 02:28:35 +00:00
Colin Cross
230c992943 Fix java_import and android_library_import conversions am: 336ad7a667
am: b4b91fa725

Change-Id: Ideeda0de950d7f153558b8691abacff8aa76c329
2018-02-22 23:32:44 +00:00
Colin Cross
f1a271a4d0 Don't pretend *parser.List is immutable am: 3fad895e75
am: 0ae9d91508

Change-Id: I2dbdf6343e9d58df94e5133744811ca8b7e24d33
2018-02-22 23:32:36 +00:00
Colin Cross
dc425fe743 Soong AAR prebuilt support am: fabb608b27
am: cb7137994f

Change-Id: I90f4d95a810685c3622ee3e5d38f59bc91fe6da6
2018-02-22 23:32:32 +00:00
Colin Cross
380c9a1f87 Add aapt includes for prebuilt SDK jars am: 9ca6942956
am: 022c52e269

Change-Id: I8fdda06cba16df50fd217a9fcdbea936f95b1edc
2018-02-22 23:32:23 +00:00
Colin Cross
b4b91fa725 Fix java_import and android_library_import conversions
am: 336ad7a667

Change-Id: Ib4963012cee1f839ef141e61676d60365cb674c1
2018-02-22 23:28:41 +00:00
Colin Cross
0ae9d91508 Don't pretend *parser.List is immutable
am: 3fad895e75

Change-Id: I342ed780933174e1126980c9f658891c0c73dd80
2018-02-22 23:28:36 +00:00
Colin Cross
cb7137994f Soong AAR prebuilt support
am: fabb608b27

Change-Id: I38ce0673ecbd0b81e29f433480dcbd2e295b9eea
2018-02-22 23:28:29 +00:00
Colin Cross
022c52e269 Add aapt includes for prebuilt SDK jars
am: 9ca6942956

Change-Id: Ic940e06a20e8d299f147e53531f78fbc5af593dc
2018-02-22 23:28:23 +00:00
Dan Willemsen
73e1814213 Merge "Only depend on a single file for generated headers" am: 2f2f24f775
am: 463a23efc3

Change-Id: I21780fcd1966c8174e7067d2ace53f06036742fa
2018-02-22 23:13:30 +00:00
Nan Zhang
a400bb400c Droiddoc Support in Soong am: 581fd21e91
am: 2ea76706b3

Change-Id: I240c145395bd018f75398502390650e3f475dc2e
2018-02-22 23:11:15 +00:00
Dan Willemsen
463a23efc3 Merge "Only depend on a single file for generated headers"
am: 2f2f24f775

Change-Id: Iedf323be7d0feb84bd0c38c1a3e1f26fc33e8329
2018-02-22 23:00:43 +00:00
Nan Zhang
2ea76706b3 Droiddoc Support in Soong
am: 581fd21e91

Change-Id: I3da14242bfb501afc14e1ebc07a9393be2558001
2018-02-22 22:58:56 +00:00
Colin Cross
336ad7a667 Fix java_import and android_library_import conversions
java_import and android_library_import modules can't be handled
directly in androidmk because the results may depend on properties
that haven't been parsed yet.  Add a bpfix pass (which is
automatically included at the end of androidmk) to select
android_library_import vs. java_import based on the extension
of the prebuilt file, and convert the srcs property to jars or aars
as appropriate.

Bug: 73724997
Test: androidmk_test.go
Change-Id: I1024742e9e96d5e1e88c3cc139eeb0d5a2f6849b
2018-02-22 14:54:47 -08:00
Colin Cross
3fad895e75 Don't pretend *parser.List is immutable
The functions in bpfix that take a *parser.List and return a
modified *parser.List are always returning the same pointer
and mutating the target of the pointer.  Remove the extra
unnecessary return value.

Also extract the getLiteralListProperty function.

Test: androidmk_test.go
Change-Id: I08d8aff955c72b7916741cda8083974a49af4d6f
2018-02-22 14:54:47 -08:00
Colin Cross
fabb608b27 Soong AAR prebuilt support
Add support for android_library_import modules that take an
aar file.

Bug: 73724997
Test: m checkbuild
Change-Id: I670b56f0a3b7501d9478a6064a04d0cb9c1bb611
2018-02-22 14:54:47 -08:00
Colin Cross
9d37831dd3 Use PathForSource instead of PathsForSource
PathForSource does the AllowMissingDependencies check now, use it
instead of PathsForSource.

Test: m checkbuild
Change-Id: If1894fd98d8d757ebc3c1635d5fcea86f81bfc4a
2018-02-22 14:43:36 -08:00
Colin Cross
94a321045a Move AllowMissingDependencies check from PathsForSource to PathForSource
PathsForSource was handling the AllowMissingDependencies case, but
PathForSource was not.  Refactor PathForSource and
ExistentPathForSource, and add logic to PathForSource to fall back
to behavior similar to ExistentPathForSource when
AllowMissingDependencies is set.

Test: paths_test.go
Change-Id: Id7925999a27ea75a05e9301bbf1eb9f9a6bc4652
2018-02-22 14:43:36 -08:00
Colin Cross
1ccfcc36bd Propagate errors out of validatePath
The next patch will need to more complicated custom error handling,
so make validatePath return an error and let the caller handle it.

Test: paths_test.go
Change-Id: I4fe11c3f319303d779596709f4819e828b5bdb9b
2018-02-22 14:43:36 -08:00
Colin Cross
dc75ae70f3 Add t.Run and t.Helper to paths_test.go
Test: paths_test.go
Change-Id: Iea2b07815fe82a346c5384571ebc2b57538722cc
2018-02-22 14:43:36 -08:00
Colin Cross
32f3898f0b Remove unused intermediates parameter from ExistentPathForSource
Test: m checkbuild
Change-Id: Id2c0a5039c2ec3b3795385c135ffec022ccd691e
2018-02-22 14:43:36 -08:00
Colin Cross
9ca6942956 Add aapt includes for prebuilt SDK jars
Add -I arguments to the aapt link command line if sdk_version is
set to a numbered SDK prebuilt jar.

Test: m checkbuild
Change-Id: Ieeadf84bc131ba94e0e4ee1b9eec7d1e80b31b19
2018-02-22 14:36:24 -08:00
Treehugger Robot
2f2f24f775 Merge "Only depend on a single file for generated headers" 2018-02-22 22:18:56 +00:00
Nan Zhang
581fd21e91 Droiddoc Support in Soong
Support Droiddoc to Soong based on core/droiddoc.mk. The non-std doclet
based droiddoc compilation output is a "real" stubs.jar instead of a
directory of java files and a timestamp file.

The std doclet based javadoc compilation output is a "empty" stubs.jar
instead of a timestamp file.

The stubs.jar will be exported to
out/target/common/obj/JAVA_LIBRARIES/$(LOCAL_MODULE)_intermediates/classes.jar
and out/target/common/docs/$(LOCAL_MODULE)-stubs.jar

A $(LOCAL_MODULE).zip file will be generated also, and is exported to
out/target/common/docs/$(LOCAL_MODULE)-docs.zip if property: installable is not set
to false.

Bug: b/70351683
Test: unittest + convert libcore docs Android.mk to Soong manually.

Change-Id: I1cffddd138a5d9d445f86a3d4a3fd4de88a2bc0f
(cherry picked from commit 78188ec622cb1ee24171455867fc58ffab91562e)
2018-02-22 11:14:13 -08:00
Dan Albert
24e8fa2d0e Merge "Fix NDK gtest name." am: 50b8682dca
am: 03af1671d7

Change-Id: Ib9815a1e57e6842c298b48a210c80c6366b2397c
2018-02-22 04:24:45 +00:00
Dan Albert
03af1671d7 Merge "Fix NDK gtest name."
am: 50b8682dca

Change-Id: Ie30659f2d066da5c4cd022c112fbb4f6fab32f99
2018-02-22 04:17:43 +00:00
Colin Cross
3ef40fd3e4 Merge "Use android.InList for inList" am: e35ad13004
am: 20b350b433

Change-Id: I4905c013fa6109a0be9c52e7f1e1042c864d0970
2018-02-22 04:10:25 +00:00
Treehugger Robot
50b8682dca Merge "Fix NDK gtest name." 2018-02-22 04:05:42 +00:00
Colin Cross
20b350b433 Merge "Use android.InList for inList"
am: e35ad13004

Change-Id: I6a712813ed3294b3e5a0365f09675e430211f4d9
2018-02-22 03:55:36 +00:00
Treehugger Robot
e35ad13004 Merge "Use android.InList for inList" 2018-02-22 03:22:43 +00:00
Dan Willemsen
9da9d49ede Only depend on a single file for generated headers
While the rule may really need all of the generated header files to
exist, only one of them (per genrule task) needs to be in the dependency
list, since the rest are essentially aliases.

This brings an AOSP aosp_arm-userdebug out/soong/build.ninja file from
372MB to 156MB, with equivalent functionality. The Android-aosp_arm.mk
file is reduced from 11MB to 6.5MB.

Bug: 73745773
Test: diff out/soong/build.ninja
Test: diff out/soong/Android-aosp_arm.mk
Test: rm -rf out; m
Change-Id: If17377666292cc20957417fc4c3cd52f98971d0c
2018-02-22 02:37:01 +00:00
Colin Cross
4391d8add0 Merge "Use __SBOX_OUT_DIR__ in sbox output file list" am: 431e17af07
am: 1dc37ea7ca

Change-Id: I0bec916ad7c3d00e434f5ecc09d533df9eed461a
2018-02-22 02:13:25 +00:00
Colin Cross
1dc37ea7ca Merge "Use __SBOX_OUT_DIR__ in sbox output file list"
am: 431e17af07

Change-Id: I3e2b677a555bd6ced13e9dea688fe6c3980bf1b1
2018-02-22 02:05:56 +00:00
Treehugger Robot
431e17af07 Merge "Use __SBOX_OUT_DIR__ in sbox output file list" 2018-02-22 01:59:09 +00:00
Colin Cross
baccf5b984 Use __SBOX_OUT_DIR__ in sbox output file list
The path to the output directory may be arbitrarily long, use
__SBOX_OUT_DIR__ in the list of output files passed to sbox
to avoid expanding it multiple times in the command line.

Fixes:
ninja: fatal: posix_spawn: Argument list too long
09:40:14 ninja failed with: exit status 1
when building libchrome with a long OUT or OUT_DIR_COMMON_BASE.

Bug: 73726635
Test: m checkbuild
Change-Id: I59024b2164287c8e531711afd9273b692ce9c28a
2018-02-21 14:55:34 -08:00
Dan Albert
7dd5899087 Fix NDK gtest name.
Test: make checkbuild
Bug: 73087488
Change-Id: I048da296d8000cd1c86a5174ff7864aed271f00c
2018-02-21 22:54:18 +00:00
Colin Cross
0d0ba59ec3 Use android.InList for inList
Remove duplicate implementations of inList.

Test: m checkbuild
Change-Id: I6943b95f6d47e6722b9ff1ab61ab14c429fe33a0
2018-02-21 11:02:16 -08:00
Jayant Chowdhary
fd6e769413 Merge "Start using clang-tools prebuilts for abi diffing tools." am: b49ff309a1
am: 6bbac8082f

Change-Id: I3e4961b722b1de7e457a9ea27bce31d0ef5ea1e6
2018-02-21 18:35:11 +00:00
Jayant Chowdhary
6bbac8082f Merge "Start using clang-tools prebuilts for abi diffing tools."
am: b49ff309a1

Change-Id: Idf7ae900c76a26eb9068c99b61c11e3de65297bf
2018-02-21 18:28:05 +00:00
Jayant Chowdhary
b49ff309a1 Merge "Start using clang-tools prebuilts for abi diffing tools." 2018-02-21 18:16:02 +00:00
Jiyong Park
9e611039c5 Merge "Only emit enabled VNDK libraries" am: d240e3d4e2
am: d5f4f45505

Change-Id: I144dffdf5a750f9ef3b4be79616dd8413a1a2eff
2018-02-21 02:58:57 +00:00
Jiyong Park
d5f4f45505 Merge "Only emit enabled VNDK libraries"
am: d240e3d4e2

Change-Id: Icdaf1d506a1e8a52972c07f7e953878c664c58c8
2018-02-21 02:51:26 +00:00
Treehugger Robot
d240e3d4e2 Merge "Only emit enabled VNDK libraries" 2018-02-21 02:35:31 +00:00
Jayant Chowdhary
a4c6df5d69 Start using clang-tools prebuilts for abi diffing tools.
Bug: 72504455

Test: make -j64

Change-Id: Idbe1142e11147163d0c032fb351e9f3d5614dfb1
2018-02-20 12:44:50 -08:00
Colin Cross
a205f6274e Fix injecting data into a .o file am: 52226ad920
am: e5f32c8091

Change-Id: I4cc5e7aba362185c2a9191964c06266110ddd33c
2018-02-20 18:14:16 +00:00
Colin Cross
4bc286eca9 Fix comment on how java rules handle unknown output files am: f7eac7a2ac
am: a14eee8e4a

Change-Id: Id664781384aaad7bdaf0855addb88025bdd60c4a
2018-02-20 18:13:47 +00:00
Colin Cross
e5f32c8091 Fix injecting data into a .o file
am: 52226ad920

Change-Id: I742e9ffe508d06d1d9f5763f8bdbff2fc844e759
2018-02-20 18:07:10 +00:00
Colin Cross
a14eee8e4a Fix comment on how java rules handle unknown output files
am: f7eac7a2ac

Change-Id: I6fb9e3404055fca835834b6e4b1e52d3a6e3c4fd
2018-02-20 18:06:44 +00:00