Commit Graph

7284 Commits

Author SHA1 Message Date
Martijn Coenen
22071ca4b4 Add trace flag for cpp/Java AIDL generation.
The AIDL code generator can now include trace code in every generated
AIDL call. We don't want to enable this by default for all interfaces
for two reasons:
1) Potential performance overhead
2) For Java targets, the code depends on @hide APIs in android.os.Trace,
   and I haven't found a clean way to determine whether a target is
   allowed to use @hide stuff in the SDK. LOCAL_PRIVATE_PLATFORM_APIS
   is almost it, but it's not set for the core framework (which is
   exactly one of the things we'd like to trace).

Bug: 74416314
Test: verify correct code is generated when flag is set
Change-Id: Ic6ab8aee3e708207813da3e803911a844ff3e52b
Merged-In: Ic6ab8aee3e708207813da3e803911a844ff3e52b
2018-03-27 07:22:55 +00:00
Ryan Prichard
05206118dc Remove an extraneous space character.
The space prevents "repo upload" from running on my machine:

    $ repo upload .
    [COMMIT 50e35bea87f0] Use Soong modules for the NDK's extra STL libraries
    [FAILED] gofmt
      FILES: ('cc/cc.go',)    <standard input>
    [FAILED] repohooks for platform/build/soong failed
    FATAL: Preupload failed due to above error(s).
    For more info, please see:
    https://android.googlesource.com/platform/tools/repohooks/

Bug: none
Test: repo upload
Change-Id: I6b5de8f5d4edb38ca26a999e561df10262844b3d
2018-03-27 05:09:37 +00:00
Justin Yun
f0249c882e Set __ANDROID_API__ for vendor modules to vndk version. am: 732aa6afdf
am: e194a56a01

Change-Id: I1093e689f14f029db238bf4a838c0def8493a502
2018-03-27 01:37:27 +00:00
Justin Yun
e194a56a01 Set __ANDROID_API__ for vendor modules to vndk version.
am: 732aa6afdf

Change-Id: I46307083f839553ad474bf30c439fa3a9373e1e5
2018-03-27 01:31:42 +00:00
Chih-Hung Hsieh
3ede294729 Switch to clang 7.0
* Suppress more noisy new warnings at global level.
* Add -no-pie to partial link .o files, with -r.
* Revert workaround of b/72706604, no need of
  -Wl,-plugin-opt,-emulated-tls
* Filter out clang 7.0 unknown flag "-Wno-extended-offsetof"

Bug: 72706604
Bug: 72412006
Test: make checkbuild
Change-Id: I7ff45465c4bd771991f42b40f68dc35586045656
2018-03-26 18:04:47 -07:00
Rajeev Kumar
6f80dfd857 Merge "Add product_variables.Use_lmkd_stats_log." into pi-dev
am: f65a99cee1

Change-Id: I235eb051a60b01039f4ee2b3dcb41802fa81b797
2018-03-26 23:33:53 +00:00
Tobias Thierer
c9e360ac8a javadoc/droidoc: Don't add .jar files to sourcepath.
javadoc expects directories on the sourcepath, not jar files.
The original commit 88b607994a148f4af5bffee163e39ce8296750c6
in 2009 was already passing the jar files, and every revision
since then seems to have kept this habit through cargo cult.

This CL removes the superfluous jar file arguments from the
sourcepath argument to javadoc.

Test: Treehugger
Bug: 76436487

Change-Id: I3a8503ae089cd6657a698c0552dc194156311849
2018-03-27 00:33:05 +01:00
Justin Yun
732aa6afdf Set __ANDROID_API__ for vendor modules to vndk version.
When building vendor modules with BOARD_VNDK_VERSION=current, the
API of the vendor modules will be current PLATFORM_VNDK_VERSION.
__ANDROID_API_FUTURE__ will be used as before if the version is a
CODENAME.

