Commit graph

544 commits

Author SHA1 Message Date
Dan Willemsen
544bff0f3f Merge "Use hermetic ckati/makeparallel prebuilts"
am: b8744a26e4

* commit 'b8744a26e45d269c8fdad98d56c5df45984a6d5d':
  Use hermetic ckati/makeparallel prebuilts
2016-03-10 07:28:56 +00:00
Dan Willemsen
1487f31d83 Use hermetic ckati/makeparallel prebuilts
Currently, we're building against the native host version of libc++ and
other headers. Instead, use prebuilts of ckati/makeparallel built with
Soong against the included libc++ and sysroot. Building ckati /
makeparallel doesn't work well in unbundled branches that don't have all
of the libc++ dependencies to do successful host builds.

KATI is default variable defined when running under Kati, don't use it
for other purposes. Use CKATI instead.

Bug: 27533820
Change-Id: I82d66f5e34e3341a3cee4c5c83cd1d9a54d057ff
2016-03-09 17:19:30 -08:00
Mohamad Ayyash
2b4ddff0eb Merge "Hook incremental ext4 image generation into build" into nyc-dev
am: 6a3185f23d

* commit '6a3185f23d820f31cc928d5467eda94f3a93e31c':
  Hook incremental ext4 image generation into build
2016-03-09 21:07:30 +00:00
Mohamad Ayyash
6a3185f23d Merge "Hook incremental ext4 image generation into build" into nyc-dev 2016-03-09 20:56:19 +00:00
Martin Blumenstingl
639cd5b486 Merge "Removed duplicate definition of E2FSCK" am: d7a4e56a87
am: 7b578cbf10

* commit '7b578cbf10aab7460a0cc4e5735870a714ddac1b':
  Removed duplicate definition of E2FSCK
2016-03-08 07:45:51 +00:00
Martin Blumenstingl
764f9339f1 Removed duplicate definition of E2FSCK
Change-Id: I810711ad05e198ee1f9606c37649e80df7b55fa5
2016-03-06 22:38:19 +01:00
Mohamad Ayyash
f876555893 Hook incremental ext4 image generation into build
Allows passing the *.base_fs or *.map files for system and vendor in
INTERNAL_SYSTEM_BASE_FS_PATH and INTERNAL_VENDOR_BASE_FS_PATH variables
respectively.

Internal Design Doc: go/incremental-ext4
BUG: 26839493
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>

Change-Id: Ie57ef6dbfa6084268b6535fe0a673a3b4aaa6e2f
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-03-03 12:07:21 -08:00
Dan Willemsen
76dcd72575 Merge "Remove unused config variables" am: 1dde47d0b6
am: 4914c9b28e

* commit '4914c9b28ede89c2441bb0b87f358e4e629b1bb9':
  Remove unused config variables
2016-03-01 19:46:57 +00:00
Dan Willemsen
d4390d3007 Remove unused config variables
These either don't exist or are not used.

Change-Id: I219e4691337223357797fae47ce112df8428bdfa
2016-03-01 01:14:03 -08:00
Chih-Hung Hsieh
71d8cbd9b6 Use newest clang static analyzers.
* When WITH_STATIC_ANALYZER is set and non-zero, and clang compiler is used,
  call new clang ccc-analyzer or c++-analyzer.
* Otherwise, if WITH_SYNTAX_CHECK is set and non-zero,
  call compiler with -fsyntax-only.
* Replace "--sysroot=path" with "--sysroot path", to work with ccc-analyzer.
* ccc-analyzer executes the original compilation command to generate
  object files before calling clang with --analyze to do static analysis.
* When clang is called with --analyze, macro __clang_analyzer__ is defined.

BUG: 13287788

(cherry picked from commit 765c1ea6d7)

Change-Id: I6e51e51ff4ed3ce514f60d090494dcdf6e520b04
2016-02-26 18:51:26 -08:00
Dan Willemsen
7e57b8ca57 Add 64-bit windows cross-compiles
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.

The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.

  windows-x86/bin   <- defaults to 32-bit executables
  windows-x86/lib   <- 32-bit libraries, like before
  windows-x86/lib64 <- 64-bit libraries
  windows-x86/obj   <- 32-bit intermediates
  windows-x86/obj64 <- 64-bit intermediates

Then modules are registered with the names:

  host_cross_liblog    <- 32-bit, like before
  host_cross_liblog_64 <- 64-bit

Bug: 26957718

