Commit graph

27030 commits

Author SHA1 Message Date
Alex Klyubin
7353eabd14 Merge "Improve efficiency of using the DataSource abstraction." 2016-06-06 21:07:52 +00:00
Alex Klyubin
1a39e8eb34 Merge "Switch signapk to apksigner-core." 2016-06-06 19:40:23 +00:00
Alex Klyubin
b02eefacbf Improve efficiency of using the DataSource abstraction.
This adds getByteBuffer and copyTo methods to the DataSource
abstraction. These methods enable the client to avoid unnecessary
copying of the data source's data.

Bug: 27461702
Change-Id: If4e9f902ea75c1ca5c7be0e20c0e7218faf9c504
2016-06-06 11:17:03 -07:00
Dan Willemsen
4b33f51043 Merge "Error on external includes" 2016-06-04 01:03:20 +00:00
Treehugger Robot
6a7cf55a7d Merge "Default to enable tidy warnings in header files." 2016-06-02 23:18:00 +00:00
Treehugger Robot
daf55776be Merge "Add support for TARGET_RECOVERY_BRICK." 2016-06-02 22:44:56 +00:00
Chih-Hung Hsieh
870f087867 Default to enable tidy warnings in header files.
Change-Id: I3831f03facbbd6d17117d82f9ccac49bc2645237
2016-06-02 15:20:05 -07:00
Tao Bao
a062c7e62d Add support for TARGET_RECOVERY_BRICK.
TARGET_RECOVERY_BRICK specifies the file that lists all the partitions
to be bricked under recovery. The file, if present, will be copied to
'$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'.

Bug: 27253717
Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580
(cherry picked from commit 3051f4f11a)
2016-06-02 14:46:53 -07:00
Treehugger Robot
476b5b1616 Merge "Add LOCAL_LOGTAGS_FILES that prebuilts can use" 2016-06-01 23:28:10 +00:00
Jeffrey Vander Stoep
4bc8280a98 Merge "disable unpriv perf by default in user{,debug} builds" 2016-06-01 23:18:46 +00:00
Dan Willemsen
b0a08b874c Add LOCAL_LOGTAGS_FILES that prebuilts can use
Soong modules can define logtags files that need to be combined into
/system/etc/event-log-tags, so add a new LOCAL_LOGTAGS_FILES variable
that can be used to specify *.logtags file outside of LOCAL_SRC_FILES.

Bug: 28989759
Change-Id: I53c5d396dfb7c6006806758f351eb5cdde90fe74
2016-06-01 15:31:44 -07:00
Colin Cross
27032630c0 Merge "Update default NINJA_STATUS to show finished edges" 2016-06-01 04:52:59 +00:00
Colin Cross
520442f053 Merge "Update Android.mk finder to work with Android.bp files" 2016-06-01 04:52:47 +00:00
Dan Willemsen
b09e644e1d Merge "Add Soong tools to PATH" 2016-06-01 02:37:19 +00:00
Dan Willemsen
60d9c673d7 Add Soong tools to PATH
Change-Id: I8f8649106df4ba7cefbfa37a724ebe0635d90b76
2016-05-31 18:32:35 -07:00
Treehugger Robot
fcaae6bee8 Merge "Allow arm prebuilts for x86_arm builds" 2016-05-31 22:08:15 +00:00
Daniel Micay
f2ac912b19 disable unpriv perf by default in user{,debug} builds
Bug: 29054680

Change-Id: If04bc63fc366006cde842a50b7c764f89d7449a6
2016-05-31 17:43:48 -04:00
Dan Willemsen
b40d9ece5f Allow arm prebuilts for x86_arm builds
But only for static and shared libraries -- we disable building other
types of modules for arm, so don't support the prebuilts for them
either.

This is needed so that we can build these libraries under Soong, and
expose them to Make using BUILD_PREBUILT.

Bug: 27526885
Change-Id: I4f6ec922aed37591b6257b7022b81fb65d05b0fe
2016-05-31 14:01:34 -07:00
Colin Cross
b9dd243b1c Update default NINJA_STATUS to show finished edges
Update default NINJA_STATUS that includes percentage to match
6c2c2eecbf

Change-Id: I5694308abe26b71999d944c40962d59d50a73077
2016-05-31 12:38:04 -07:00
Colin Cross
4cbf8eb9f5 Update Android.mk finder to work with Android.bp files
The Android.mk finder should stop traversing when it finds an Android.bp
file, and any Android.soong.mk file at the same path should be included.

Update filter-soong-makefiles to accept a mixed list of Android.bp files
and Android.mk files, convert Android.bp files to Android.soong.mk files
if they exist, and ignore Android.mk files that have an Android.bp file.

Update first-makefiles-under to use the new --dir syntax for
findleaves.py and search for both Android.bp and Android.mk files.

Update all-makefiles-under and all-named-subdir-makefiles to search for
both Android.bp and Android.mk files.

Change-Id: Iddc51bf84593d5de3add02f2b2c065da08962af4
2016-05-30 13:42:19 -07:00
Treehugger Robot
40623e2a99 Merge "Add --dir option to findleaves.py" 2016-05-28 00:53:47 +00:00
Colin Cross
9808645cd9 Add --dir option to findleaves.py
findleaves.py needs to be able to search multiple directories for
multiple filenames (Android.bp and Android.mk).  Add support for a new
--dir= option to specify one or more directories to search, and then
treat any remaining options as filenames.  If no directories are
specified, fall back to treating only the last option as a filename and
the rest as directories.

Change-Id: Ie879facd49192c6b4fafae070ad00eb21b1faa32
2016-05-27 16:05:10 -07:00
Alex Klyubin
fa1da6c311 Switch signapk to apksigner-core.
This switches signapk's APK signing from its own signing logic to that
offered by apksigner-core library. OTA update package signing logic
remains inside signapk codebase.

Bug: 27461702
Change-Id: Ibf8435c555fe3f2b621d5189e7ae44f79082c810
2016-05-27 14:45:51 -07:00
Alex Klyubin
ce4c9d7108 Merge "Improve DataSource interface." 2016-05-27 20:00:59 +00:00
Alex Klyubin
85f004c6c5 Merge "Store entry alignment information in APK." 2016-05-27 19:57:11 +00:00
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
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
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
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
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
576fd3ebb9 Merge "Double quote some statements for zsh compatibility" 2016-05-23 22:17:35 +00:00
Colin Cross
7b31dd1094 Merge "Error on USE_CLANG_PLATFORM_BUILD=" 2016-05-23 22:05:27 +00:00
Treehugger Robot
c11ae6c569 Merge "Add LOCAL_CTS_GTEST_LIST_EXECUTABLE" 2016-05-23 21:18:58 +00:00
Alex Klyubin
ac68c28831 Merge "Improve concurrency for JAR entry inspection requests." 2016-05-23 19:26:14 +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
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
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
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
49a4be8130 Merge "Add fake libart" 2016-05-18 21:05:42 +00:00
Treehugger Robot
ac7a7bb0ba Merge "Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS" 2016-05-18 20:45:19 +00:00