Commit graph

837 commits

Author SHA1 Message Date
Jaekyun Seok
7ace0d60ef Prevent abuse of property overrides
To prevent abuse of PRODUCT_*PROPERTY_OVERRIDES and
ADDITIONAL*PROPERTIES, the following rules should be applied.

- Mark PRODUCT_*PROPERTY_OVERRIDES readonly after reading product
 specs.
- Disallow any changes on ADDITIONAL*PROPERTIES from product specs
 and BoardConfig.mk.
- Mark ADDITIONAL*PROPERTIES readonly before reading Android.mk
 files.

Test: building succeeded on marlin-userdebug.
Bug: 34116668
Change-Id: I93d8de086ec85ba787165a156bdcc7df04310be1
(cherry picked from commit 294286d95c)
2017-01-25 13:00:25 +09:00
Jaekyun Seok
294286d95c Prevent abuse of property overrides
To prevent abuse of PRODUCT_*PROPERTY_OVERRIDES and
ADDITIONAL*PROPERTIES, the following rules should be applied.

- Mark PRODUCT_*PROPERTY_OVERRIDES readonly after reading product
 specs.
- Disallow any changes on ADDITIONAL*PROPERTIES from product specs
 and BoardConfig.mk.
- Mark ADDITIONAL*PROPERTIES readonly before reading Android.mk
 files.

Test: building succeeded on marlin-userdebug.
Bug: 34116668
Change-Id: I93d8de086ec85ba787165a156bdcc7df04310be1
2017-01-24 17:55:31 +09:00
Dan Willemsen
cf324af6b8 Remove generated java source post clean logic
Just move the proto and renderscript sources into their own directories
-- the entire directory is wiped if the file list changes since the
command line will change. So we can just enable/disable pulling sources
from those directories based on whether there were files in the list or
not.

Bug: 30947985
Test: m -j java
Test: Remove a proto file from a java lib, ensure the generated source
      is not included.
Change-Id: If7529979de6fa62a651933a3a974f47b033851d6
2016-12-22 10:37:31 -08:00
Colin Cross
7a14ec7968 Don't build tests in normal builds
Treehugger will catch test breakages before they are submitted, it
is no longer necessary for all developers to wait for all tests to
build.

Test: m -j
Bug: 32221202
Change-Id: Ia1ed939fa28a80df10248b9f5c2f298b1e5d2053
2016-12-20 16:18:04 -08:00
Dan Willemsen
56c6a9d1ff Remove variables exported by Soong
LLVM_RELEASE_VERSION is unused from envsetup.sh and during product
config loading.  LLVM_PREBUILTS_VERSION is still used in envsetup.sh, so
needs to stay.

Delay reading core/clang/config.mk until after Soong's variables are
read so that we don't need a copy of LLVM_PREBUILTS_BASE.

Test: Compare build-aosp_flounder.ninja
Change-Id: I85b5836a2230838c8f3766fb19c6108fc5c9ca50
2016-12-14 16:27:08 -08:00
Dan Willemsen
01a19a116f Move some configuration from main.mk to config.mk
When dumping make configuration (dump-many-var, dump-var-*), we only
load config.mk, not main.mk. One of the first things that main.mk does
is to include config.mk, so these moves are safe.

Turning off the implicit rules and other make configuration / sanity
checks should happen in all cases, so move them to config.mk

Move dont_bother_rules to config.mk so that it can be used by the ninja
configuration (which is moving in a later change). Move dont_bother into
the kati section, since it's not used elsewhere.

Test: m clean
Test: get_build_var dont_bother_goals
Change-Id: Ib3ec8aa8eebcaf743d2cdcc31f89827c4e8470a1
2016-11-10 03:32:37 +00:00
Colin Cross
e402dd8bb8 Merge "Revert "Revert "Check prebuilt sources during checkbuild"""
am: 515f43bb6e

Change-Id: Ia749b34011e02df8ceb9d0fe0e4aba34da743cb1
2016-10-30 22:14:23 +00:00
Colin Cross
01e1b8ff4b Revert "Revert "Check prebuilt sources during checkbuild""
This reverts commit 409ea88c47.

Bug: 32332829
Change-Id: Ifc8a511762cb44b455cc821f5ac712c294c321c6
2016-10-27 22:10:55 +00:00
Colin Cross
96fdb76947 Merge "Revert "Check prebuilt sources during checkbuild""
am: 526ddfb172

Change-Id: I2bd28f5b35b27e2339eb2952b9e3acdd6a470773
2016-10-26 23:32:47 +00:00
Colin Cross
409ea88c47 Revert "Check prebuilt sources during checkbuild"
This reverts commit ec8fae6f2e.

Revert this until a few oddball branches can be fixed.

Bug: 32332829
Change-Id: Ic95fa50e36cb32a4d29bf765b1f3d8384140fb0b
2016-10-26 23:25:57 +00:00
Colin Cross
84ba353fd1 Merge "Check prebuilt sources during checkbuild"
am: 0f26c64ef5

Change-Id: I961221a3e7cdcd00ea4dcbb1c88a36f138962113
2016-10-26 19:47:57 +00:00
Colin Cross
ec8fae6f2e Check prebuilt sources during checkbuild
Add prebuilt files as dependencies during checkbuild.  This will flag
prebuilt modules that have files that don't exist as errors, and also
fix building soong modules with make native, etc.

Bug: 32332829
Test: m -j checkbuild
Test: m -j host
Change-Id: Ia4e22cb640978c181de039202baf02f4fb5a94d5
2016-10-22 00:00:40 +00:00
Dan Willemsen
829ab04c9b Merge "Replace product variable stashing with .KATI_READONLY" am: 157ad04cfc am: 9d2208441c
am: 34d8c31258

Change-Id: Idc49bb5ad4890c368762cd73ac34e995b2633d1d
2016-10-06 23:53:30 +00:00
Dan Willemsen
c1f17ffc7d Replace product variable stashing with .KATI_READONLY
Instead of using rot13 / rot26, use the Kati extension to mark these
variables as readonly.

Move $(strip) for a few variables to before they're marked readonly. Use
a different variable for modifications to BOARD_KERNEL_CMDLINE in
build/core/Makefile.

Test: build/tools/kati_all_products.mk on AOSP and internal master
Test: build-aosp_bullhead.ninja the same before / after
Change-Id: If98b24af763831a9c5c2de38037a69ab1bf9e023
2016-10-06 10:50:26 -07:00
Colin Cross
46e7aa81e0 Merge "Enable toc optimization for host builds" am: 5d8c73e373 am: 4276c12d20
am: e4e04c2f92

