Commit Graph

27184 Commits

Author SHA1 Message Date
Alex Klyubin
7b977ea0e9 Improve DataSource interface.
1. This adds way to obtain a DataSource which represents a region of
   data contained in the DataSource.
2. This fixes a design bug in "feed" method where the size parameter
   was an int instead of long.
3. This fixes a bug in ByteBufferDataSource where its mSize field was
   a long instead of an int (ByteBuffer's length cannot be more than
   2^31).

Bug: 27461702
Change-Id: Ib0812784beb581f19d2412e667b8bd018f0a3c78
2016-05-27 10:28:52 -07:00
Colin Cross
323396993c Merge "Fix mm and mmm in Android.bp directories"
am: 8ed91b6624

* commit '8ed91b66240d3071a42365737f4cd5c7dbe601e1':
  Fix mm and mmm in Android.bp directories

Change-Id: Id8d80175a2ab27c6ea5a969eb37ad12726e68376
2016-05-27 00:26:30 +00:00
Treehugger Robot
8ed91b6624 Merge "Fix mm and mmm in Android.bp directories" 2016-05-27 00:23:24 +00:00
Colin Cross
8642525726 Fix mm and mmm in Android.bp directories
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file.  Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.

Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
2016-05-26 15:56:21 -07:00
Dan Willemsen
dfcf2e0cbb Merge "Remove unnecessary variables"
am: 2eb45d9ab2

* commit '2eb45d9ab29b0923aeeea51ae0c58e32fea23941':
  Remove unnecessary variables

Change-Id: I645c34edb93ce262d245867c4efea2d409366a09
2016-05-26 21:52:54 +00:00
Dan Willemsen
2eb45d9ab2 Merge "Remove unnecessary variables" 2016-05-26 21:49:01 +00:00
Dan Willemsen
056609ccfe Remove unnecessary variables
These are all either recently unused due to the removal of CFLAGS/etc,
or have been exported by Soong and are no longer necessary.

Change-Id: I5930d43fda21acc8202b3d8ea010fbefb6ae4cf1
2016-05-25 21:23:20 -07:00
Colin Cross
a36de73331 Merge "Remove USE_SOONG=false option"
am: 5413fb4b3e

* commit '5413fb4b3e2310be8568f5024fdc4d0900bf9f9e':
  Remove USE_SOONG=false option

Change-Id: I83c44d57917a10838dd9626d382b4e992c58f822
2016-05-26 00:57:54 +00:00
Colin Cross
5413fb4b3e Merge "Remove USE_SOONG=false option" 2016-05-26 00:46:39 +00:00
Colin Cross
a61d672529 Remove USE_SOONG=false option
Soong is always required to build now.

Change-Id: I4e310e98e912b370ebf980bf609f04212a7e9a50
2016-05-25 12:55:43 -07:00
Dan Willemsen
062e30b422 Error on external includes
To make the build hermetic, all include files should be located within
the source tree (or generated as output).

There was an Android.mk that was adding /usr/include to its include
path.

Change-Id: I4c40b908314239c8239c7835d592e409248a3150
2016-05-24 16:40:11 -07:00
Dan Willemsen
7fe992c0cc Add NATIVE_TESTS class, move host native tests
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.

