Commit graph

1261 commits

Author SHA1 Message Date
David Brazdil
467a10c261 Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-13 00:52:05 +00:00
Steven Moreland
e2c90abd90 Merge "aidl: -ninja -> --ninja"
am: 9721ee965e

Change-Id: I9ac08d786f2055810f2fd8fef33139c9b49154b7
2018-07-06 17:24:51 -07:00
Steven Moreland
385442d399 aidl: -ninja -> --ninja
Bug: 110967839
Test: AIDL's runtests.sh
Change-Id: I785d39846a477c7edb91db477a0dfa046d823cbf
2018-07-06 11:35:09 -07:00
David Brazdil
afb4d4cf8c Merge "Fix unzip on sdk_mac build"
am: 2986542f65

Change-Id: I422250d37866c56fed294a288bb1b7a8084372e8
2018-07-02 06:20:16 -07:00
David Brazdil
c06f48a21d Fix unzip on sdk_mac build
Recent CL added a flag to an unzip command which does not restore
the timestamps of extracted files. This is necessary because the
extracted files are the output of the rule and thus the timestamp
must be newer than the timestamp of the inputs.

Unfortunately, the sdk_mac build has an old version of UnZip (5.52
vs 6.0) which does not support the flag. Replace it with find|touch.

Test: m
Change-Id: Ib1f218af4547a1d604b46e68b6ef50d45cb91ee9
2018-07-02 11:19:53 +01:00
David Brazdil
dfd096870d Merge "Refactor hiddenapi rules to share common code"
am: 9b53066762

Change-Id: I2fc45e8d861aff3a2e4ab5ca6ccf1ba44bb29c6c
2018-06-29 04:40:17 -07:00
David Brazdil
9b53066762 Merge "Refactor hiddenapi rules to share common code" 2018-06-29 11:33:09 +00:00
David Brazdil
d9a9e981ce Merge "Adjust arguments of hiddenapi tool"
am: dadcb9ced2

Change-Id: I952877c22a547aacbe248e2411f5b2628a164133
2018-06-29 01:46:18 -07:00
David Brazdil
dadcb9ced2 Merge "Adjust arguments of hiddenapi tool" 2018-06-29 08:40:55 +00:00
Sundong Ahn
04d7ae2ff5 Merge "Support java sdk libraries"
am: 3dbb886cda

Change-Id: I7e61484fd12db60a7a18a4559b8ae38cb463eeef
2018-06-28 20:31:17 -07:00
Treehugger Robot
3dbb886cda Merge "Support java sdk libraries" 2018-06-29 02:51:43 +00:00
David Brazdil
6b60b2151e Refactor hiddenapi rules to share common code
Java modules built with make and Soong currently invoke `hiddenapi`
with their own rules. Refactor the definitions so that Soong uses
make's definition. This will be useful for a subsequent CL which
needs to invoke `hiddenapi` on all boot dex files simultaneously.

Bug: 79409988
Test: m
Change-Id: I85105e650605d37c3ee8200d7f0d40c297756fcb
2018-06-28 18:14:30 +01:00
David Brazdil
57b1e546a0 Adjust arguments of hiddenapi tool
The `hiddenapi` build tool now expects the first argument to be
a command name. Change its build rule accordingly.

Bug: 79409988
Test: make
Change-Id: I7e34331c487f490d1de6a10c4139768e9774f03e
2018-06-28 18:14:30 +01:00
Pirama Arumuga Nainar
783c0bd833 Merge "Do not set entry-point for Windows"
am: 645b8db09a

Change-Id: Ia4982902151b800b58a3cfa488ccfddecb6aa662
2018-06-27 13:26:34 -07:00
Pirama Arumuga Nainar
b448834e96 Do not set entry-point for Windows
Bug: http://b/62424007

This breaks 64-bit Windows executables.  Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.

Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start.  (There are some failed tests, though).

Change-Id: I1dea9137c79c5f26b493640cfae0856c1a7ea301
2018-06-27 11:28:33 -07:00
Colin Cross
bbbcf1c01e Merge "Disable standalone relocation packer"
am: effbc370dc

Change-Id: Ie72c24415f13f0960413f61d515b793ab780125a
2018-06-26 10:50:11 -07:00
Colin Cross
effbc370dc Merge "Disable standalone relocation packer" 2018-06-26 17:40:57 +00:00
Chih-hung Hsieh
fb21c07d84 Merge "Filter out clang-tidy unknown arguments."
am: 875691cf89