Change-Id: I4db91a8f0893faa317ec7afb2e3f5d84dfcc91cf
2016-10-04 21:08:47 +00:00
Colin Cross
d2ff157159 Enable toc optimization for host builds
The toc optimization had been disabled for host builds to ensure that
the timestamp of the final binary changed whenever its implementation
changed, in order to support rerunning host tools that were modified
during incremental builds.  However, only the final install rule must be
re-run to update the timestamp, and not the link rule.

Update the shared library install dependencies to use normal
dependencies instead of order-only dependencies for host modules, and
then enable the the toc optimization for host modules.  If the
implementation of a library changes it will be reinstalled, and
libraries or binaries that depend on it will also be reinstalled.

Bug: 26015464
Test: m -j; touch art/disassembler/disassembler_x86.cc; m -j, verify
      out/host/linux-x86/bin/oatdump is updated
Change-Id: I0a14decc1994eb55ad269d841943aef66e320c63
2016-10-03 17:53:44 -07:00
David Zeuthen
27ac0e34fe resolve merge conflicts of c36ab42 to nyc-mr1-dev-plus-aosp
Change-Id: Iaf78fb6c723955fd92cc64194cb32bba73a9dafb
2016-09-29 14:25:03 -04:00
David Zeuthen
2ce63edab7 Update for new Android Verified Boot (AVB).
This updates the build system for the new Android Verified Boot
codebase. As this is based on Brillo Verified Boot, this change replaces
the existing BVB support.

Android Verified Boot is enabled by the BOARD_AVB_ENABLE variable

 BOARD_AVB_ENABLE := true

This will make the build system create vbmeta.img which will contain a
hash descriptor for boot.img, a hashtree descriptor for system.img, a
kernel-cmdline descriptor for setting up dm-verity for system.img and
append a hash-tree to system.img.

Additionally, the descriptors are left in boot.img and system.img so a
third party can create their own vbmeta.img file linking - using the
option --chain_partition - to these images. If this is not needed
footers can be erased using the 'avbtool erase_footer' command. It's
also harmless to just leave them in the images.

By default, the algorithm SHA256_RSA4096 is used with a test key from
the AVB source directory. This can be overriden by the
BOARD_AVB_ALGORITHM and BOARD_AVB_KEY_PATH variables to use e.g. a
4096-bit RSA key and SHA-512:

 BOARD_AVB_ALGORITHM := SHA512_RSA4096
 BOARD_AVB_KEY_PATH := /path/to/rsa_key_4096bits.pem

To prevent rollback attacks, the rollback index should be increased on a
regular basis. The rollback index can be set with the
BOARD_AVB_ROLLBACK_INDEX variable:

 BOARD_AVB_ROLLBACK_INDEX := 5

If this is not set, the rollback index defaults to 0.

The variable BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS can be used to specify
additional options passed to 'avbtool make_vbmeta_image'. Typical
options to be used here include '--prop', '--prop_from_file', and
'--chain_partition'.

The variable BOARD_AVBTOOL_BOOT_ADD_HASH_FOOTER_ARGS can be used to
specify additional options passed to 'avbtool add_hash_footer' for
boot.img. Typical options to be used here include '--hash_algorithm' and
'--salt'.

The variable BOARD_AVBTOOL_SYSTEM_ADD_HASHTREE_FOOTER_ARGS can be used
to specify additional options passed to 'avbtool add_hashtree_footer'
for systems.img. Typical options to be used here include
'--hash_algorithm', '--salt', and '--block_size'.

BUG=31264226
TEST=Manually tested on edison-eng by inspecting {boot, system,
  vbmeta}.img in out/ directory as well as their counterparts in
  the IMAGES/ directory of edision-target_files-eng.zeuthen.zip

Merged-In: Ic9a61cfc65c148b12996e57f04da5432eef6b982

Change-Id: I97042655bca15e7eac899f12c5bada2f6184d307
2016-09-29 11:19:36 -04:00
Dan Willemsen
83aba3a7ab Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de
am: 8459bbca6f

Change-Id: I22da0f1703995c4734a72901abe2dbcee62c1406
2016-09-20 01:01:38 +00:00
Dan Willemsen
121e284b46 Fix link_type checking
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
2016-09-15 14:40:39 -07:00
Dan Willemsen
196f190592 Merge "Fix shared library install dependencies outside of /system" am: 0b3f97b0d6 am: f9fc0ea6fe
am: 7c4ced5337

Change-Id: Ibc3c3fca687f7541d779d390e3cbc6123f88e149
2016-09-13 22:51:35 +00:00
Dan Willemsen
5bdd08b2d9 Fix shared library install dependencies outside of /system
For properly picking the shared library install dependencies, HOST_OUT
and HOST_CROSS_OUT are necessary so that we don't add a dependency
between Linux and Windows. But for target modules, we must use
TARGET_OUT_ROOT instead of TARGET_OUT, or modules in /data and /vendor
won't have proper install dependencies.

Bug: 31462199
Test: m bionic-unit-tests; manual diff of generated ninja file
Change-Id: I828fa2664613296cc6c431813f5657abffdd2b8f
2016-09-13 13:47:06 -07:00
Ryan Campbell
5a63fe6856 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb
am: 577eab3323

Change-Id: I36a4fc67e87e8561486111263b0d6b6ed1bdefcc
2016-09-13 20:01:23 +00:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00
Dan Willemsen
7d72b5ef71 Merge "Fix GET-INSTALL-PATH to work with Soong" am: 6b9aa6938d am: 9fc9cac0ac
am: 0e642c3e55

Change-Id: Ic608a11b5b7ccf78f75bbf4ce7086ed92e1b9e14
2016-08-15 21:26:31 +00:00
Dan Willemsen
9fc9cac0ac Merge "Fix GET-INSTALL-PATH to work with Soong"
am: 6b9aa6938d

Change-Id: I9f433cb383846ec6ccb8e39be4b30110d60d54fd
2016-08-15 21:17:33 +00:00
Dan Willemsen
53e3899222 Fix GET-INSTALL-PATH to work with Soong
This was printing all of the Soong modules in addition to the modules
defined in the ONE_SHOT_MAKEFILE. So replicate what we did with
MODULES-IN-* with GET-INSTALL-PATH-IN-* and update all the users.

Bug: 30191725
Change-Id: Ib1e4bf00f64d7a3e8cd91f44eaf1ff82fdfbf162
2016-08-12 05:10:51 +00:00
Alexey Polyudov
74140b99c4 Merge "introduce AUX build class of targets" am: 556526bf95 am: 755391d77e
am: 30937fbde2