(cherry picked from commit 9ecbf83259)

Change-Id: Iab2d36e20d7002568c3534e7781e9ac8ab21a4a9
2016-02-26 18:51:26 -08:00
Chih-hung Hsieh
2fd8d9da17 Merge "Use newest clang static analyzers."
am: 82953d72ac

* commit '82953d72acc9775d6b58808abde1a825b4f7cffb':
  Use newest clang static analyzers.
2016-02-12 17:41:34 +00:00
Chih-Hung Hsieh
765c1ea6d7 Use newest clang static analyzers.
* When WITH_STATIC_ANALYZER is set and non-zero, and clang compiler is used,
  call new clang ccc-analyzer or c++-analyzer.
* Otherwise, if WITH_SYNTAX_CHECK is set and non-zero,
  call compiler with -fsyntax-only.
* Replace "--sysroot=path" with "--sysroot path", to work with ccc-analyzer.
* ccc-analyzer executes the original compilation command to generate
  object files before calling clang with --analyze to do static analysis.
* When clang is called with --analyze, macro __clang_analyzer__ is defined.

BUG: 13287788

Change-Id: I5edb25b52998d871385dd000778db2ce83224078
2016-02-11 16:43:51 -08:00
Dan Willemsen
6863fe23a9 Merge "Add 64-bit windows cross-compiles"
am: 8c4f25f12f

* commit '8c4f25f12fe0fe8265fb8849cf7cb2fc482ae7e5':
  Add 64-bit windows cross-compiles
2016-02-09 21:14:21 +00:00
Dan Willemsen
8c4f25f12f Merge "Add 64-bit windows cross-compiles" 2016-02-09 20:54:10 +00:00
Dan Willemsen
3714f7876c Merge "Disable java when JAVA_NOT_REQUIRED is set"
am: 74606c40cd

* commit '74606c40cdf0552c58b07b1477e79690e6037930':
  Disable java when JAVA_NOT_REQUIRED is set
2016-02-09 05:26:08 +00:00
Dan Willemsen
fdf89cd575 Disable java when JAVA_NOT_REQUIRED is set
Change-Id: Id3056cde93302be20000bf7af33aeed0fa8fdf52
2016-02-08 17:02:48 -08:00
Dan Willemsen
9ecbf83259 Add 64-bit windows cross-compiles
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.

The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.

  windows-x86/bin   <- defaults to 32-bit executables
  windows-x86/lib   <- 32-bit libraries, like before
  windows-x86/lib64 <- 64-bit libraries
  windows-x86/obj   <- 32-bit intermediates
  windows-x86/obj64 <- 64-bit intermediates

Then modules are registered with the names:

  host_cross_liblog    <- 32-bit, like before
  host_cross_liblog_64 <- 64-bit

Bug: 26957718
Change-Id: I9f119411acb43e973ec1e6bca3c1dc291c91556c
2016-02-05 16:33:18 -08:00
Colin Cross
4b7cd7f43e Merge "Move PDK selection into config.mk" am: 655dd3ea76
am: 3f238d8cda

* commit '3f238d8cda78990a90509206ccd60db7a2f0945a':
  Move PDK selection into config.mk
2016-02-02 20:40:49 +00:00
Colin Cross
655dd3ea76 Merge "Move PDK selection into config.mk" 2016-02-02 20:34:30 +00:00
Colin Cross
6b66fcf378 Move PDK selection into config.mk
config.mk needs to know TARGET_BUILD_PDK in order to select prebuilt
tools.  Move the selection of TARGET_BUILD_PDK into config.mk.

Change-Id: I1f73c92917887f27259b2db64b3779a2fe0df162
2016-02-01 18:05:07 -08:00
Colin Cross
715172fa26 Merge "Don\'t force color diagnostics outside of ninja" am: 41fed8c082
am: 01394871fd

* commit '01394871fdbc25316a87edca4a09b1075707e572':
  Don't force color diagnostics outside of ninja
2016-02-01 19:40:11 +00:00
Colin Cross
41fed8c082 Merge "Don't force color diagnostics outside of ninja" 2016-02-01 18:57:50 +00:00
Ying Wang
dd71c85a45 Support to build with AAPT2
To build with AAPT2, set "USE_AAPT2=true".
TODO: Support split apks and generated resources from other than renderscript.