Change-Id: I213cba2633df3d5de2ecc072ca4569f894c64ee8
2018-06-26 10:03:15 -07:00
Chih-hung Hsieh
875691cf89 Merge "Filter out clang-tidy unknown arguments." 2018-06-26 16:51:40 +00:00
Colin Cross
979f9f9b18 Disable standalone relocation packer
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer.  Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.

This will also prevent relocation packing on prebuilt shared
libraries.

Also enables relocation packing on Darwin since lld will work on
Darwin.

Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
2018-06-26 00:35:46 +00:00
Nelson Li
f6cfd5e360 Merge "Revert "Revert "Build System: Validate AndroidTest.xml Configs"""
am: d3ef2822cc

Change-Id: Id57e37bd69958c9e6cfc178414ef9a5a84842d25
2018-06-25 17:30:59 -07:00
Treehugger Robot
d3ef2822cc Merge "Revert "Revert "Build System: Validate AndroidTest.xml Configs""" 2018-06-26 00:24:50 +00:00
Chih-Hung Hsieh
b02e447775 Filter out clang-tidy unknown arguments.
Bug: 110538415
Test: build with WITH_TIDY=1
Change-Id: I77cd5dec834215fa22742eae6d96aabecadd11ab
2018-06-25 13:49:36 -07:00
Nelson Li
a2a8b9ba11 Revert "Revert "Build System: Validate AndroidTest.xml Configs""
This reverts commit 054f210fd5.

Reason for revert: Revert it again since BUG of 109736180 already be fixed.
                   Local verified for different build targets of
                   walleye_coverage-userdebug, marlin_coverage-userdebug
                   and make sure they can build pass.
BUG: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test

BUG: 73082610
Test: cd packages/apps/DocumentsUI/tests/; mma
      Modify AndroidTest.xml to a not well-formed xml; mma
      Then, it should build fail.
      atest -v DocumentsUITests

Change-Id: Iadfcb28a4e3f685a66697de21f57ca5bdb8b7c9e
2018-06-25 06:03:41 +00:00
Tom Cherry
281d343dfb Merge "Reland: Verify init scripts for correctness during build"
am: bdaaab2e39

Change-Id: Ia0cdc6067e357e97ab88b1dd2690358ead4edd18
2018-06-21 13:12:54 -07:00
Tom Cherry
fc97764dd5 Reland: Verify init scripts for correctness during build
Relanding with change to not run on the darwin build since host init
verifier is not possible there.

Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
      PRODUCT_COPY_FILES, or TARGET_PREBUILT

Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442
2018-06-21 11:16:25 -07:00
Yifan Hong
d76c44b72f Merge "Revert "Verify init scripts for correctness during build""
am: 560890b29f

Change-Id: I5f69d68b9b604ba76a5bf4fa0a9fd453f62ccde6
2018-06-20 16:03:47 -07:00
Yifan Hong
560890b29f Merge "Revert "Verify init scripts for correctness during build"" 2018-06-20 22:56:39 +00:00
Tom Cherry
d15e50022f Revert "Verify init scripts for correctness during build"
This reverts commit 03303f97be.

Reason for revert: Mac build

Change-Id: Iadd76491307534fde81d3d917876c603a0658fb9
2018-06-20 22:45:14 +00:00
Tom Cherry
cd7535c00d Merge "Verify init scripts for correctness during build"
am: 8075746865

Change-Id: I96b7f88a3e568e147c3e3f68709e4c7eb3b525c6
2018-06-20 10:09:01 -07:00
Tom Cherry
8075746865 Merge "Verify init scripts for correctness during build" 2018-06-20 17:06:11 +00:00
Jiyong Park
56be041198 Merge "Export SDK library names"
am: dabf1a0c5a

Change-Id: Iad2365d9bb02de297dd06cd2bc36c288a043dfc2
2018-06-20 01:14:56 -07:00
Jiyong Park
1cf8ee619b Export SDK library names
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.

The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.

Bug: 77575606
Test: m -j

Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
2018-06-20 11:50:06 +09:00
Sundong Ahn
a059c71348 Support java sdk libraries
Sdk addon has been allowed for libraries built with Android.mk. But some
of the libraries included in the Sdk addon should be built with
java_sdk_library. module-stubs-files function is modified for supporting
java_sdk_library modules.