Change-Id: I73aa67afa95b8c45c5a4e310a340bc709d0b3da0
2016-08-02 22:55:18 +00:00
Alexey Polyudov
755391d77e Merge "introduce AUX build class of targets"
am: 556526bf95

Change-Id: I52b4b3a561ceb9c1fbe71ce75a4ef4aa252a9665
2016-08-02 22:50:21 +00:00
Alexey Polyudov
ccdc311b33 introduce AUX build class of targets
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable

Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-02 08:06:28 -07:00
Dan Albert
dee194df54 Merge changes from topic \\\'soong-sysroots\\\' am: 65de8e446c am: 01efd46bca
am: cce7b4f00a

Change-Id: Ia5f4f59a5d53c852905a50f1a54d1ec3b9e6e2a7
2016-07-28 16:12:25 +00:00
Dan Albert
01efd46bca Merge changes from topic \'soong-sysroots\'
am: 65de8e446c

Change-Id: I8c8951364c5ddd6f99a27111acdb72097ab5db42
2016-07-28 16:06:24 +00:00
Dan Albert
c61174aac1 Add a phony target for the NDK sysroots.
`make ndk` will build all the NDK sysroots.

Test: make ndk
Bug: http://b/27533932
Change-Id: Ic2f5bf61f8911f7b8d08a473f2fe0576f3e06224
2016-07-28 00:06:20 -07:00
Colin Cross
64755b9ec5 Merge \\\"Remove Android.bp logic from makefiles\\\" am: 8bc18d35ec am: 7dc26e8aa8
am: 95ebfddd5f

Change-Id: I22073f2e6788db034f7a904600100d590efec272
2016-07-12 16:31:52 +00:00
Colin Cross
7dc26e8aa8 Merge \"Remove Android.bp logic from makefiles\"
am: 8bc18d35ec

Change-Id: I50c8180c8297feb48ff5c5eba10670b36f631921
2016-07-12 16:20:29 +00:00
Colin Cross
65543c7bc2 Remove Android.bp logic from makefiles
When Soong was optional, the make build system needed extra complexity
to ignore Android.mk files that had an associated Android.bp file.  Now
that Soong is required and the Android.mk files that were obsoleted by
an associated Android.bp file have been removed, remove all of the logic
that found associated Android.bp files.  Android.mk files and Android.bp
files are now handled independently.

Change-Id: Ia6643d151b920689219ca8abd59ede44d230ba35
2016-07-11 16:57:33 -07:00
Alex Light
a3e8e9c6f3 resolve merge conflicts of 3f7c348 to nyc-mr1-dev-plus-aosp
Bug: 29278988

Change-Id: Icffb9a280311c7d3c45f096243ddf18f7ebecd9d
2016-06-29 15:43:54 -07:00
Alex Light
4e358ab2c3 Add system_other partition, install odex files
For AB devices, support flashing two system partitions for factory use.
The normal system image on one partition, but without dex preopt. And a
system_other image that just contains the odex files. The dex files will
not be stripped out of the system image, in case the second system
partition is wiped.

Setting BOARD_USES_SYSTEM_OTHER_ODEX := true in the BoardConfig.mk
enables this behavior.

One can control which directories are placed in system_other by the
SYSTEM_OTHER_ODEX_FILTER configuration variable. Currently we default
to only copying only app and priv-app odexs.

Bug: 29278988
Change-Id: I7f4e87da919e7dc6a89fd8c668193cd4e98631bc
2016-06-24 11:07:15 -07:00
Dan Willemsen
32b36a8819 Merge "Add NATIVE_TESTS class, move host native tests" am: e72fc63901
am: 10461b78f0

* commit '10461b78f0955d9dba8d32045d1e35ff0f9a5c8c':
  Add NATIVE_TESTS class, move host native tests

Change-Id: Ia11b54676d3b33e58c177a5a375f29233657524e
2016-06-07 00:09:39 +00:00
Dan Willemsen
e72fc63901 Merge "Add NATIVE_TESTS class, move host native tests" 2016-06-06 23:59:23 +00:00
Daniel Micay
888a623881 disable unpriv perf by default in user{,debug} builds
(Cherry picked from commit fe01f56c0d5c42508e1e82f5976e4c10bb00f632)

Bug: 29054680

Change-Id: If04bc63fc366006cde842a50b7c764f89d7449a6
2016-06-01 17:01:18 -07:00
Jeffrey Vander Stoep
3728ebcfaf Merge "disable unpriv perf by default in user{,debug} builds" am: 4bc8280a98
am: 13f2b4cf2f

* commit '13f2b4cf2f9ec4e17bedf75b01263b88d08982d6':
  disable unpriv perf by default in user{,debug} builds

Change-Id: Id14069a95cba23aff3540b3a43998cedd52b6ac7
2016-06-01 23:53:42 +00:00
Jeffrey Vander Stoep
4bc8280a98 Merge "disable unpriv perf by default in user{,debug} builds" 2016-06-01 23:18:46 +00:00
Colin Cross
01437aa5d3 Merge "Update Android.mk finder to work with Android.bp files" am: 520442f053
am: 18023b557b

* commit '18023b557b6d33836de380df397fce10598931a9':
  Update Android.mk finder to work with Android.bp files

Change-Id: I87915d75c3bda9c41c926a7c8ad7c650ac085199
2016-06-01 05:05:33 +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
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
Colin Cross
6f8244b62d Merge "Fix mm and mmm in Android.bp directories" am: 8ed91b6624
am: 323396993c

* commit '323396993c6651b4b98974df9e9d53118f27a840':
  Fix mm and mmm in Android.bp directories

Change-Id: I95d6bde7a0ea72b47779f1a5b0577ff423524b6f
2016-05-27 00:29:14 +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
Colin Cross
44cf069b30 Merge "Remove USE_SOONG=false option" am: 5413fb4b3e
am: a36de73331

* commit 'a36de73331b92e5e75ba92e7a4707e5850e3486d':
  Remove USE_SOONG=false option

Change-Id: Iba393dadd32a55e910cf0ab980a1e82887f60bb9
2016-05-26 01:04:52 +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
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
Dan Willemsen
958dc6098e Merge "Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV" am: a794f4db22
am: 19fdc4428f

* commit '19fdc4428f9036b059a1174a3236eef03180e826':
  Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV

Change-Id: I143bf88ad5031764644dfb2c8b279513c809b50b
2016-05-17 03:05:32 +00:00
Dan Willemsen
db16dd2384 Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV
Instead, use the libgcc/libatomic/libgcov from the static libraries dir,
which is provided by Soong. Copy the libraries using the Soong script if
Soong is disabled - this can be removed once USE_SOONG is removed.