If BOARD_VNDK_VERSION is not "current", that means the VNDK version
of the vendor modules is BOARD_VNDK_VERSION.

Bug: 74833244
Test: Build and check boot.
Change-Id: I383c76a36101e39c70575b463880b52d3e9d90bb
2018-03-27 08:21:19 +09:00
TreeHugger Robot
f65a99cee1 Merge "Add product_variables.Use_lmkd_stats_log." into pi-dev 2018-03-26 23:14:23 +00:00
Martijn Coenen
10224739d4 Add trace flag for cpp/Java AIDL generation. am: eab15645fe
am: 85a70e8369

Change-Id: Ie2bea1ee84ce4a773cefea3548d27796e5cf2115
2018-03-26 22:58:09 +00:00
Martijn Coenen
85a70e8369 Add trace flag for cpp/Java AIDL generation.
am: eab15645fe

Change-Id: Ia5d3724387ec0a1e0b1c5c80b02958512fc3bfec
2018-03-26 22:51:34 +00:00
Logan Chien
916c9e16c1 [automerger skipped]Use PlatformVndkVersion to find ABI dump by default
am: b7515421d1  -s ours

Change-Id: I0bb1c2e529839c18331c7a0ab9ed8530edefcb82
2018-03-26 21:27:58 +00:00
Martijn Coenen
eab15645fe Add trace flag for cpp/Java AIDL generation.
The AIDL code generator can now include trace code in every generated
AIDL call. We don't want to enable this by default for all interfaces
for two reasons:
1) Potential performance overhead
2) For Java targets, the code depends on @hide APIs in android.os.Trace,
   and I haven't found a clean way to determine whether a target is
   allowed to use @hide stuff in the SDK. LOCAL_PRIVATE_PLATFORM_APIS
   is almost it, but it's not set for the core framework (which is
   exactly one of the things we'd like to trace).

Bug: 74416314
Test: verify correct code is generated when flag is set
Change-Id: Ic6ab8aee3e708207813da3e803911a844ff3e52b
Merged-In: Ic6ab8aee3e708207813da3e803911a844ff3e52b
2018-03-26 09:59:02 +02:00
Jiyong Park
4d71601d40 Handle prebuiltDepTag for java modules am: 924d35b926
am: 14e1557f03

Change-Id: I8a441c40f35fd16d8dd225bf59f4a82f41e866e2
2018-03-24 07:48:44 +00:00
Jiyong Park
14e1557f03 Handle prebuiltDepTag for java modules
am: 924d35b926

Change-Id: Ib1cc7b593a0749a83b67a8443a19b333a43eba65
2018-03-24 07:42:11 +00:00
Logan Chien
2682eba786 Merge "Use PlatformVndkVersion to find ABI dump by default" am: 8e10408ccf
am: 4ce86efb67

Change-Id: I365c12d947a1624e35cf9fb0480409870c315e85
2018-03-24 06:53:51 +00:00
Rahul Chaudhry
eae3a62827 Merge "Revert "Disable relocation_packer and migrate to SHT_RELR sections."" am: fd5059ff10
am: c9e08d397c

Change-Id: I845618811532032f7d9193e954ecf750041f2aa6
2018-03-24 06:52:47 +00:00
Jiyong Park
924d35b926 Handle prebuiltDepTag for java modules
When there is a prebuilt java lib defined and there is a java library
with the same name, the reverse dependency from the java lib to the
prebuilt lib is added. However, the java library didn't recognize the
dependency type and causes error. Fixing the problem by not panicking on
such dependency.

Test: m -j
Test: m -j dist DIST_DIR=out/dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Merged-In: I79673b2bb382100e42c5336e8041daa8c86fa857
Change-Id: I79673b2bb382100e42c5336e8041daa8c86fa857
(cherry picked from commit 46dbf9c63e)
2018-03-24 15:12:37 +09:00
Logan Chien
b7515421d1 Use PlatformVndkVersion to find ABI dump by default
This commit changes "current" to ctx.DeviceConfig.PlatformVndkVersion().
This change make it possible to place ABI dumps in
prebuilts/abi-dumps/vndk/${version} instead of
prebuilts/abi-dumps/vndk/current.