Bug:77577799
Test: make -j
Change-Id: If289e5aa5b5016901ff9b69da8fc7f7d8138a456
2018-06-19 10:02:25 +09:00
Dan Willemsen
e89f54c0dd Merge "Restrict / from module names"
am: eb0a09acf3

Change-Id: I840b8d8efe35858121e7fcf4eef6e6da23a4b63f
2018-06-18 15:58:44 -07:00
Dan Willemsen
ac92659e0f Restrict / from module names
Since this is a directory separator, it causes a good deal of
strangeness in the build whenever we include a module name in a path.

It becomes particularly problematic if used together with ".."

Test: build_test on downstream branches
Change-Id: I344eca0db3346cd6ffabff767c34159c85ebc051
2018-06-16 14:15:50 -07:00
Tom Cherry
03303f97be Verify init scripts for correctness during build
Bug: 36970783
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
      PRODUCT_COPY_FILES, or TARGET_PREBUILT

Change-Id: Ia98793776b365733ca8f0174dc228326a6edf041
2018-06-14 14:21:06 -07:00
Dan Willemsen
0a423b51f2 Merge "Restrict characters in module names"
am: 0f494a025b

Change-Id: Id79395cf3e1af934110eaed3ae1abc084c04aab0
2018-06-12 17:12:50 -07:00
Dan Willemsen
bbe6a022a3 Restrict characters in module names
See the Changes.md documentation for more information.

Test: build_test on downstream branches
Change-Id: I1524b1dbfd44a7feac3b9a212f37986f870bd837
2018-06-12 13:48:49 -07:00
Chih-Hung Hsieh
221572a7b4 Merge "Use llvm-{objcopy,strip} when clang lld is used." am: 87d8dc4d4e
am: ef534a7888

Change-Id: I25f238309ed4da074ca908d6636fca8cf4f4963f
2018-06-07 21:07:50 -07:00
Treehugger Robot
87d8dc4d4e Merge "Use llvm-{objcopy,strip} when clang lld is used." 2018-06-08 00:42:03 +00:00
Colin Cross
b71570fc8c Merge "Revert "Revert "Remove desugar support""" am: 50ad8c97ac
am: 9f0e4a430f

Change-Id: I8ef7ec33394af7fd7afab4455f79a932ee774b92
2018-06-07 15:49:03 -07:00
Treehugger Robot
50ad8c97ac Merge "Revert "Revert "Remove desugar support""" 2018-06-07 20:31:22 +00:00
Nelson Li
4b7dade5c3 Merge "Revert "Build System: Validate AndroidTest.xml Configs"" am: 79b6e2618a
am: 43b7525dc2

Change-Id: I0e852325f119a19edeeed99c09ccc9ebbebb9230
2018-06-06 21:49:01 -07:00
Treehugger Robot
79b6e2618a Merge "Revert "Build System: Validate AndroidTest.xml Configs"" 2018-06-07 02:50:32 +00:00
Colin Cross
8bd764fc7a Merge "Revert "Remove desugar support"" am: bc965aa7a9
am: d175a15e0e

Change-Id: Ie7b75adc17b93d7a5dd6c288dcb3e7adc4b676df
2018-06-06 16:26:07 -07:00
Colin Cross
f44ef3af81 Merge "Remove desugar support" am: 541782f2b4
am: 2d744245a6

Change-Id: I62911d24463cf9c508eee0c5ffca1ebd6b4386f0
2018-06-06 15:25:22 -07:00
Chih-Hung Hsieh
9546d67fe9 Use llvm-{objcopy,strip} when clang lld is used.
* PRIVATE_OBJCOPY is still set to objcopy and used
  when llvm-objcopy cannot replace objcopy.

Bug: 80093681
Test: build/boot with USE_CLANG_LLD=true
Change-Id: I4bd8a53f74864b49e007f0c5f1b0f4b16e121135
2018-06-06 15:09:58 -07:00
Colin Cross
cf010858b6 Revert "Revert "Remove desugar support""
This reverts commit cf7407ed61.

Reason for revert: includes art veridex fix this time

Change-Id: I970b51e6a6c6f377cfe793f029d9674e7ee0ed15
2018-06-06 21:46:25 +00:00
Colin Cross
cf7407ed61 Revert "Remove desugar support"
This reverts commit bfad2c070c.

Reason for revert: broke art veridex build

Change-Id: I0dcc34102ee18b054c2247ae0e2698aca645c667
2018-06-06 21:42:21 +00:00