Change-Id: Iad2ad20ad5c3cfc48bf1e46e594a482609098d7a
2016-05-16 17:26:54 -07:00
Colin Cross
9d888e37bb Merge "Default USE_SOONG to true" am: ac33935ac1
am: c33da56ff3

* commit 'c33da56ff30e89f5b09ec02d0b50815b27ab833e':
  Default USE_SOONG to true

Change-Id: Ib795a91a609da4402984c56a493e20dee90ec54f
2016-05-13 22:46:50 +00:00
Colin Cross
ac33935ac1 Merge "Default USE_SOONG to true" 2016-05-13 22:40:23 +00:00
Dan Willemsen
2697421213 Merge "Read Soong-exported configuration" am: c7b610a67e
am: bcbba61a25

* commit 'bcbba61a2500da9c51690ef8956e15020e9f6fea':
  Read Soong-exported configuration

Change-Id: Ia23208e26bae53bd74bb77b0a0ebbe63ac6f8a9c
2016-05-13 01:43:09 +00:00
Dan Willemsen
8b999ac63d Read Soong-exported configuration
This is to ensure that Make and Soong agree on configuration variables
like TARGET_GLOBAL_CFLAGS. Only a few variables are actually checked
currently until we make more actually the same.

Bug: 23566674
Change-Id: Ibede43d933ede4d470e182f9490ea6ec4ef52fbc
2016-05-12 13:36:33 -07:00
Colin Cross
42a5da7ca1 Default USE_SOONG to true
Change-Id: Iad88aed4060b84aef2381f6300f16bad14f3a6ca
2016-05-05 16:34:58 -07:00
Chih-hung Hsieh
7a8e69eea2 Merge "Call clang-tidy based on WITH_TIDY* variables." am: 3f03b10654
am: c72f50d49f

* commit 'c72f50d49fb95794039f270d4083b9cfed4cd482':
  Call clang-tidy based on WITH_TIDY* variables.

Change-Id: I4eb0afd79b56ad2ddea42b33791df27da6ab8820
2016-04-21 21:11:00 +00:00
Chih-Hung Hsieh
a9a55c7c7e Call clang-tidy based on WITH_TIDY* variables.
* Call clang-tidy before every C/C++ compilation if
  (1) clang-tidy is found at $(PATH_TO_CLANG_TIDY)
  (2) $(my_clang) is true
  (3) LOCAL_TIDY is 1 or true, or
      LOCAL_TIDY is undefined and WITH_TIDY is 1 or true.
* clang-tidy is called with -checks=$(my_tidy_checks),
  which has default '-*,google*,-google-readability*'
  and can be overwritten by WITH_TIDY_CHECKS.
* LOCAL_TIDY_CHECKS is appended to $(my_tidy_checks)
* Extra flags are passed to clang-tidy through
  WITH_TIDY_FLAGS or LOCAL_TIDY_FLAGS.
* To quickly find and fix clang-tidy warnings, set $(WITH_TIDY_ONLY)
  to 1 or true to skip compilation of C/C++ files.
* Add a PHONY tidy_only target,
  which includes all $(cpp_objects) and $(c_objects).
* The 'mm' and 'mmm' functions are changed to call make with
  the 'tidy_only' target when WITH_TIDY_ONLY is true or 1.
  In that case, only clang-tidy is called for C and C++ files.

Bug: http://b/27779618
Change-Id: I8adcfff217d68af49849b79aacee7d7654cafb1b
2016-04-21 12:31:13 -07:00
Ying Wang
2e2c137913 Reject Google's build of JDK.
Bug: 28097637

(cherry picked from commit 22b23b9b00)

Change-Id: Ieb809cdd0ba930b9ea65b8b0d31a81be112cc52e
2016-04-14 12:30:25 -07:00
Ying Wang
55fb35281e Merge "Reject Google\'s build of JDK." am: 98f7a5c
am: cb9847c

* commit 'cb9847c8abb89bb37d9429aeb1862d04d378ccce':
  Reject Google's build of JDK.

Change-Id: Ia33b50111b7dc8ea09552bc89ba6beb913ddd7ab
2016-04-14 19:01:56 +00:00
Ying Wang
98f7a5c744 Merge "Reject Google's build of JDK." 2016-04-14 18:49:07 +00:00
Ying Wang
22b23b9b00 Reject Google's build of JDK.
Bug: 28097637
Change-Id: I8afbd48230bdd1f198a873f72df1c178bed38d0e
2016-04-14 11:34:04 -07:00
David Zeuthen
39b6a8db6a Merge "Add support for Brillo partitioning." am: 2528968
am: 93a3423

* commit '93a34234c6a032251163992728def631c14a6e90':
  Add support for Brillo partitioning.

Change-Id: I349463c75e8ddb312cf83bad845864e530c50405
2016-04-14 16:20:15 +00:00
David Zeuthen
25328627ba Add support for Brillo partitioning.
To generate partition tables in the Android build system, simply add
the path to a .bpt file to the BOARD_BPT_INPUT_FILES variable.

 BOARD_BPT_INPUT_FILES += "hardware/bsp/vendor/soc/board/board-specific.bpt"

The variable BOARD_BPT_DISK_SIZE can be used to specify or override
the disk size, for example:

 BOARD_BPT_DISK_SIZE := "10 GiB"

Additional arguments to 'bpttool make_table' can be specified in the
variable BOARD_BPT_MAKE_TABLE_ARGS.

If BOARD_BPT_INPUT_FILES is set, the build system generates two files

 partition-table.img
 partition-table.bpt

in ${ANDROID_PRODUCT_OUT} using 'bpttool make_table'. The former is
the binary partition tables generated using bptool's --output_gpt
option and the latter is a JSON file generated using the --output_json
option. These files will also be put in the IMAGES/ directory of
target-files.zip when running 'm dist'.

BUG=27831397
TEST=Manually tested.

Change-Id: Iedd15354afb2dd483dcb9bc001360b2a37fd6dc0
2016-04-13 12:45:20 -04:00
Dan Willemsen
ae18638b04 Handle symlinked OUT_DIRs (again)
My previous attempt at properly handling symlinked OUT_DIRs only worked
if the symlink was to a different directory, not one in the same
directory.

This time, make sure that both make and soong use the same
representation of the output directory by passing BUILDDIR to
bootstrap.bash. Soong has been updated to pick whether to use a relative
or absolute path back to the source tree depending on what makes sense.
If the BUILDDIR or the path back to the source tree change, re-run the
bootstrap.