If BOARD_VNDK_VERSION is not specified or is equal to "current",
PLATFORM_VNDK_VERSION (either PLATFORM_SDK_VERSION or
PLATFORM_VERSION_CODENAME) will be chosen.  Currently,
BOARD_VNDK_VERSION is always equal to "current" because both system and
vendor images are built in a single source tree.

In the future, if the system image and vendor images are separately
built in different source trees, BOARD_VNDK_VERSION will be set to other
values and we should respect that value.

Test: Create an ABI dump under
prebuilts/abi-dumps/vndk/${PLATFORM_VNDK_VERSION}, make some ABI
breakages, and see whether the checks are working.

Bug: 76036094

Merged-In: I6242e0c71ebd9acd5c4a3497c67539cb3e6663f3
Change-Id: I6242e0c71ebd9acd5c4a3497c67539cb3e6663f3
(cherry picked from commit a8f5158594)
2018-03-23 16:31:04 -07:00
Logan Chien
4ce86efb67 Merge "Use PlatformVndkVersion to find ABI dump by default"
am: 8e10408ccf

Change-Id: I797c676bb76bd07bd53e877c675d1d645a77719c
2018-03-23 21:42:57 +00:00
Treehugger Robot
8e10408ccf Merge "Use PlatformVndkVersion to find ABI dump by default" 2018-03-23 21:31:27 +00:00
Rahul Chaudhry
c9e08d397c Merge "Revert "Disable relocation_packer and migrate to SHT_RELR sections.""
am: fd5059ff10

Change-Id: I09344ed0beaf3ad01bd090490970149f7856feb1
2018-03-23 20:03:42 +00:00
Rajeev Kumar
423e2db0f9 Add product_variables.Use_lmkd_stats_log.
Bug: 74443701
Test: Tested manually
Merged-In: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf
Change-Id: I512d1a4b5e796b459a7ecdd3649ffd147bcf4cbf
(cherry picked from commit 1e6056a380)
2018-03-23 19:47:10 +00:00
Rahul Chaudhry
fd5059ff10 Merge "Revert "Disable relocation_packer and migrate to SHT_RELR sections."" 2018-03-23 19:45:22 +00:00
Rahul Chaudhry
ccf4f83887 Revert "Disable relocation_packer and migrate to SHT_RELR sections."
This reverts commit fa00dfda13.

Reason for revert: New Build Breakages in git_pi-dev-plus-aosp-without-vendor/aosp_walleye-userdebug and git_pi-dev-plus-aosp/aosp_crosshatch-userdebug

Change-Id: Iec9e695cccc3f206df67f0c01cfd4c2c3023dcec
2018-03-23 19:02:56 +00:00
Rahul Chaudhry
b007f56ba8 Merge "Disable relocation_packer and migrate to SHT_RELR sections." am: 71bfb262b9
am: 6ad7e6a605

Change-Id: Ic0c3e14c3e1b3e91f45572134e45b9f865180d07
2018-03-23 17:53:05 +00:00
Rahul Chaudhry
6ad7e6a605 Merge "Disable relocation_packer and migrate to SHT_RELR sections."
am: 71bfb262b9

Change-Id: I561ea145f3a152ae2096c9e54ac68054ee26cba5
2018-03-23 17:47:28 +00:00
Treehugger Robot
71bfb262b9 Merge "Disable relocation_packer and migrate to SHT_RELR sections." 2018-03-23 17:28:08 +00:00
Dan Willemsen
22d5f40e59 [automerger skipped]Allow proto properties in cc/java_defaults
am: b785b61621  -s ours

Change-Id: I444e25311229d0e6a422e514c8f23b318715b87f
2018-03-23 06:27:45 +00:00
Dan Willemsen
b785b61621 Allow proto properties in cc/java_defaults
(cherry picked from commit 6424d17a2d)