Bug: 25958912
Change-Id: I19b1a038824ce5b2a3d3ffadbce3173c845193fc
2016-01-25 22:41:43 -08:00
Colin Cross
1398f9d30d Merge "Set flag when using sdk tools in place" am: 41ee5fc07a
am: 11a87113ef

* commit '11a87113ef232c4f615a4c8df74dc28da17bec1e':
  Set flag when using sdk tools in place
2016-01-22 00:16:17 +00:00
Colin Cross
d3f3ab77fd Set flag when using sdk tools in place
New version of build/ execute the tools from prebuilts/sdk/tools in
place, old versions copy them to $(HOST_OUT_EXECUTABLES).  build/ and
prebuilts/sdk often use mixed versions, set a flag that
prebuilts/sdk/tools/Android.mk can use to determine when it is using an
old build/ directory.

Change-Id: Iad2f96c35203fd3b0976946d229bfa8ab4acb150
2016-01-20 16:08:49 -08:00
Michael Wright
9dca07efdc Only fail on known-bad grep configurations.
Rather than exit when any grep configuration is set, only fail on ones we know
to be bad. This lets people use benign configuration options such as
--color=auto and --directories=skip.

Bug: 21260618
Change-Id: I3641c7895df4b43e36a983ea6ad877969cd38bf5
2016-01-18 18:13:03 -08:00
Dan Willemsen
543623c2b6 Merge "Add -Werror=date-time to target builds" am: 5c3f812507
am: 9f41040b00

* commit '9f41040b000bf2ea98b70eea6f60a41385d55fe3':
  Add -Werror=date-time to target builds
2016-01-16 20:18:54 +00:00
Dan Willemsen
5c3f812507 Merge "Add -Werror=date-time to target builds" 2016-01-16 20:13:30 +00:00
Colin Cross
dbd43849fb Don't force color diagnostics outside of ninja
Building with USE_NINJA=false and piping build output to a file will
result in ANSI color codes in the build output.  Only force ANSI codes
on when building with ninja, which strips the ANSI codes when writing
build output to a non-TTY.

Change-Id: Ifd2fb53799fd99c23b7ad91cdb84d943bf707db0
2016-01-13 14:05:54 -08:00
Ying Wang
f0ebe165b9 Generate .c for .y and .l
- For .l/.y source files, generate .c files; for .ll/.yy source files,
  generate c++ files.
- Simplified the rules by adding the generated sources to
  my_generated_sources.
- Simplified generated header file naming by always using .h extension
  with bison's "--defines=" option.
- Removed the unnecesarry conditional inclusion to the generated
  headers. Bison already automatically generates such things.

Bug: 26492989
Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
2016-01-12 21:07:27 -08:00
Ying Wang
64088f2459 Generate .c for .y and .l
- For .l/.y source files, generate .c files; for .ll/.yy source files,
  generate c++ files.
- Simplified the rules by adding the generated sources to
  my_generated_sources.
- Simplified generated header file naming by always using .h extension
  with bison's "--defines=" option.
- Removed the unnecesarry conditional inclusion to the generated
  headers. Bison already automatically generates such things.

Bug: 26492989
Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
2016-01-11 17:41:56 -08:00
Dan Willemsen
eff0611096 Add -Werror=date-time to target builds
The lack of a changing timestamp improves reproducibility of builds, and
helps create smaller OTAs.

Bug: 24204119
Change-Id: I68acfb53be962ffd5c488337517dadb950a13b6f
2016-01-08 16:29:50 -08:00
Shinichiro Hamaji
91bb1b61f8 Merge "Have symbol versions in .so.toc files" am: c610c42b99
am: bb1207f99c

* commit 'bb1207f99c392d0abc3739475a14e3075215ceca':
  Have symbol versions in .so.toc files
2016-01-07 05:23:34 +00:00
Shinichiro Hamaji
2b0caa3a67 Have symbol versions in .so.toc files
Use readelf --dyn-syms instead of nm, filtering out addresses
and sizes of symbols.

Bug: 26412928
Change-Id: I061ffb428076a79c7b255381ae4d4f8a8e7a4bd7
2016-01-06 15:13:25 +09:00
Dan Willemsen
84d7513417 Merge "Prevent changes to COMMON_GLOBAL_C(PP)FLAGS" am: d443abf1aa
am: c4ba49dbec

* commit 'c4ba49dbecfcba5db1976cf52447aaa927741a76':
  Prevent changes to COMMON_GLOBAL_C(PP)FLAGS