Also, move the $OUT_DIR/Android.mk and $OUT_DIR/CleanSpec.mk generation
to before Kati runs. In the case that $TOP/out was symlinked to
$TOP/out.angler:

 1) Soong generates out.angler/soong/Android.mk
 2) Kati's find generator produces in-memory tree of the filesystem
 3) $(shell ) creates out.angler/Android.mk
 4) The emulated findleaves Android.mk search finds
    out.angler/soong/Android.mk since the in-memory tree is never updated.

This doesn't happen in the normal case, because we pass --prune=$OUT_DIR
to findleaves.

Change-Id: Ib0fdae2e80f75ddcf33a3c8c5ea0978f5308b437
(cherry picked from commit cc60f01357)
[ccross: resolved conflicts in nyc-dev]
2016-03-30 12:24:57 -07:00
Ying Wang
77f67cd048 Merge "Support x86+arm multilib build."
am: d314805

* commit 'd314805c29fdbee3508b99c14ca63e1a8d170c3b':
  Support x86+arm multilib build.
2016-03-25 21:51:21 +00:00
Ying Wang
87538e4f8b Support x86+arm multilib build.
Support TARGET_2ND_ARCH as the binary translation arch.
See target/board/generic_x86_arm/BoardConfig.mk and
target/product/aosp_x86_arm.mk as example for the setup.

In BoardConfig, use the TARGET_2ND_ARCH/etc. variables to set up the
binary translation arch;
Set "TARGET_TRANSLATE_2ND_ARCH := true" to tell the build system it's
not a typical 64-bit multilib configuration.
In product makefile, use "PRODUCT_PACKAGES += libfoo_<2nd_arch>" to
install the TARGET_2ND_ARCH libraries. This also pulls in any dependency
libraries.
By default we don't install any TARGET_2ND_ARCH modules, unless it's
pulled in by PRODUCT_PACKAGES.

Bug: 27526885
Change-Id: I0578e9c80da0532d2fa886a8fcdb140bbc703009
(cherry-pick from commit 277e75a488)
2016-03-25 13:29:53 -07:00
Colin Cross
6e6a167521 Merge "Ignore Android.mk files with USE_SOONG=true" into nyc-dev
am: c031c75

* commit 'c031c758c63c83679cf55abb50ba9e4474d22814':
  Ignore Android.mk files with USE_SOONG=true
2016-03-25 19:59:02 +00:00
Ying Wang
fbc5b9f56b Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
(cherry-pick from commit 3a61eeb6cb)
2016-03-25 11:06:04 -07:00
Colin Cross
946a08cf51 Ignore Android.mk files with USE_SOONG=true
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.

Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
(cherry picked from commit 861ab99536)
2016-03-24 14:36:48 -07:00
Dan Willemsen
b101826b15 Merge "Handle symlinked OUT_DIRs (again)"
am: fe09018

* commit 'fe09018b39920715607a19a0807863c95e0b8372':
  Handle symlinked OUT_DIRs (again)
2016-03-24 21:08:54 +00:00
Dan Willemsen
fe09018b39 Merge "Handle symlinked OUT_DIRs (again)" 2016-03-24 20:38:08 +00:00
Ying Wang
f3920d0aac Merge "Add phony target javac-check."
am: 49b524c

* commit '49b524cb4a6d74b3fee49a728714d74202ce76f0':
  Add phony target javac-check.
2016-03-24 18:39:12 +00:00
Ying Wang
cddeb6c4f0 Add phony target javac-check.
javac-check covers all classes.jars that are compiled with javac
instead of jack. This target is required by tools that still need java
class files as input.

Bug: 26705771
Change-Id: I6896b9a6026a2a0dae6145d1ef5a839756aa3458
2016-03-24 11:12:16 -07:00
Dan Willemsen
1e061d789a Merge "Remove ALL_PREBUILT, all users have been removed"
am: cfb5545

* commit 'cfb554566447b31cd045a5b67b960018418fe874':
  Remove ALL_PREBUILT, all users have been removed
2016-03-23 23:19:27 +00:00
Dan Willemsen
3006962257 Remove ALL_PREBUILT, all users have been removed
Change-Id: I37154506ef419e7a68ce7e2d864624d2ae53206f
2016-03-23 14:15:16 -07:00
Dan Willemsen
cc60f01357 Handle symlinked OUT_DIRs (again)
My previous attempt at properly handling symlinked OUT_DIRs only worked
if the symlink was to a different directory, not one in the same
directory.

This time, make sure that both make and soong use the same
representation of the output directory by passing BUILDDIR to
bootstrap.bash. Soong has been updated to pick whether to use a relative
or absolute path back to the source tree depending on what makes sense.
If the BUILDDIR or the path back to the source tree change, re-run the
bootstrap.

Also, move the $OUT_DIR/Android.mk and $OUT_DIR/CleanSpec.mk generation
to before Kati runs. In the case that $TOP/out was symlinked to
$TOP/out.angler:

 1) Soong generates out.angler/soong/Android.mk
 2) Kati's find generator produces in-memory tree of the filesystem
 3) $(shell ) creates out.angler/Android.mk
 4) The emulated findleaves Android.mk search finds
    out.angler/soong/Android.mk since the in-memory tree is never updated.

This doesn't happen in the normal case, because we pass --prune=$OUT_DIR
to findleaves.

Change-Id: Ib0fdae2e80f75ddcf33a3c8c5ea0978f5308b437
2016-03-22 20:02:18 -07:00
Ying Wang
c9a19779a2 resolve merge conflicts of fc16dca602 to nyc-dev-plus-aosp
Now we can remove all uses of $(ACP) in prebuilt_internal.mk.

Change-Id: I07a449f3acca9b56c6a387ff8ca1535d19c872d1
2016-03-15 14:46:12 -07:00
Ying Wang
3a61eeb6cb Rebuild odex files in PDK fusion build.
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).

In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.

We generate prebuilt module only if it's not already defined in the
source tree.

Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
2016-03-14 21:01:46 -07:00
Dimitry Ivanov
ed5a610654 Merge "Add options for dynamic linker developer warnings" into nyc-dev
am: 837d60f49a

* commit '837d60f49a5c764bd427c7d8b75d291c83344984':
  Add options for dynamic linker developer warnings
2016-03-01 22:04:26 +00:00
Dan Willemsen
9ffa38b193 Merge "Remove USE_NINJA=false" am: 3bfc095f53
am: d73633c082

* commit 'd73633c0824a63f7104bddf9a798bccc952b545c':
  Remove USE_NINJA=false
2016-02-29 22:19:29 +00:00
Dimitry Ivanov
f22789edd0 Add options for dynamic linker developer warnings
Add bionic options that enable developer warnings for
beta/preview builds.