Bug: 73175642
Test: Add proto.canonical_path_from_root: true in a cc_defaults
Test: Add proto.canonical_path_from_root: true in a java_defaults
Merged-In: I9ddfc8af0025705a34b6e487225f1f98915054c3
Change-Id: I9ddfc8af0025705a34b6e487225f1f98915054c3
2018-03-22 20:51:04 -07:00
Nan Zhang
de256c1d21 Add Python protobuf support. am: b8fa197878
am: 4d626eadf8

Change-Id: I415cc70fc5b1648b91e1a9cd6db78517ddaeff18
2018-03-23 01:48:07 +00:00
Nan Zhang
4d626eadf8 Add Python protobuf support.
am: b8fa197878

Change-Id: I7ad1f240191c560934aab7980cd3eac6fe625f8e
2018-03-23 01:42:05 +00:00
Colin Cross
9b1ffa16de Make zipsync list file output empty if there are no files am: 628d55d7ef
am: 7aa81ff0b4

Change-Id: I23762b3ef0d2a81661ed0fdd97c4d83cbb4f0c30
2018-03-22 22:58:52 +00:00
Nan Zhang
b8fa197878 Add Python protobuf support.
Python protobuf std libs will be wrapped in final binary/test par file.

Bug: b/70568913
Test: manually create real examples.
Change-Id: I7376ec9175f3e03d1adbd20858a7f74e826387ad
2018-03-22 15:56:51 -07:00
Colin Cross
7aa81ff0b4 Make zipsync list file output empty if there are no files
am: 628d55d7ef

Change-Id: I0aa3b5661faf93015bccd3cf12f5a4c70a261a3a
2018-03-22 22:48:13 +00:00
Rahul Chaudhry
fa00dfda13 Disable relocation_packer and migrate to SHT_RELR sections.
Proposal for adding SHT_RELR sections in the generic-abi is at
https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg

Comparison with relocation_packer for aosp_marlin-userdebug:
$ du -B1 -s */out/target/product/marlin/system
 996958208      base/out/target/product/marlin/system
1008340992      no_pack/out/target/product/marlin/system
 997801984      sht_relr/out/target/product/marlin/system

base contains a build with current settings.
no_pack contains a build with relocation_packer disabled.
sht_relr contains a build with SHT_RELR sections enabled.

relocation_packer was saving 11,382,784 bytes (no_pack - base).
SHT_RELR sections are saving 10,539,008 bytes (no_pack - sht_relr).

Bug: None
Test: Built aosp_marlin-userdebug image, boots on device.
Test: Built aosp_x86_64-userdebug image, boots in emulator.
Change-Id: I448dc95baa4976b68ce2659b80498539426775f9
2018-03-22 15:17:34 -07:00
Ivan Lozano
67106e5309 [automerger skipped]Merge "Add minimal-runtime support for integer overflows." into pi-dev
am: 3cc0480d16  -s ours

Change-Id: I59714852429ef37ad0ca35b4d0a741c5dd1967a1
2018-03-22 20:39:37 +00:00
Ivan Lozano
74235d4b58 [automerger skipped]Add minimal-runtime support for integer overflows.
am: 954f430e97  -s ours

Change-Id: I84e4008ed216ed81f2ba0afe6a39707a87db3aac
2018-03-22 20:38:15 +00:00
Ivan Lozano
3cc0480d16 Merge "Add minimal-runtime support for integer overflows." into pi-dev 2018-03-22 20:17:38 +00:00
Colin Cross
628d55d7ef Make zipsync list file output empty if there are no files
The make javac rule uses [ -s srcjar-list ] to decide whether or
not to run javac.  zipsync was putting a trailing "\n" in the
list file, so the file was never empty.  There was one case of a
package that contained no source files (so java-source-list was
empty) and had a res directory with an xml file that declared no
resources (so aapt.jar was created but empty).  The 1-byte
srcjar-list file caused javac to run and error with:
javac: no source files