So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].

Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.

Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.

Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d
2016-05-24 12:43:16 -07:00
Alex Klyubin
26f00cda4b Store entry alignment information in APK.
Data of uncompressed APK entries is often aligned to a multiple of 4
or 4096 in the APK to make it easier to mmap the data. Unfortunately,
the current method for achieving alignment suffers from two issues:
(1) the way it uses the Local File Header extra field is not compliant
with ZIP format (for example, this prevents older versions of Python's
zipfile from reading APKs: https://bugs.python.org/issue14315), and
(2) it does not store information about the alignment multiple in the
APK, making it harder/impossible to preserve the intended alignment
when rearranging entries in the APK.

This change solves these issues by switching to a different method for
aligning data of uncompressed APK entries. Same as before, alignment
is achieved using Local File Header entry field. What's different is
that alignment is achieved by placing a well-formed extensible data
field/block into the extra field. The new field/block contains the
alignment multiple (e.g., 4 or 4096) as well as the necessary padding
(if any). Compared to the original alignment method, the new method
uses 6 more bytes for each uncompressed entry.

Bug: 27461702
Change-Id: I8cffbecc50bf634b28fca5bc39eb23f671961cf9
2016-05-23 17:46:18 -07:00
Vishwath Mohan
29c2c4db19 Merge "Double quote some statements for zsh compatibility"
am: 576fd3ebb9

* commit '576fd3ebb92d2200ea8c02cd6f3b7ba21ced9030':
  Double quote some statements for zsh compatibility

Change-Id: I30ff4c9d527907772d11d557097fafb2cbeeb590
2016-05-23 22:25:45 +00:00
Vishwath Mohan
576fd3ebb9 Merge "Double quote some statements for zsh compatibility" 2016-05-23 22:17:35 +00:00
Colin Cross
893f32053f Merge "Error on USE_CLANG_PLATFORM_BUILD="
am: 7b31dd1094

* commit '7b31dd10948abccc9c8b2f949edbe84de15702d5':
  Error on USE_CLANG_PLATFORM_BUILD=

Change-Id: Iea742a5cd8230587656460cc5ad6b979ba2189a5
2016-05-23 22:17:34 +00:00
Colin Cross
7b31dd1094 Merge "Error on USE_CLANG_PLATFORM_BUILD=" 2016-05-23 22:05:27 +00:00
Dan Willemsen
8b0af507d9 Merge "Add LOCAL_CTS_GTEST_LIST_EXECUTABLE"
am: c11ae6c569

* commit 'c11ae6c569c26607a165e6fe491008bdd272d981':
  Add LOCAL_CTS_GTEST_LIST_EXECUTABLE

Change-Id: Id305d60c8db698fa90b09fb547f606b62bb37ad9
2016-05-23 21:28:36 +00:00
Treehugger Robot
c11ae6c569 Merge "Add LOCAL_CTS_GTEST_LIST_EXECUTABLE" 2016-05-23 21:18:58 +00:00
Alex Klyubin
304cb0f015 Merge "Improve concurrency for JAR entry inspection requests."
am: ac68c28831

* commit 'ac68c28831f3947e47a924cb677b740975dbbc6f':
  Improve concurrency for JAR entry inspection requests.

Change-Id: I144f7c3f60e8a95785fcdd380e98df867a84bd70
2016-05-23 19:31:14 +00:00
Alex Klyubin
ac68c28831 Merge "Improve concurrency for JAR entry inspection requests." 2016-05-23 19:26:14 +00:00
Dan Willemsen
315621eee0 Merge "Move to a single clang unknown flags list"
am: 06935290ac

* commit '06935290ac12d03a5a4f287f4743ada996305235':
  Move to a single clang unknown flags list

Change-Id: Ia02030229a089e531c7258780fb7837240e2b47f
2016-05-23 17:40:42 +00:00
Dan Willemsen
06935290ac Merge "Move to a single clang unknown flags list" 2016-05-23 17:30:18 +00:00
Dan Willemsen
02268f01df Move to a single clang unknown flags list
Soong is using a single list of unknown clang flags for all
architectures, instead of the per-architecture list here. Collapse this
down to a single list as well so that it can be verified against the
Soong list, and eventually replaced by the Soong version.

Change-Id: If43cd892105da5155907c05965a74b835920a369
2016-05-19 15:33:54 -07:00
Dan Willemsen
c78767f66d Merge "Remove (C|CPP|CONLY|LD)FLAGS checked by Soong"
am: 15409e8f20

* commit '15409e8f20195edce9ccda48836082e4c6bad4f8':
  Remove (C|CPP|CONLY|LD)FLAGS checked by Soong

Change-Id: I412ec02d9825f6f6c857df84744b198e7ce9901a
2016-05-19 22:18:04 +00:00
Dan Willemsen
15409e8f20 Merge "Remove (C|CPP|CONLY|LD)FLAGS checked by Soong" 2016-05-19 22:09:46 +00:00
Colin Cross
b267cbabba Error on USE_CLANG_PLATFORM_BUILD=
A blank USE_CLANG_PLATFORM_BUILD= on the command line for make causes
confusion between make and kati.  make ignores writes to variables set
on the command line, so envsetup.mk cannot set it to true,
USE_CLANG_PLATFORM_BUILD is still empty in soong.mk, and soong.variables
gets DeviceUsesClang: false.  kati gets USE_CLANG_PLATFORM_BUILD= in its
environment instead of on its command line, so envsetup.mk when parsed
by kati sets USE_CLANG_PLATFORM_BUILD=true.

Error out early if USE_CLANG_PLATFORM_BUILD is not true or false after
attempting to set it to true if it is empty.

Change-Id: I0e2731315711db9a6ac6ea2bf49c88bccacd35f7
2016-05-19 13:39:37 -07:00
Vishwath Mohan
7d35f001e1 Double quote some statements for zsh compatibility
Two eval commands did not enclose their arguments in double quotes, and
this broke compatibility on zsh - preventing lunch from running to
completion. This CL adds the double quotes and fixes the issue.

Change-Id: I5ed884b455e2e61182f6c29fb807ed92372af039
2016-05-19 12:38:16 -07:00
Dan Willemsen
84eb1d2cca Merge "Windows: Stop adding to GLOBAL_LD_DIRS"
am: e23a49157f

* commit 'e23a49157f34a3c3f82115a117908d32b14a6262':
  Windows: Stop adding to GLOBAL_LD_DIRS

Change-Id: I8b834feed668c311169ec5da294414f47d4175be
2016-05-19 01:23:22 +00:00
Dan Willemsen
174feb906f Remove (C|CPP|CONLY|LD)FLAGS checked by Soong
At the beginning of every build, Soong has exported its version of these
variables, and has been ensuring that when sorted, the result is the
same. So these variables all have the same flags of the Soong ones, but
may be in different orders. We don't believe any of the remaining order
differences matter. As we remove the Make definitions, the exported
Soong variables will take over.

This only removes lines that change one of these variables:

  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_LDFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_LDFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_LDFLAGS

Many other variables are unnecessary now too, but those will be removed
in another change. For those we can ensure the build.ninja file does not
change, but we expect it to change here due to the ordering differences.

Change-Id: I0bd0778706d02ee27b2784dd8dc6b2c71d37bd3a
2016-05-18 18:10:04 -07:00
Dan Willemsen
e23a49157f Merge "Windows: Stop adding to GLOBAL_LD_DIRS" 2016-05-19 01:09:28 +00:00
Dan Willemsen
cb0bccf423 Merge "Remove trailing newline from TARGET_C_INCLUDES"
am: 6864e3790c

* commit '6864e3790c80d3044307f0d260cf0e2b962ae82d':
  Remove trailing newline from TARGET_C_INCLUDES

Change-Id: I615050a58cca90291f2c07cae4397a711c69e585
2016-05-19 00:05:26 +00:00
Dan Willemsen
3fe3248c36 Windows: Stop adding to GLOBAL_LD_DIRS
Soong does not have the idea of global linking directories, so move the
windows prebuilt library directory to GLOBAL_LDFLAGS instead.

Change-Id: Ie101146f4682cd85924463aa5acaa46869938e6c
2016-05-18 16:50:46 -07:00
Dan Willemsen
6864e3790c Merge "Remove trailing newline from TARGET_C_INCLUDES" 2016-05-18 23:50:27 +00:00
Dan Willemsen
5baaba771c Remove trailing newline from TARGET_C_INCLUDES
In preparation for comparing with the Soong variable.

Change-Id: I159507757ed7678a33a3c94e6d01d170485e251a
2016-05-18 15:38:04 -07:00
Alex Light
c7e74a370a Merge "Add fake libart"
am: 49a4be8130

* commit '49a4be81304d2292bb6bd67ddaabe759d9e8c273':
  Add fake libart

Change-Id: Iacc59ada5b3323c81a8c70464f5634ab722c4f2b
2016-05-18 21:17:09 +00:00
Alex Light
49a4be8130 Merge "Add fake libart" 2016-05-18 21:05:42 +00:00
Dan Willemsen
611211acd4 Merge "Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS"
am: ac7a7bb0ba

* commit 'ac7a7bb0ba7b864a07ceb159dcd6a8b177866fb3':
  Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS

Change-Id: I7e880084b72d90dc4de16fd674692b53b1e67de2
2016-05-18 20:52:31 +00:00
Treehugger Robot
ac7a7bb0ba Merge "Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS" 2016-05-18 20:45:19 +00:00
Dan Willemsen
8308f506ce Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS
We never use it for host modules, and all the target configurations use
the same linker argument. This matches Soong.

Change-Id: Ibcba9a4ce340c7a12306d1fee620a04027c0e292
2016-05-18 12:50:53 -07:00
Alex Light
60c7fd15a8 Add fake libart
Bug: 27775991

Change-Id: I54cbdf2340dcfdd9b3973d9d10c8bd94492736fb
(cherry picked from commit 6da74d8f1f)
2016-05-18 07:58:05 -07:00
Dan Willemsen
f85807f794 Merge "Remove make variables exported from Soong"
am: 30b57cd7d5

* commit '30b57cd7d5459c69fbd4332b988b5e636b529f4d':
  Remove make variables exported from Soong

Change-Id: I2b7a6baf5d8a8b3b0bb52e8fc4b16a5616f8f939
2016-05-18 00:40:31 +00:00
Dan Willemsen
700b0f868e Merge "Pass BUILD_HOST_static to Soong"
am: 3b0990cbdc

* commit '3b0990cbdc941b584fb3000f76607c2a8065b603':
  Pass BUILD_HOST_static to Soong

Change-Id: I8292e35b7ca3fe14133b8675dbf8d6c54736e5aa
2016-05-18 00:40:30 +00:00
Dan Willemsen
30b57cd7d5 Merge "Remove make variables exported from Soong" 2016-05-18 00:36:46 +00:00
Treehugger Robot
3b0990cbdc Merge "Pass BUILD_HOST_static to Soong" 2016-05-18 00:33:07 +00:00
Dan Willemsen
cba1557476 Pass BUILD_HOST_static to Soong
Change-Id: I0ac43a1dedf20e5251e05f12d120d0e6e2e1b1ee
2016-05-17 16:40:03 -07:00
Dan Willemsen
51c38fe13f Merge "Remove redundant clang cppflags"
am: 8bbed5a635

* commit '8bbed5a6350a2a7ca1eb7d0886b783fa5b681180':
  Remove redundant clang cppflags

Change-Id: Ic45e02c74ec154bc74b42dd12df2c162b4a862ce
2016-05-17 19:51:27 +00:00
Dan Willemsen
8bbed5a635 Merge "Remove redundant clang cppflags" 2016-05-17 19:46:23 +00:00
Dan Willemsen
7701eaa5b2 Remove redundant clang cppflags
Cppflags always get added to cflags, so we don't need to duplicate clang
cppflags extras that are already in the clang cflags extras

Change-Id: Ic099f565f20fd993fc0713c033fbc5154373c98f
2016-05-17 00:42:41 -07:00
Shinichiro Hamaji
f562875d0c Merge "Make apks depend on their certificates"
am: f0a465c2cb

* commit 'f0a465c2cb5921762d7d17d65cd7352d0f64c261':
  Make apks depend on their certificates

Change-Id: I1f89af20d7d4cb337a91203631ff68eb654b0e0c
2016-05-17 04:05:46 +00:00