Bug: http://b/27365747
Change-Id: Ifc2ab706975558824522da5eece186e1660969ad
2016-02-27 01:18:24 -08:00
Dan Willemsen
1c6dc5b942 Remove USE_NINJA=false
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.

Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
2016-02-26 21:48:31 -08:00
Keun Soo Yim
e575822d53 Merge "build file change for vts to use the existing cts-tradefed infrastructure" into nyc-dev
am: 4773d29ab7

* commit '4773d29ab74b15895550d04bf5ac72899d036385':
  build file change for vts to use the existing cts-tradefed infrastructure
2016-02-26 19:27:37 +00:00
Keun Soo Yim
172b7d421e build file change for vts to use the existing cts-tradefed infrastructure
Mostly done by stuartscott@

Change-Id: I016405757f39df833d532bc01fd2237e5e961a8a
2016-02-24 16:12:49 -08: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
Sebastien Hertz
8192d3b821 Merge "Support code coverage with Jack" am: 4dad88980f
am: 7b02e64148

* commit '7b02e64148e6a1c0355d715b2a8034061f0d2837':
  Support code coverage with Jack
2016-02-02 09:13:57 +00:00
Sebastien Hertz
4dad88980f Merge "Support code coverage with Jack" 2016-02-02 07:31:37 +00:00
Lee Campbell
d6620a3e10 Merge "brillo: Remove dependency on java for Brillo" am: 6c8e3e4108
am: fd5d6f440a

* commit 'fd5d6f440a13643f4e645e960e1f2c417af3355a':
  brillo: Remove dependency on java for Brillo
2016-01-29 23:48:10 +00:00
Lee Campbell
3d8bf2994c brillo: Remove dependency on java for Brillo
Brillo does not require Java. Add a JAVA_NOT_REQUIRED
flag to the build system to make the jdk requirment optional

Also don't build signapk for Brillo

BUG: 25281898
Change-Id: I31e68cc7d076bf6c234699c77c0ea1ea428be4f5
2016-01-29 15:38:53 -08:00
Sebastien Hertz
dfce8ad4f4 Support code coverage with Jack
Building an app with Jack and with the environment variable
EMMA_INSTRUMENT_STATIC set to true will apply code coverage
onto the app targeting Jacoco.

Bug: 20115492
Change-Id: Ief3640fa3faa466f7f6aaa9739e06d3db24110a0
2016-01-27 19:14:14 +01:00
Neil Fuller
fcf7c81a7f Revert "Revert "Make OpenJDK 8 the default""
Reapply the JDK 8 switch in internal builds.

This reverts commit 85bddfdedf.
2016-01-25 17:35:57 +00:00
Neil Fuller
3ec8eeb90b Merge "Revert "Make OpenJDK 8 the default"" am: c0acea2571
am: a5e4ea2e44

* commit 'a5e4ea2e44e324101b412bac9f2fbb97bdc91670':
  Revert "Make OpenJDK 8 the default"
2016-01-25 17:17:04 +00:00
Neil Fuller
1f495b865e Revert "Revert "Make OpenJDK 8 the default""
Reapply the switch to JDK 8 on aosp/master.

This reverts commit 85bddfdedf.

Change-Id: If2e8733ba78b007d37914c0512cd6be1bd4c1e69
2016-01-25 17:12:41 +00:00
Neil Fuller
85bddfdedf Revert "Make OpenJDK 8 the default"
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.

This reverts commit 4495f6afb8.

Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
2016-01-25 17:04:14 +00:00
Neil Fuller
4495f6afb8 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
2016-01-25 10:19:25 +00:00
Narayan Kamath
1b5f487f10 Make a confusing error message clearer.
The java version doesn't matter here.

Change-Id: Ieb933f87d1255e7aea5d21b3ac96e4f1f755deea
2016-01-20 18:48:59 +00:00
Neil Fuller
3dfaceea79 Revert "Revert "Revert "Revert "Make OpenJDK 8 the default""""
This reverts commit ee89f219ea.

This reapplies commit
1bd16b67c4
for the third time.

Change-Id: I3be72f643f5ddce87dfc39d98f19e395525554d8
2016-01-15 16:35:54 +00:00
Neil Fuller
ee89f219ea Revert "Revert "Revert "Make OpenJDK 8 the default"""
This reverts commit c288d65762.

The launch control change that switched various builds
to JDK 8 was reverted so JDK 8 can't be mandatory without
breaking builds.

Change-Id: I5e3feb21488d3bb57c5718cfe105a931eeaa9587
2016-01-14 21:12:27 +00:00
Neil Fuller
c288d65762 Revert "Revert "Make OpenJDK 8 the default""
This reverts commit a87553f414.

Change-Id: Ibd7bf08f3adfdc3f50584b8a61b3f81f1bff53de
2016-01-12 15:11:32 +00:00
Colin Cross
861ab99536 Ignore Android.mk files with USE_SOONG=true
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.

Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
2016-01-11 13:43:27 -08:00
Neil Fuller
a87553f414 Revert "Make OpenJDK 8 the default"
Reverting until all continuous builds that cover branches downstream of master can be updated to use JDK 8.

This reverts commit 1bd16b67c4.

Change-Id: Icb0daa440a6286e07d3cfd9ff8b082b4154ebc21
2016-01-11 13:37:43 +00:00
Neil Fuller
1bd16b67c4 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: Iba08a9d3cf73bae7124e431dfe87c20ac219591e
2016-01-11 11:25:26 +00:00
Nick Kralevich
f09b468fcc Merge "set ro.adb.secure=1 for user builds" am: f9911ae087
am: 45407b471e

* commit '45407b471ef831fc10e79fc1f9ea5a6c8d838387':
  set ro.adb.secure=1 for user builds
2015-12-23 12:28:42 -08:00
Nick Kralevich
f9911ae087 Merge "set ro.adb.secure=1 for user builds" 2015-12-23 20:22:30 +00:00
Daniel Micay
18a141cc8c set ro.adb.secure=1 for user builds
In user builds, adb without authentication is always disabled. However,
it doesn't work with the defaults because authentication doesn't work
without having ro.adb.secure=1 set. It makes sense to offer builds with
no adb but not builds with adb present in an unusable state (especially
as the default).

Bug: 22220212
Bug: 21862859
Change-Id: Ic22300a70586fd57692ac59d6873ab16dde70919
2015-12-23 20:18:15 +00:00
Yohann Roussel
4ef01c412a resolve merge conflicts of 42c42b6971 to master.
Change-Id: I40e2d2f7cd3e047bc3bc661f20c7415ce751b321
2015-12-22 15:36:32 +01:00
Yohann Roussel
4a01711267 Merge "Always start jack server before first call to jack" 2015-12-22 13:59:49 +00:00
Colin Cross
cb16289b06 Merge "Combine soong builds into make builds" am: 3bfc560cc5
am: 17d3f5426b