Test: m checkbuild
Change-Id: I26b394b66bf81e4f5abbd27e4dc06bee1d9420a8
2018-03-22 13:02:39 -07:00
Logan Chien
786b6f4a99 [automerger skipped]Merge changes I406c5bef,Ibde685d7,I1c09412d,I9bec563c,I34f06abd into pi-dev
am: 7921d2d265  -s ours

Change-Id: I408bb83b90457368d852ed7aba2041e0abaebccc
2018-03-22 07:49:39 +00:00
Logan Chien
7921d2d265 Merge changes I406c5bef,Ibde685d7,I1c09412d,I9bec563c,I34f06abd into pi-dev
* changes:
  Allow VNDK extensions under vendor or device
  Add unit tests for android/neverallow.go
  Extract failIfErrored() to android/testing.go
  RemoveFromList() should remove all matches
  Add unit tests for android/util.go
2018-03-22 07:36:51 +00:00
Victor Khimenko
1913574ba6 Merge "Make arm_on_x86 symmetric" am: 9f66306050
am: 069a412cdc

Change-Id: Ie345c0303e5f7bb54c698e14ac4d9a793cbea9a8
2018-03-22 06:29:02 +00:00
Victor Khimenko
069a412cdc Merge "Make arm_on_x86 symmetric"
am: 9f66306050

Change-Id: I3d935f0f36d415fdffc5e92c4b678dc13ef46b4e
2018-03-22 06:23:33 +00:00
Victor Khimenko
9f66306050 Merge "Make arm_on_x86 symmetric" 2018-03-22 06:13:34 +00:00
Nan Zhang
297cae9545 Fix the issue for incorrect logic of "no_framework_libs" am: 9cbe677024
am: e715f2de51

Change-Id: I6e462f02e33c52811031999f90a56e3de1b0abc9
2018-03-22 05:20:32 +00:00
Nan Zhang
e715f2de51 Fix the issue for incorrect logic of "no_framework_libs"
am: 9cbe677024

Change-Id: I2daf3e97d3458250f6b075317f6bef80a1172599
2018-03-22 05:14:30 +00:00
Nan Zhang
9cbe677024 Fix the issue for incorrect logic of "no_framework_libs"
Fortunately Android stubs jar generation didn't get affected by this
issue since "framework" and "ext" were explicitly added to the "libs"
property:

https://cs.corp.google.com/aosp-master/frameworks/base/Android.bp?rcl=72fa61b3250529504a9f5dab2e927a0d2e873f58&l=876

Test: m -j android_stubs_current and check the build.ninja to see if
addtional "framework" and "lib" are shwon there.
Bug: b/70351683

Change-Id: I9f1eec0d7f8baff6361efef064b7a09a5b2d4a58
2018-03-21 17:56:39 -07:00
Victor Khimenko
5eb8ec1e72 Make arm_on_x86 symmetric
We only define arm_on_x86 in the x86 code, but sometimes arm code needs
to know that it's working in the emulated mode, too.

Test: CtsRsCppTestCases

BUG=75971275

Change-Id: I99564fbe9aeb284e2f11ffb593b18536a7755ea5
2018-03-21 20:30:54 +01:00
Ivan Lozano
954f430e97 Add minimal-runtime support for integer overflows.
Adds Soong support for -fsanitze-minimal-runtime when using
the integer overflow sanitizers. This makes the crashes due to these
sanitizers less mysterious.

Bug: 64091660
Test: Compiled and checked the generated compiler commands
Test: Checked program that overflows for the abort reason

Change-Id: Ieeceaf6c35c8371592952d3b8b977aefc11601c5
Merged-In: Ieeceaf6c35c8371592952d3b8b977aefc11601c5
(cherry picked from commit 30c5db2f47)
2018-03-21 10:04:53 -07:00