2016-01-05 05:53:50 +00:00
Dan Willemsen
d443abf1aa Merge "Prevent changes to COMMON_GLOBAL_C(PP)FLAGS" 2016-01-05 05:47:43 +00:00
Piotr Jastrzebski
052a00f64e Use core-oj alongside core-libart wherever required.
With some core classes moved to separate core-oj jar
we need to use the new jar.

(cherry picked from commit 89b94c827f)

Change-Id: I025c0adc70535bf23def3ab0ce28a1bfaef72514
2015-12-24 10:10:55 +00:00
Dan Willemsen
93b8a1294c Prevent changes to COMMON_GLOBAL_C(PP)FLAGS
Reorder the definitions of the core cflags so that we can prevent device
configurations from changing the global C(PP)FLAGS.

There is no reason for devices to be configuring the global cflags -- if
something needs to change for a particular device, that flag should be
defined in the BoardConfig.mk, then used in the individual makefiles
where it is needed. The common global flags also affected host tools,
which should not change between device configurations.

Bug: 26165350
Change-Id: Icece4505ce3d2a9168087d802953378534018d47
2015-12-18 12:57:57 -08:00
Dan Willemsen
c915b13a9c Merge "Define __BRILLO__ only for target modules" am: e63d3328df
am: 05177f7cb1

* commit '05177f7cb1e98b23a0c4b8899ba636ef7228e62b':
  Define __BRILLO__ only for target modules
2015-12-16 23:44:55 +00:00
Dan Willemsen
5e637bd05d Merge "Move __BRILLO__ to the core build system" am: 3931873418
am: 152755aa81

* commit '152755aa81354c7c931cb77c71ba3757a40a0cb6':
  Move __BRILLO__ to the core build system
2015-12-16 23:44:49 +00:00
Dan Willemsen
de6494b9ae Define __BRILLO__ only for target modules
__ANDROID__ is only defined for target modules, do the same for
__BRILLO__.

Change-Id: Ie1417e1a5b21c051acf05b2bd3bdb3ddd31be878
2015-12-16 15:04:51 -08:00
Dan Willemsen
16e7e0f556 Move __BRILLO__ to the core build system
In preparation for locking down COMMON_GLOBAL_CFLAGS.

Bug: 26165350
Change-Id: Ifdfb7808c1e1b624ffb0f99ab443ec2c5503a81c
2015-12-16 14:28:21 -08:00
Shinichiro Hamaji
7034d9beae Merge "Reduce unnecessary rebuilds of .dex files with restat=1" am: 542aa57f1d
am: 0d4a0a9dd5

* commit '0d4a0a9dd5c1f3528b611862cb9fa81313028d1b':
  Reduce unnecessary rebuilds of .dex files with restat=1
2015-12-15 08:17:56 -08:00
Shinichiro Hamaji
f972a4a980 Reduce unnecessary rebuilds of .dex files with restat=1
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.

For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).

We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.

Performance:

$ m && touch \
  frameworks/base/core/java/com/google/android/util/Procedure.java \
  && time m
Before: 3m48s
After: 1m46s

Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
2015-12-14 19:07:34 +09:00
Alex Klyubin
c1b31821ef Merge "Make signapk use Conscrypt." am: 7884a63731
am: dfd2199ef6

* commit 'dfd2199ef66dcc162a0165f9a34652ae2877538d':
  Make signapk use Conscrypt.
2015-12-11 10:47:26 -08:00
Alex Klyubin
9667b18f23 Make signapk use Conscrypt.
This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.

Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.

Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
2015-12-11 08:36:42 -08:00
Colin Cross
7eae1599e2 Merge "Remove extra definition of AIDL" am: 77f411e116 am: b275dd1623
am: 934e131465

* commit '934e1314658b30aa8ca22766a3404ff6955d4ece':
  Remove extra definition of AIDL
2015-12-04 17:16:34 +00:00
Colin Cross
a8b896856a Remove extra definition of AIDL
AIDL is defined in the sometimes-prebuilt tools section, remove the
extra definition that was overriding it.

Change-Id: I677bf46475fd5fd4a9258c77d91ecee806e5f205
2015-12-03 13:33:11 -08:00
Colin Cross
0559943edb Merge "Use prebuilt tools in place" am: 50e0646dbe am: 8581e58b3b
am: 64747f5101

* commit '64747f5101f3a4f2385faa493643a513bd67a557':
  Use prebuilt tools in place
2015-12-03 20:24:30 +00:00