* commit '17d3f5426b71a510244bdbbe5a0e7f0548692420':
  Combine soong builds into make builds
2015-12-16 02:01:26 +00:00
Colin Cross
3ebb2f7326 Combine soong builds into make builds
Bootstrap soong if necessary, and wrap the kati and soong ninja files
into a single ninja file.

Change-Id: I0000c7eaa1adda763189681c57ec27a97a12ee1f
2015-12-15 16:05:57 -08:00
Nicolas Geoffray
2ad526124c Revert "Revert "Make PIC and PREOPT default for all.""
bug:25801231

This reverts commit f2a9135ed1.

Change-Id: I2eca605212b78505667af1f7e9c83f5cca5db35a
2015-12-15 09:54:30 +00:00
Nicolas Geoffray
f2a9135ed1 Revert "Make PIC and PREOPT default for all."
Need to update seed and ariel.

This reverts commit b93f5905d2.

Change-Id: Icc6f1539a97ccb2b1fcb12d2bc48904045689096
2015-12-14 18:22:17 +00:00
Nicolas Geoffray
b93f5905d2 Make PIC and PREOPT default for all.
bug:25888050
bug:25801231

Change-Id: Idf0f466a00dd592c433fc798c29ed80396015713
2015-12-14 13:02:19 +00:00
Yohann Roussel
9214a26cfc Always start jack server before first call to jack
Also install and update the server if necessary.

The target start-jack-server produces no file so it's always built.
Since the dependency is "order only", it doesn't cause force rebuilt of
jack targets after start-jack-server execution.

Bug: 25443108

Change-Id: I1608d87d186694d47307e00337b1905f0b8079c4
2015-12-09 22:00:50 +01:00
Shinichiro Hamaji
7601f91de0 Merge "Prevent findleaves.py from traversing copies of " am: 84639d127b am: 22a2efde22
am: 336c2527e3

* commit '336c2527e31d1691ac9c9538c7e19f80c6493969':
  Prevent findleaves.py from traversing copies of $(OUT_DIR)
2015-11-24 21:25:17 +00:00
Shinichiro Hamaji
6a378a3a7a Prevent findleaves.py from traversing copies of $(OUT_DIR)
by putting blank Android.mk and CleanSpec.mk in $(OUT_DIR).

Bug: 25732342
Change-Id: I3fcc4efddb9ee5ce309502e978f0589335af8371
2015-11-19 18:31:29 +09:00
Dan Albert
d806b521b8 Merge "Make not having Jack non-fatal." am: 5f88dd0dd6 am: 37a9e5d568
am: 934f9fec3d

* commit '934f9fec3d72757f4a17c0abab0daea0ef9d4cdf':
  Make not having Jack non-fatal.
2015-11-13 01:24:33 +00:00
Dan Albert
fd8c722714 Make not having Jack non-fatal.
Not every build needs Java.

Bug: http://b/17441393
Change-Id: Ia55742cfd43c3a4f9c7873b87816bcce99f8156f
2015-11-12 15:29:12 -08:00
Ying Wang
751c26af31 Merge "Add suffix .so to use directly libart.so" am: d1fd823f33 am: d54b9e6ba0
am: d06577781c

* commit 'd06577781c169c5292c79c71485764ad3f19547d':
  Add suffix .so to use directly libart.so
2015-11-11 22:19:42 +00:00
randy.jeong
59bdffa76a Add suffix .so to use directly libart.so
It should be the complete name with suffix .so to use libart.
At present, unnecessarily falls back like below.
"Falling back from libart to libart.so after dlopen error:
dlopen failed: library "libart" not found"

Change-Id: Ie5da35a71d6661434d2097c842407e6a254f8f58
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
2015-11-10 16:42:49 +09:00
Nicolas Geoffray
56a84e1b6c Make jit the default for all builds.
Change-Id: Ifa4280cdab0747cae8d3e2becec47b230846def6
2015-11-05 18:02:13 +00:00
Ying Wang
4a4a0bc38f Sort out ANDROID_GOALS, KATI_GOALS and NINJA_GOALS.
ANDROID_GOALS: any Android goals that need to be built.
KATI_GOALS: goals that we need to pass to Kati.
NINJA_GOALS: goals we need to pass to Ninja.

For modifier Android goals (dist, INTERNAL_MODIFIER_TARGETS),
we don't need to pass them to Ninja. See also commit
80e46c7c5c.
Restore the dist rule removed by the above commit.

Previously "droid" was never passed to Ninja. That's incorrect.
"make droid docs" should build both docs and droiod.
Fixed with this change.

Change-Id: I5c28061fe0ebe7848872ee349056d029b787ff71
2015-11-03 17:10:28 -08:00
Ying Wang
67132baa4d Fix "make product-graph" and "make dump-products".
- For unmodified "make product-graph" and "make dump-products",
  load only the current product configuration makefiles. This is much
  faster than loading all product makefiles.
- For "make product-graph ANDROID_PRODUCT_GRAPH=--all",
  "make dump-products ANDROID_DUMP_PRODUCTS=all", load all product
  makefiles.
- Move product-graph.mk out of build tasks, so we can skip loading all
  the Android.mks, which takes long and we don't really need them.
  More importantly, with all product makefiles loaded, modules in
  Android.mks are prone to clash (if they are conditionally included
  by variables set up in product makefiles) and lead to parse-time
  error.

Change-Id: Idc1d6b0c23eb2c8bb34fdd7a1fa4d56171768d21
2015-10-28 16:49:44 -07:00
Colin Cross
ec1b561981 Add dummy description for GET-INSTALL-PATH
kati takes the first @echo command in a rule and turns it in to a ninja
description that gets pretty-printed.  The GET-INSTALL-PATH is only
@echo commands and is parsed by development/testrunner/runtest.py, so
it fails to parse the pretty-printed first test.

Add a dummy @echo to GET-INSTALL-PATH for kati to use as the
description, so the rest of the @echo commands are left unmodified.

Change-Id: I192fde48b26726a2f6760448f819243bd2f21312
2015-10-23 21:38:12 -07:00
Yohann Roussel
8998d57404 Allow control of jack used for compilation
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools

Bug: 24564814

(cherry picked from commit b68c9a498d)

Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
2015-10-21 17:22:05 +02:00
Neil Fuller
e8304ef768 Fix for Java 8 toolchain builds
We don't need to assume the OpenJDK (i.e. for Mac builds).

Change-Id: I1ac1856813045c7b1478dee6b08ad7b49300e4d7
2015-10-12 17:29:45 +01:00
Colin Cross
e06e961cc6 am 7edec14c: Merge "Set BUILDING_WITH_NINJA flag when parsing makefiles for ninja build"
* commit '7edec14c8dfe4e499cba0d77dc20bc985af1f586':
  Set BUILDING_WITH_NINJA flag when parsing makefiles for ninja build
2015-09-28 23:04:57 +00:00
Colin Cross
fe5e6894d2 Set BUILDING_WITH_NINJA flag when parsing makefiles for ninja build
Distinguish between parsing makefiles in make for a pre-ninja build,
parsing makefiles in kati for a ninja build, and parsing makefiles in
make for a non-ninja build by leaving USE_NINJA=true enabled for the
kati pass but also setting BUILDING_WITH_NINJA.

Change-Id: I63f1ce1efe08cd86fdf41f8051901f720b38cfaf
2015-09-28 15:36:05 -07:00
Colin Cross
ad4b1ef65e am 581a028f: Merge "Remove checkbuild and test from parse time goals"
* commit '581a028fb562b1d877de2b82d6a08df045d73ec8':
  Remove checkbuild and test from parse time goals
2015-09-26 03:37:54 +00:00
Colin Cross
c53d6b90b3 Remove checkbuild and test from parse time goals
The tests goal is not a parse time goal.

The checkbuild goal is only a parse time goal so that it doesn't result
in a circular dependency between droid and checkbuild when
ANDROID_BUILD_EVERYTHING_BY_DEFAULT is set.  Get rid of the circular
dependency by making droid depend on droid_targets, and droid_targets
depend on the targets that are normally built for droid.  checkbuild can
then always depend on droid_targets, and droid can condtionally depend
on checkbuild without introducing a circular dependency.

Bug: 24413153
Change-Id: I231d80e05ffe321384a5efbcdf5578f86ad84da0
2015-09-25 16:43:36 -07:00
Colin Cross
425d0248a1 am 9ff24387: Merge "Make USE_NINJA=true the default"
* commit '9ff24387c205da60e3d7deb042530b1d0b2d881c':
  Make USE_NINJA=true the default
2015-09-22 17:12:43 +00:00
Colin Cross
f77030bb30 Make USE_NINJA=true the default
Build with kati + ninja by default, unless specifically disabled with
USE_NINJA=false in the environment or on the make command line.

Bug: 23565895
Change-Id: I1fa9f5c6eb4d4ed3f5b81454f89d19fd2f1f6abb
2015-09-18 15:10:21 -07:00
Ying Wang
bc195b36d7 am 6fb36397: Merge "Use /ninja_build to mark ninja build."
* commit '6fb36397e56336e08a75e7101d6d47a98a27aea1':
  Use $(OUT_DIR)/ninja_build to mark ninja build.
2015-09-16 23:21:04 +00:00
Ying Wang
eb1e18e689 Use $(OUT_DIR)/ninja_build to mark ninja build.
Bug: 23565895
Change-Id: I000e88a45278fd52096312262eacc52511f02efb
2015-09-16 15:29:08 -07:00
Ying Wang
942672d82b am 45075cf6: Merge "Generate installed-files-vendor.txt"
* commit '45075cf623fc59930594ac27c675cd43e36975b1':
  Generate installed-files-vendor.txt
2015-09-15 23:10:16 +00:00
Ying Wang
8da19e3688 Generate installed-files-vendor.txt
Similar to installed-files.txt, installed-files-vendor.txt lists the
content of vendor.img.

Bug: 24009297
Change-Id: Ib8112b19cc9f54d0c0d6a829063e4fe72d8ce664
2015-09-15 14:24:00 -07:00
Dan Willemsen
c98d9a9d0f am f1c09d7f: Merge "Add HOST_CROSS_OS"
* commit 'f1c09d7fbd92a08cc51950a7d35fb5f7fc564a20':
  Add HOST_CROSS_OS
2015-09-09 18:19:13 +00:00
Dan Willemsen
057aaea54a Add HOST_CROSS_OS
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.

Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
2015-09-09 18:12:29 +00:00
Ying Wang
3351178fb8 Cleaned the outdated incrementaljavac.
Nobody is using this feature and now we switched to jack.

Change-Id: I749b486eb347cbf3ee7b107565fc800eeb238c44
(cherry-picked from commit 90598cb70c)
2015-08-29 11:08:02 -07:00
Ying Wang
c9343c0bc3 am cf129c53: am a7eaf450: Merge "Dist the otatools package."
* commit 'cf129c538266cdc5d185a945218e7f76aa22ca27':
  Dist the otatools package.
2015-08-25 17:27:26 +00:00
Ying Wang
267e957373 Dist the otatools package.
Bug: 23495952
Change-Id: I1f61946580dd8ea29c3d5e1f4e859cc6d1f8554a
2015-08-24 17:13:53 -07:00
Dan Willemsen
1b14846717 am 48d95e75: am 05d97fe7: Merge "Remove legacy windows platform build support"
* commit '48d95e752536dc7a81c141e435e8a90b7929cf02':
  Remove legacy windows platform build support
2015-08-18 04:43:04 +00:00
Dan Willemsen
05d97fe723 Merge "Remove legacy windows platform build support" 2015-08-18 04:31:07 +00:00
Dan Willemsen
9cf990beec resolved conflicts for merge of 05fae7e0 to mnc-dev-plus-aosp
Change-Id: I9f0f1169839afabc7ec7e439b668798e2cd111a3
2015-08-17 20:50:48 -07:00
Dan Willemsen
145ae32069 Remove legacy windows platform build support
We still support HOST_OS=windows for the SDK host tools cross-builds, but
that's only when USE_MINGW is set when running under linux.

Change-Id: I37da87dc9fbbd69ba10ce4d7f2668ab3f6482d92
2015-08-17 12:35:04 -07:00
Dan Willemsen
ccc933e97b Use repeatable timestamps
This moves all of the date references under build/ to using a single
datetime that can be set manually using BUILD_DATETIME.

It also adds an option, OVERRIDE_C_DATE_TIME, that if set to true, will
redefine __DATE__ and __TIME__ for all C/C++ files so that it matches
BUILD_DATETIME.

Bug: 23117013
Change-Id: I7c17a32b794a5adf40b9cd69136fb0ff9f6084ec
2015-08-12 00:02:20 -07:00
Dan Willemsen
8478f7abbd resolved conflicts for merge of b184ec2a to mnc-dev-plus-aosp
Change-Id: I6178127dd19ee553c15343fc0120af9463b7ac4d
2015-08-11 18:31:59 -07:00