Commit graph

9163 commits

Author SHA1 Message Date
Sebastien Hertz
74ec3f49d1 Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).

When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.

Bug: 28014424
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
2016-04-08 10:26:49 +02:00
Colin Cross
4e2c57ab0a Pass SANTIIZE_HOST and SANITIZE_TARGET to soong
Change-Id: I80e2e386db3367383454adb1b0785b10e13a4c58
2016-04-07 13:33:06 -07:00
Shinichiro Hamaji
4eaeef8df7 Add jack's argument files to prerequisites
Dex files should be updated when jack-default.args or
proguard*.flags are modified.

Bug: 27954979
Change-Id: I72a7084302f4ef92a89a8068f03f790dd7acd582
2016-04-07 18:56:42 +09:00
Shinichiro Hamaji
4d69fbf5be Merge "Add Bison binary and its data to prerequisite" 2016-04-07 03:48:31 +00:00
Shinichiro Hamaji
5e2d7f3204 Merge "Fix dependencies of protoc with nanopb-c plugin" 2016-04-07 03:48:02 +00:00
Dan Austin
75e7af10b9 Adding gcc-specific disable of Wattributes in preparation for libcxx rebase.
Change-Id: Ida49761801e58b2475e006525e3ea2bbad3731af
2016-04-06 18:35:07 +00:00
Shinichiro Hamaji
a3184dc2ae Fix dependencies of protoc with nanopb-c plugin
Bug: 27954979
Change-Id: Ic06b5288b092d8ea5225516069845bfc2ffa9cd1
2016-04-06 13:54:03 +09:00
Shinichiro Hamaji
b708bc5533 Add Bison binary and its data to prerequisite
Bug: 27954979
Change-Id: Id68425ef85c07b9bd06d9640f4bf96270af1b893
2016-04-06 13:46:02 +09:00
Dan Albert
a6a6285686 Merge "Remove mips special case." 2016-04-05 18:51:16 +00:00
Sebastien Hertz
2e8a1fc966 Merge "Fix code coverage for apps" 2016-04-05 09:20:21 +00:00
Dan Albert
ce2fe3c121 Remove mips special case.
The NDK doesn't have an r6 subdir.

Bug: http://b/28009632
Change-Id: I482723a1b7400ed13dc70acad24fbed96683f460
2016-04-05 00:28:35 -07:00
Sen Jiang
aef8e28fa6 Merge "Remove libdivsufsort shared library from otatools." 2016-04-04 21:43:11 +00:00
Elliott Hughes
fcbd4d8bfc Merge "libm's headers have moved to live with their libc cousins." 2016-04-04 20:44:35 +00:00
Sen Jiang
f1ae051bb0 Remove libdivsufsort shared library from otatools.
The library is now a static library.

Bug: 26955860
Change-Id: I64525737da1451895c255a30904a1e3e4ad8d253
2016-04-04 13:44:06 -07:00
Dan Albert
66dcc50c71 Merge "Update NDK libc++ header paths." 2016-04-04 20:27:42 +00:00
Elliott Hughes
1598df4c7d libm's headers have moved to live with their libc cousins.
(To reduce the need for this kind of thing in the various build systems.)

Change-Id: I4430a76a749262b0234c194434b331f7294da009
2016-04-04 12:58:50 -07:00
Mohamad Ayyash
95fe0025c1 Always build squashfs host tools
Now that mac compatibility has been fixed

BUG: 27657762
Change-Id: I49933ccedf74b9d172967dad721971a752047da6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2016-04-04 12:33:24 -07:00
Sebastien Hertz
2319e56366 Fix code coverage for apps
When building apps with EMMA_INSTRUMENT=true, we must ensure that
jacoco is at least on the classpath (or even embedded for unbundled
branches) and that proguard will ignore jacoco classes. Otherwise
the Jack compilation would fail.

For unbundled build, we include the proguard configuration file
build/core/proguard.jacoco.flags to ignore jacoco classes.

For full build, we ensure jacoco is on the classpath during the
jack compilation.

Bug: 27607712

(cherry picked from commit d9641e01f3)

Change-Id: Ib46c91d03721f2418b15c17546d4f322f2f90a28
2016-04-04 10:48:02 +02:00
Miao Wang
5d4d1d8ebb Merge "[RenderScript] Update the build rules for x86_64 support lib." 2016-04-01 20:22:41 +00:00
Dan Albert
4410c29fd0 Merge "Add LOCAL_NDK_VERSION." 2016-03-31 23:11:26 +00:00
Miao Wang
4121aa9bb8 [RenderScript] Update the build rules for x86_64 support lib.
Bug: 19735423

  - Unlike other archs, x86_64 has both usr/lib and usr/lib64. we need
    to search for libm.so and libc.so in lib64/. Otherwise the linker
    will report error.

Change-Id: I2859bee066a9eb100828d90da8adf0f9817d77e6
(cherry picked from commit 57ef7ea490)
2016-03-31 15:26:24 -07:00
Dan Albert
658d1e0434 Update NDK libc++ header paths.
The r11 libc++ uses libc++abi instead of libgabi++.

Bug: http://b/27801981
Change-Id: I5b90c14125dc024b2b290897bb3ef1c8d9546a7b
2016-03-31 14:22:09 -07:00
Dan Albert
13306af0c1 Add LOCAL_NDK_VERSION.
Used to select between releases of the NDK (r10, r11, etc).

Some of the libraries we use in Android come as prebuilts from
google3, which are most likely built against an older NDK than what
we have in the platform. Since things may not be ABI compatible
release to release, we need to keep legacy versions accessible for
those to keep building.

Change-Id: Ia3df42fa6f3a7bd5108ff6bbb0f2ca06239c3be9
2016-03-31 12:54:21 -07:00
Ying Wang
77b6353689 Merge "Remove support of disabling Jack." 2016-03-31 16:52:49 +00:00
Ying Wang
0fda1eaa43 Merge "Replace $(shell) in recipe with subshell." 2016-03-31 16:46:18 +00:00
Ying Wang
a6a9ab07ed Replace $(shell) in recipe with subshell.
Bug: 27925180
Change-Id: I4a735755e4f818f6ce608c87ad111b9dd205ef41
2016-03-30 18:34:43 -07:00
Dan Willemsen
8db170d914 Merge "Remove extraneous /" 2016-03-30 21:24:08 +00:00
Ying Wang
858657366f Remove support of disabling Jack.
We removed code and variables related to running dx on classes.jar in
this change. Also removed target emma rules (but kept the emma rules for
host java libraries), for it's now done by Jack.
We still support to build classes.jar (and javalib.jar for static Java
libraries) using javac, because tools like javadoc need class files as
input.
Removed the obsolete install-dex-debug.

Bug: 27400061
Change-Id: If0bcdfe62cb181a98754fb0dbe1c12c92e38d3e8
2016-03-30 14:03:12 -07:00
Dan Willemsen
1c4f8e0026 Remove extraneous /
This matches the line we use in Soong, and behaves no differently.

Change-Id: I4487f7f5555edd08dc67a22d547f8218d46ccd8f
2016-03-30 13:36:01 -07:00
Ying Wang
c79c95d3d8 Merge "Keep emma files for host rules" 2016-03-30 16:56:54 +00:00
Sebastien Hertz
8f0e52c3a6 Keep emma files for host rules
Keep coverage.em file name for host rules where Jack is not called.

(Partially reverts change 491c9ce48a)

Bug: 27822188
Change-Id: Ia9344e17ecbecfb9c335608740ab7dc5490c48d5
2016-03-30 09:39:18 +02:00
Dan Willemsen
6a54a9f10a Darwin: Use the same ar as Soong
Soong uses the copy of `ar` in the OSX SDK instead of the wrapper in
/usr/bin/ar. /usr/bin/ar appears to be a thin wrapper that looks up the
current SDK and passes execution to it. Soong does this so that it can
actually set up a dependency on the tool.

Change-Id: Ia4e4fbe3287539933fa98a1354c3ccee91f4d552
2016-03-29 16:21:32 -07:00
Dan Willemsen
e4d5e08c2e Merge "Forbid Clang for Windows" 2016-03-29 20:54:24 +00:00
Shinichiro Hamaji
4487319141 Merge "Fix dependencies around tools/*-event-log-tags.py" 2016-03-29 20:40:31 +00:00
Dan Willemsen
9537477df7 Forbid Clang for Windows
Clang and MinGW are not expected to work together currently, and you get
strange errors when this is attempted. Instead, error out with a clear
error message.

Before the windows build rewrite, we'd just explicitly set my_clang to
false without checking what the module asked for. Now, error out if the
module explicitly asked for clang, since by default they'd have it
already if it wasn't for windows. That way when Clang+Windows does
become possible, it can gradually be tested by setting LOCAL_CLANG to
true.

Change-Id: I9e0b0dca30946d94894119443f2fd0593cee1793
2016-03-29 12:34:03 -07:00
Shinichiro Hamaji
d3ce14c325 Fix dependencies around tools/*-event-log-tags.py
We should regenerate merged tag files and java sources when
these scripts are updated.

Change-Id: Id5f11d6f480f3f74dab08f01e929ee2d7fafd2d0
2016-03-30 03:04:40 +09:00
Allen Hair
29b65c4e66 Only add jacocoagent if the package contains some java code.
Bug: 27877982
Change-Id: I8bf05d67a823402e7e488990753cc9005ec5e90b
2016-03-29 10:47:49 -07:00
Sebastien Hertz
f7e06ef3b4 Merge "Rename emma coverage files" 2016-03-29 07:17:12 +00:00
Ying Wang
8fe0fc9065 Merge "Remove javac support in host dex rules." 2016-03-26 01:41:38 +00:00
Ying Wang
550e885f47 Merge "[DO NOT MERGE] Remove code pulled in by accident." 2016-03-26 01:27:32 +00:00
Ying Wang
40a4a83c90 [DO NOT MERGE] Remove code pulled in by accident.
Remove code pulled in by accident in cherry-pick commit fbc5b9f56.

Change-Id: I4e4a336faf71782c208631c581b2587a5364212f
2016-03-25 18:24:42 -07: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
Ying Wang
363fe53450 Use $(BUILD_SYSTEM) as the LOCAL_PATH of auto-generated modules.
So that we don't mess up with the vendor path check by accident.

Bug: 27543283
Change-Id: I6c34caefe3ff4abfdd8349a32c68fcca524cfd8e
(cherry-pick from commit efaf5efd06)
2016-03-25 11:06:51 -07: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
Ying Wang
6557ba5335 Merge "Remove rmtypedefs from the build system." 2016-03-25 17:29:30 +00:00
Sebastien Hertz
491c9ce48a Rename emma coverage files
We no longer use emma with Jack. However, during the process of a
full build, we may run the emma task and overwrite the coverage file
generated by Jack with the one from emma because they use the same
filename.

This CL renames coverage files generated by emma so they no longer
break those created by Jack.

Bug: 27822188
Change-Id: Ie3fdc2b8f53deafbefbd6973e39f29d8c46f371e
2016-03-25 17:11:38 +01:00
Ying Wang
3ae7861252 Remove javac support in host dex rules.
- Remove javac support in host_dalvik_java_library.mk
- Simplify host_dalvik_static_java_library.mk by including
  host_dalvik_java_library.mk instead of host_java_library.mk.
- Take configure_local_jack out of host_java_library_common.mk because
  it's only needed by host dalvik java libraries.

Bug: 27400061
Change-Id: I4088b09092198118d832a759663bbaadff669ed5
2016-03-24 16:48:47 -07:00
Tao Bao
20d4e10bf3 Merge "Add libbase to otatools" 2016-03-24 21:50:37 +00:00
Dan Willemsen
fe09018b39 Merge "Handle symlinked OUT_DIRs (again)" 2016-03-24 20:38:08 +00:00
Ying Wang
72bc59ce8b Remove rmtypedefs from the build system.
We don't need to run rmtypedefs in javac compilation now, because the
runtime libraries are compiled by only jack, which takes care of
rmtypedefs by itself.

Bug: 27828139
Change-Id: Ie480ae5aead8f3f58f956978fc4a05c28a35dec6
2016-03-24 12:25:56 -07: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
Johan Redestig
8f800df5f0 Add libbase to otatools
build_verity_tree uses libbase since b104044.

Change-Id: I6d3406a107ceb6cd58d1a51aa79935209d4c435f
2016-03-24 14:17:51 +01:00
Dan Albert
cdc8f21180 Merge "Add support for multiple flavors of the NDK gtest." 2016-03-24 01:26:09 +00:00
Dan Albert
2d3d14b69b Merge "Using stlport_static or c++_static requires libdl." 2016-03-24 01:26:09 +00:00
Dan Willemsen
cfb5545664 Merge "Remove ALL_PREBUILT, all users have been removed" 2016-03-23 23:12:46 +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 Albert
b05cf54432 Add support for multiple flavors of the NDK gtest.
Since gtest depends on the STL, we need one version for each STL.

Bug: http://b/27801981
Change-Id: Id1a5571b043e2513d0184a9ab45a473dd545da84
2016-03-23 13:25:06 -07:00
Ying Wang
71c58092f4 Phony target $(LOCAL_MODULE) covers all multilib variants.
Bug: 27760875
Change-Id: Ie59e2c36964fa736b17fb4185563c08a8cb75b80
2016-03-23 11:02:03 -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
4aaa1a1fd8 Create empty .a on Darwin when there is no obj file.
On Darwin ar would fail if there is no object file to add.
We work around by adding a dummy.o to the .a and then deleting it.

Bug: 27800477
Change-Id: I68bbebea2726058c25863d7026a645a520d05167
2016-03-22 18:23:13 -07:00
Dan Albert
a81e1b7fed Using stlport_static or c++_static requires libdl.
Why? For one, libgcc's unwinder makes use of `dl_iterate_phdr`. Also,
libgabi++ (the home grown C++ RT we use for stlport) uses
`dlopen` for liblog when reporting fatal errors. The LLVM unwinder
which is used by libc++ also uses libdl.

Requiring a dependency on libdl seems less objectionable than
requiring one on liblog. We could always change libgabi++ to  use
syslog instead, but that will only reach logcat for newer devices
(possibly L+, definitely M+).

Requiring libdl seems like the best option here, especially given
that libgcc needs it anyway.

Change-Id: I4acfaf38145c39fc15a76fbb282a46786e5322f1
2016-03-22 17:15:14 -07:00
Colin Cross
5b5929aa42 Merge "Remove support for device libstdc++ as stl" 2016-03-21 22:38:00 +00:00
Dan Willemsen
a800b9a83a Merge "Always run Soong" 2016-03-21 21:09:40 +00:00
David Zeuthen
003bec431c Merge "Add support for Brillo Verified Boot." 2016-03-21 15:46:29 +00:00
Pirama Arumuga Nainar
6721b1d185 Merge changes from topic 'rebase_r256229'
* changes:
  Switch to clang-2690385
  Update RenderScript build rules for rebase to LLVM r256229
2016-03-18 21:54:51 +00:00
David Zeuthen
d995f4b04d Add support for Brillo Verified Boot.
The following variables are introduced

 BOARD_BVB_ENABLE: can be set to true to build boot.img and system.img
 files compatible with Brillo Verfied Boot.

 BOARD_BVB_ROLLBACK_INDEX: can be set to an integer to use for the
 rollback index.

 BOARD_BVB_KEY_PATH, BOARD_BVB_ALGORITHM: If set, the former must be a
 path to the private key used to sign the boot image and the latter must
 be the algorithm to use. If unset, a test-key stored in the tree will
 be used.

 BOARD_BVB_MAKE_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 make_boot_image'.

 BOARD_BVB_SIGN_BOOT_IMAGE_ARGS: Extra options to pass to 'bvbtool
 sign_boot_image'.

 BOARD_BVB_ADD_IMAGE_HASHES_ARGS: Extra options to pass to 'bvbtool
 add_image_hashes'.

 BOARD_CUSTOM_BVBTOOL: Can be set to specify what bvbtool program to
 use.

The existing BOARD_KERNEL_CMDLINE variable is also used, as are existing
kernel and initrd-related variables. Therefore, simply adding

 BOARD_BVB_ENABLE := true

to an existing Makefile should do the trick.

Bug: 26185038
TEST=Added 'BOARD_BVB_ENABLE := true' to hardware/bsp/intel/soc/edison/soc.mk
  and built an image and then ran bvbtool's info_boot_image and
  info_image_hashes commands on the resulting boot.img and system.img
  files and verified that the information was correct. Also ran 'm dist'
  and verified that the boot.img and system.img files in the resulting
  target_files.zip file had similar information.

Change-Id: I08045ed8b0cbddc7c3acdd3a6f2c4bb75cb44bbc
2016-03-18 15:25:43 -04:00
Yohann Roussel
a978779668 Merge "Remove rules for building dex with dx" 2016-03-18 13:50:55 +00:00
Yohann Roussel
c8cfac947b Merge "Remove JILL, JACK_JAR and JILL_JAR" 2016-03-18 08:54:30 +00:00
Pirama Arumuga Nainar
760aec5fdf Switch to clang-2690385
http://b/26987366

Change-Id: I1226f24b50319e321ea538362b2f26fcd227ca39
2016-03-17 13:30:22 -07:00
Pirama Arumuga Nainar
41f4b242e3 Update RenderScript build rules for rebase to LLVM r256229
http://b/26987366

- Use clang-2690385 to build RenderScript toolchain.
- Use armv7-linux-androideabi as the triple used to build RenderScript
  runtime libraries.

Change-Id: I582e8b25bbc38b101a2e765028ed61edbce7bdc2
2016-03-17 13:30:02 -07:00
Colin Cross
50a8120f02 Remove support for device libstdc++ as stl
Prevent platform modules from linking against libstdc++ as their STL
implementation.  NDK modules may still use libstdc++.

Change-Id: I317c9bb90ca7d2e0c1f5770bbdff8075dfe3cc83
2016-03-17 13:10:56 -07:00
Sen Jiang
4e9a86fb6e Merge "Add zlib_fingerprint to target_files.zip" 2016-03-17 19:47:42 +00:00
Chih-hung Hsieh
9d5fb14b2d Merge "Link in ASAN library if my_global_santitize is set." 2016-03-17 16:26:32 +00:00
Yohann Roussel
233584bb80 Remove JILL, JACK_JAR and JILL_JAR
Also ensure that sdk.atree can find jack.jar and jill.jar from prebuilt.

Bug: 27372042
Change-Id: Ie266104e51c09fa21ccb09c1f27ad7068472965c
2016-03-17 15:21:28 +01:00
Dan Willemsen
b6d813ce0a Merge "Add SOONG_ALLOW_MISSING_DEPENDENCIES" 2016-03-16 20:14:27 +00:00
Dan Willemsen
721f9bd316 Add SOONG_ALLOW_MISSING_DEPENDENCIES
Split out Soong's missing dependency option from Unbundled_build. There
are builds other than unbundled builds that don't have a full platform
tree (AOSP llvm branch is one example).

When this is set to true, Soong will defer the error for missing
dependencies until a module is attempted to be built, instead of when
it is reading and generating the build rules. So for platform builds it
will still fail early if something is missing.

Change-Id: I56cb881ff55f5928b77cddc0d67086c3d37e43d7
2016-03-16 12:41:20 -07:00
Sen Jiang
4438fd909e Add zlib_fingerprint to target_files.zip
Test: make dist on edison-userdebug
Bug: 27156099

Change-Id: I4ba9095ecc5bb1730b8d0ba2d56d20fdbff3acaa
2016-03-16 11:28:19 -07:00
Yohann Roussel
22a9e788a7 Fix jack min sdk version for ub branches
Bug: 27371864

(cherry picked from commit d6101b6786)

Change-Id: Idd926f5667fbe4275f8f1d80733b8c4471570874
2016-03-16 17:59:18 +01:00
Przemyslaw Szczepaniak
44fb6241be Merge "Add java.util.stream to whitelisted packages" 2016-03-16 15:52:57 +00:00
Przemyslaw Szczepaniak
fe606f0939 Add java.util.stream to whitelisted packages
Bug: 27692239
Change-Id: I50e671222efc415fb930e5493f1943c5b8f6a71c
2016-03-16 13:45:23 +00:00
Yohann Roussel
c6383d6ec6 Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864

Change-Id: I5db233fe09aed0fae37fe9a92658bc8f24b86cdf
2016-03-16 11:55:46 +01:00
Yohann Roussel
22313f2b2a Remove rules for building dex with dx
This is just to ensure no dex file is built with dx any more, cleaning
of the build rules from Jack optionality is still to be done.

Bug: 27218410
Change-Id: Iea2c66802b6c64c52690ad9d6d487bdce5f50b79
2016-03-16 10:33:02 +01:00
Sen Jiang
d2ca52df8c Merge "Revert "Add zlib_fingerprint to target_files.zip"" 2016-03-16 04:04:41 +00:00
Sen Jiang
040141becb Revert "Add zlib_fingerprint to target_files.zip"
This reverts commit d8c715bf34.

Change-Id: Ie0c3c5b2db89fe076d678b67f013c20e836d825f
2016-03-16 03:38:29 +00:00
Sen Jiang
65aa976153 Merge "Add zlib_fingerprint to target_files.zip" 2016-03-16 02:59:36 +00:00
Chih-Hung Hsieh
ad741e6d66 Link in ASAN library if my_global_santitize is set.
* When my_global_santitize is set and requires ASAN,
  link with ASAN library even when local module is not
  instrumented with ASAN, unless the local module is
  the ASAN library itself.
* Add -Wl,--as-needed to my_ldflags for shared libraries
  so that unneeded ASAN library would not become
  a dependent of the built .so file.
* Change shared file and executable file link argument order
  so that -Wl flags will have effect on linked-in libraries.
* Remove unused ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES.

BUG: 27614834

Change-Id: I4eda6003f1f24e498cba91c043dbe1fabe522686
2016-03-15 16:53:46 -07:00
Shinichiro Hamaji
72904774a3 Replace last -includes by .KATI_DEPFILE
There was a typo in binary.mk. compile-dotdot-XXX-file in
definitions.mk was also using -include.

Bug: 26839129
Change-Id: I4a0145fb70413998cc65d30d2efcd68af07b4800
2016-03-16 06:40:04 +09:00
Stefan Stanacar
25da3a3cf8 ccache: Allow external setting of CCACHE_COMPILERCHECK variable
This patch allows usage of a custom CCACHE_COMPILERCHECK setting
for the special cases when "content" strategy is not enough to ensure
that results retrieved from the cache are accurate for the current
compiler.

BUG=none
Change-Id: I30be5182cfb36ec30f38b9a2fac89290bd5df910
Signed-off-by: Stefan Stanacar <stefan.stanacar@intel.com>
2016-03-15 19:44:21 +02:00
Sami Tolvanen
b1e99acb00 Merge "Revert "Revert "build: pass version and patch level to mkbootimg""" 2016-03-15 17:37:27 +00:00
Sami Tolvanen
3303d909a1 Revert "Revert "build: pass version and patch level to mkbootimg""
This reverts commit 494a9090f9.

Bug: 27498078
Bug: 22914603
Change-Id: Iee6a784271ec32c6bfcc0a6ad3f0395d82016df3
2016-03-15 16:49:30 +00:00
Yohann Roussel
a023f41f13 Merge "Revert "Inform Jack of the min sdk"" 2016-03-15 15:04:54 +00:00
Yohann Roussel
962282bde2 Revert "Inform Jack of the min sdk"
This reverts commit 94451580af.

Bug: 27371864
Change-Id: I60a8c89b2ab8a6cbde4dd3b0aed24b71700815ab
2016-03-15 15:02:11 +00:00
Yohann Roussel
b5ea85a903 Revert "Remove one debug line"
This reverts commit d2fafe5734.

Change-Id: I8915604faafb21cf15c0f11ee8a770be2cfc9614
2016-03-15 14:51:28 +00:00
Yohann Roussel
d2fafe5734 Remove one debug line
Change-Id: I6de104dd2ca42404d45f3f4b91ccadd03d391f1c
2016-03-15 11:06:51 +01:00
Yohann Roussel
10baeeebc4 Merge "Inform Jack of the min sdk" 2016-03-15 09:42:11 +00:00
Dan Willemsen
2d12ce1d88 Always run Soong
Without switching on USE_SOONG, this lets us verify that all builds have
blueprint/soong/go, and can generate a build.ninja file without
producing errors.

Change-Id: I79451ce24c8b5b6745e41d951153265441c33e8a
2016-03-15 00:36:07 +00:00
Shinichiro Hamaji
b95dc31033 Merge "Use KATI_DEPFILE for .P associated with object files" 2016-03-14 21:59:46 +00:00
Dan Willemsen
0314519bf4 Merge "Handle out being a symlink" 2016-03-14 19:35:43 +00:00
Neil Fuller
0e8ec505f6 Make the language version selection smarter
Any artifacts that are targeting SDK versions < 24
and not explicitly setting the LOCAL_JAVA_LANGUAGE_VERSION
are now defaulted to 1.7.

Bug: 27495650
Bug: 26753820
Bug: 27377071
(cherry-picked from commit decb797276)

Change-Id: I0734b6e690bea32def3dc435c9ce0bd90b845e79
2016-03-14 11:40:01 +00:00
Dan Willemsen
d53c0c7b45 Handle out being a symlink
Soong needs to be able to reverse the relative path to out. Switch to
absolute paths if .. won't work because of out being a symlink to
somewhere else.

Bug: 27612837
Change-Id: Ib8b9e0f80523148cfd4b69a03d164578916d8fd5
2016-03-11 16:29:23 -08:00
Yohann Roussel
94451580af Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-11 11:55:57 +01:00
Sami Tolvanen
926096eff6 Merge "Revert "build: pass version and patch level to mkbootimg"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen
494a9090f9 Revert "build: pass version and patch level to mkbootimg"
This reverts commit 8fb47f191f.

Bug: 27580174
Change-Id: Id87fd1e8da217438757d5a0fa4bbef7aea6770fc
2016-03-11 00:08:57 +00:00
Stephen Hines
bda10679be Merge "Switch to clang-2658975." 2016-03-10 22:46:01 +00:00
Sen Jiang
d8c715bf34 Add zlib_fingerprint to target_files.zip
Test: make dist
Bug: 27156099

Change-Id: I4608de70ad4dfe6523b832bbf7002dcccefe932f
2016-03-10 13:46:47 -08:00
Dan Willemsen
b8744a26e4 Merge "Use hermetic ckati/makeparallel prebuilts" 2016-03-10 07:22:37 +00:00
Joe Onorato
fcec686a25 Turn off excess printing during the build which makes errors harder to find.
Change-Id: I588de5ddc0aa7dcaacc4ea185c13c2fa3748888a
(cherry-pick from commit 401ffaeb75)
2016-03-09 18:09:02 -08: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
Todd Kennedy
27c3223a77 Merge "Define TARGET_OUT_VENDOR_APPS_PRIVILEGED" 2016-03-09 20:54:22 +00:00
Dan Willemsen
ee4a6fa59e OSX: Use the oldest SDK, but always set our target to 10.8
Build binaries usable on older machines even if older SDKs are not
installed. Older SDKs can no longer be installed on newer Xcode
versions.

Change-Id: I0c9f2534466a127a19107820879c2856bfac0076
2016-03-09 10:52:59 -08:00
Dan Willemsen
e607224349 Merge changes I1fccee8d,Ib343df6d,I2f1984c2
* changes:
  Fix C++ on Darwin
  Remove support for /Developer
  Remove support for Darwin 10.6 SDK
2016-03-09 18:31:17 +00:00
Dan Willemsen
441d646c6f Fix C++ on Darwin
We've been including the system libc++ headers even if we're building
against our version of libc++. Stop doing that, and only add the headers
to our path if we're using the system libraries.

If nothing is specified, on recent OSX versions, libc++ is the default
c++ library instead of libstdc++. We've been explicitly including the
libc++ headers on all versions, but that breaks old versions. Force us
over to libc++, since the system libstdc++ does not support C++11, and
libc++ is still supported on our oldest version (10.8).

Change-Id: I1fccee8da0f425e10ccc9d3247ed40664eb6ada0
2016-03-08 20:15:21 -08:00
Dan Willemsen
2a24bad8cc Remove support for /Developer
/Developer was removed in Xcode 4.3. Our minimum SDK version is 10.8,
which implies at least Xcode 4.4, and our documentation requires
Xcode 4.5.2.

Change-Id: Ib343df6ded6e98222d8ee2e542e1f3fadd2b1397
2016-03-08 13:53:15 -08:00
Dan Willemsen
fcefd5f6d8 Remove support for Darwin 10.6 SDK
Our minimum version is 10.8

Change-Id: I2f1984c2227861a3c784f2a5070853c2d1b250d6
2016-03-08 13:22:36 -08:00
Sami Tolvanen
450f15111c Merge "build: pass version and patch level to mkbootimg"
am: b32d845090

* commit 'b32d845090d19d2dfbbf32d4628ef81478325927':
  build: pass version and patch level to mkbootimg
2016-03-08 16:08:14 +00:00
Sami Tolvanen
b32d845090 Merge "build: pass version and patch level to mkbootimg" 2016-03-08 16:02:24 +00:00
Dan Willemsen
90074f7f1f Merge "Reexport include dirs for whole static libs"
am: e2379484ab

* commit 'e2379484ab96e7e5f9a60061557e492068ef1789':
  Reexport include dirs for whole static libs
2016-03-08 00:16:45 +00:00
Dan Willemsen
e2379484ab Merge "Reexport include dirs for whole static libs" 2016-03-08 00:14:02 +00:00
Martin Blumenstingl
7b578cbf10 Merge "Removed duplicate definition of E2FSCK"
am: d7a4e56a87

* commit 'd7a4e56a87c324378e60f5989a14a5d5addfd456':
  Removed duplicate definition of E2FSCK
2016-03-08 00:05:12 +00:00
Colin Cross
d7a4e56a87 Merge "Removed duplicate definition of E2FSCK" 2016-03-07 23:54:40 +00:00
Elliott Hughes
9c34174b76 Merge "Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark."
am: ef0c20621d

* commit 'ef0c20621d7b82f25f8fa669a0b2d8031588169d':
  Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark.
2016-03-07 21:22:53 +00:00
Elliott Hughes
ef0c20621d Merge "Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark." 2016-03-07 21:17:45 +00:00
Ying Wang
ad68d904a1 Merge "Fix dumping variables of absolute paths."
am: dd70b91060

* commit 'dd70b9106079f39738c129c6f874576748f92d3e':
  Fix dumping variables of absolute paths.
2016-03-07 20:04:13 +00:00
Sami Tolvanen
8fb47f191f build: pass version and patch level to mkbootimg
Add --os_version and --os_patch_level arguments to mkbootimg.

Needs matching changes from
  I57682611e0c27fec5ed284da7d9a788383ff98b1

Bug: 27498078
Bug: 22914603
Change-Id: I04e20b0de40d864aac92ac7bcf466a6cbde3d0e4
2016-03-07 11:55:22 -08:00
Ying Wang
80ceadc945 Fix dumping variables of absolute paths.
Calling $(abspath) is better than checking and prepending $(PWD) if
necessary.

Bug: 27429759
Change-Id: Ia156f8a5d6b88b6090f4d23c7f9166bd62d3ab70
2016-03-07 11:30:35 -08:00
Martin Blumenstingl
764f9339f1 Removed duplicate definition of E2FSCK
Change-Id: I810711ad05e198ee1f9606c37649e80df7b55fa5
2016-03-06 22:38:19 +01:00
Ying Wang
87545466a8 Merge "Delete relics left behind by commit 86e6b7ed51 ."
am: 880c9ffe7a

* commit '880c9ffe7a47c163f986f7bc02963bbde1c83c0f':
  Delete relics left behind by commit 86e6b7ed51 .
2016-03-05 00:32:27 +00:00
Ying Wang
880c9ffe7a Merge "Delete relics left behind by commit 86e6b7ed51 ." 2016-03-05 00:29:00 +00:00
Ying Wang
2fdafd2596 Delete relics left behind by commit 86e6b7ed51 .
Change-Id: I81febc28f471727fc37335b11e47749753a57997
(cherry-pick from commit 0f59fdf30d)
2016-03-04 16:28:01 -08:00
Dan Willemsen
14950e0db7 Merge "Tell soong about MALLOC_SVELTE"
am: fd2691c35f

* commit 'fd2691c35f6e0c7b5339befa8afefaebdfb72283':
  Tell soong about MALLOC_SVELTE
2016-03-04 23:55:48 +00:00
Dan Willemsen
fd2691c35f Merge "Tell soong about MALLOC_SVELTE" 2016-03-04 23:53:36 +00:00
Stephen Hines
c503d8ef58 Switch to clang-2658975.
Bug: http://b/27482631

This fixes an issue where krait compiles were not passing the proper
flags to the assembler when -no-integrated-as is used. This was
preventing ART from switching to clang in some cases.

Change-Id: I24966bf1ff84305df3586ab01d1aae7d5922aa11
2016-03-04 14:40:56 -08:00
Dan Albert
1bbd4dac85 Merge "Get gtest includes from the exported headers."
am: f8b170dc52

* commit 'f8b170dc52575f16a63bfd6b6710efb46580c8b2':
  Get gtest includes from the exported headers.
2016-03-04 22:34:39 +00:00
Dan Albert
f8b170dc52 Merge "Get gtest includes from the exported headers." 2016-03-04 22:30:58 +00:00
Elliott Hughes
577f8407e9 Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark.
Bug: http://b/24803663
Change-Id: I1565cf680298a1765e88162d8b0e59dedba29bd7
2016-03-04 13:37:43 -08:00
Dan Willemsen
851983bbf2 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S"
am: 6d813d8c92

* commit '6d813d8c9223ba6e55e98f23a8a8c2248466feff':
  Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
2016-03-04 20:59:24 +00:00
Dan Willemsen
6d813d8c92 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S" 2016-03-04 20:52:57 +00:00
Dan Willemsen
a7808accf4 Reexport include dirs for whole static libs
When a static library uses LOCAL_EXPORT_C_INCLUDE_DIRS, then is included
entirely in another library with LOCAL_WHOLE_STATIC_LIBRARIES, all the
symbols are reexported, so reexport the headers too.

Change-Id: I92cf17894fc991a5b5ecb59ca5e095e407c98de4
2016-03-04 12:47:37 -08:00
Ying Wang
be81620114 Merge "Speed up lunch/tapas/etc. shell utility functions."
am: d3c08f8b76

* commit 'd3c08f8b763c1d8f865896cf7d03d1794bdd14fe':
  Speed up lunch/tapas/etc. shell utility functions.
2016-03-04 19:06:53 +00:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Ying Wang
9f68962c47 Merge "Align up java-lib-files and java-lib-deps."
am: 58b8c86f84

* commit '58b8c86f84ad0bf8fb3bb7dfc259fd1e3ce0dae1':
  Align up java-lib-files and java-lib-deps.
2016-03-04 18:54:25 +00:00
Ying Wang
ea04f821fc Align up java-lib-files and java-lib-deps.
- For host Java libraries, java-lib-files should return javalib.jar.
- Host dalvik Java libraries are special: factor out
  host-dex-java-lib-files.
- Be explict that jack-lib-deps equals jack-lib-files.

Bug: 27451686
Change-Id: I9235384354e119ef7ebbf29b7e525d1ceea242e0
(cherry-pick from commit 063d0455e0)
2016-03-04 10:39:24 -08:00
Neil Fuller
55d4ec523e Merge "Add JarJar support to BUILD_HOST_JAVA_LIBRARY"
am: b97ce3bb61

* commit 'b97ce3bb613c1ea18c9aea42e829ac34039b7679':
  Add JarJar support to BUILD_HOST_JAVA_LIBRARY
2016-03-04 13:09:22 +00:00
Neil Fuller
b97ce3bb61 Merge "Add JarJar support to BUILD_HOST_JAVA_LIBRARY" 2016-03-04 12:58:45 +00:00
Neil Fuller
432bdaa2f7 Add JarJar support to BUILD_HOST_JAVA_LIBRARY
This will allow us to convert icu4j-icudata / icu4j-icutzdata
targets to "host" targets rather than "target" targets.
Right now they are forcing Jack off just so they can use
javac + jarjar (even though the resulting file is used on
host).

Bug: 27218410
(cherry picked from commit 30b21ad579)

Change-Id: I4f16896606bcfdd00164078eeb142d05b29bb832
2016-03-04 12:02:40 +00:00
Dan Willemsen
df9acac680 Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
Target assembly files do not get these cflags, align the host
definitions to do the same.

Change-Id: Idadfa1f367c3ebea44460c5798225a85dd319371
2016-03-03 17:38:16 -08:00
Yabin Cui
a72e7dbd9c Merge "Enable LOCAL_POST_LINK_CMD for non-static executables."
am: 1f310530fc

* commit '1f310530fcd3c15b0d5d2b067d1ad320bc4faef2':
  Enable LOCAL_POST_LINK_CMD for non-static executables.
2016-03-03 19:02:56 +00:00
Yabin Cui
1f310530fc Merge "Enable LOCAL_POST_LINK_CMD for non-static executables." 2016-03-03 18:59:38 +00:00
Shinichiro Hamaji
4037c4225a Use KATI_DEPFILE for .P associated with object files
Also specify "-d keepdepfile" to ninja so .P files won't be
deleted by ninja.

-include for .s files are removed because GCC doesn't
generate .d files for .s files.

Bug: 26839129
Change-Id: If00e93c7a33449ec314a5cdba438475a32979f4e
2016-03-03 18:19:37 +09:00
Dan Willemsen
4fd64d06cb Add LOCAL_CTS_GTEST_LIST_EXECUTABLE
Change-Id: I9bca66d0e0ef25264b6576d907fa57997e62e8c1
2016-03-02 21:24:04 -08:00
Yabin Cui
273e9109c1 Enable LOCAL_POST_LINK_CMD for non-static executables.
It is needed to insert testdata section into simpleperf cts test.

Bug: 27387280
Change-Id: I58cea106d135f535626d8624a016bd2aaceeb8ea
2016-03-02 17:04:11 -08:00
Dan Albert
e5ecdc967d Get gtest includes from the exported headers.
Change-Id: I47db781a36318664fabff8a5e75031c6bee674e4
2016-03-02 13:05:46 -08:00
Ying Wang
6aa24e6301 Merge "Clean generated source dir if .proto/.rs is gonee."
am: 591fa1284a

* commit '591fa1284aa29ec8b2ff8917ce86f81c5b14ad0a':
  Clean generated source dir if .proto/.rs is gonee.
2016-03-02 19:21:23 +00:00
Ying Wang
96d79c5366 Merge "Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS"
am: de9e5d40ef

* commit 'de9e5d40ef8d9433ad22bb41fa428c7cec5e1549':
  Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS
2016-03-02 19:21:12 +00:00
Ying Wang
ce7ea68394 Clean generated source dir if .proto/.rs is gonee.
Similar to how we clean the generated source dir if .aidl becomes
obsolete.

Bug: 26688474
Change-Id: I66c5b6d6513259b5f4f4bac84f384f4bf953d82a
(cherry-pick from commit d5ffec9383)
2016-03-02 10:59:59 -08:00
Ying Wang
6efe88ba95 Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS
So that we can disable only one in multilib modules.

Bug: 27442756
Change-Id: I4ca379fac997f9165c47cb93d34bf1f483f5a241
(cherry-pick from commit b6eb8ddbde)
2016-03-02 10:59:23 -08:00
Dan Willemsen
e39455faa2 Merge "Ensure prebuilt executables are executable"
am: c92dc59c86

* commit 'c92dc59c86f09526735625c605b8e7ded1070e90':
  Ensure prebuilt executables are executable
2016-03-02 18:25:58 +00:00
Dan Willemsen
c92dc59c86 Merge "Ensure prebuilt executables are executable" 2016-03-02 18:12:07 +00:00
Yohann Roussel
4fd0463191 Merge "Use Jack to check build"
am: 6a9d0f9718

* commit '6a9d0f9718f127475d702ae6831a2bec3be976b6':
  Use Jack to check build
2016-03-02 09:04:20 +00:00
Yohann Roussel
6a9d0f9718 Merge "Use Jack to check build" 2016-03-02 08:46:24 +00:00
Dan Willemsen
08420cbc8a Ensure prebuilt executables are executable
Use 'chmod +x' to make sure that they're executable, even if the source
file is not.

Change-Id: Id155f6b4ff188f5c909fd6237fd64183af264f79
2016-03-01 22:11:41 -08:00
Dan Willemsen
60899eddd7 Tell soong about MALLOC_SVELTE
Change-Id: I50ce6c0767db8963a7a633bdb349db1c96427cd8
2016-03-01 21:00:26 -08:00
Dan Willemsen
cdaf748e3a Merge changes I12810c1b,I62287a80,Ied96fdc3
am: a65b01fc09

* commit 'a65b01fc09b47c83e59dc4757c76eafba1e15cbc':
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
2016-03-01 23:19:33 +00:00
Dan Willemsen
a65b01fc09 Merge changes I12810c1b,I62287a80,Ied96fdc3
* changes:
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
2016-03-01 23:18:27 +00:00
Ari Hausman-Cohen
1d59db0794 Merge "Adding a brillo_tests task."
am: 3bbaa8a8ff

* commit '3bbaa8a8ffe18a2afc3d9d2ee36dfcf74775aba8':
  Adding a brillo_tests task.
2016-03-01 22:45:24 +00:00
Ari Hausman-Cohen
3bbaa8a8ff Merge "Adding a brillo_tests task." 2016-03-01 22:38:07 +00:00
Dan Willemsen
479311bc7c Remove LOCAL_ACP_UNAVAILABLE
Now that copy-file-to-target doesn't use acp, nothing in the acp build
path uses acp, so we don't need to special case it to prevent loops.

Change-Id: I12810c1b064d0c03135a80077a76bc4c9cc18b24
2016-03-01 13:16:53 -08:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Dan Willemsen
f1a98af5fc Replace some uses of acp with cp
ACP was originally created to overcome differences with cp between
Linux, Darwin, and Windows. We've since dropped Windows as a build host,
and don't use features like '-u' anymore.

For most of our current usecases, 'acp' is identical to 'cp' except that
it splits 'cp -p' into 'acp -p' for mode and ownership, and 'acp -t' for
timestamps. On Linux, this could be specified using
'--preserve=mode,ownership', but Darwin doesn't have this.

Since we're removing the destination file before copying, 'cp' already
preserves the mode (modulated by the umask). So the only extra thing
that gets preserved with 'acp -p' is ownership, which we should not care
about in the build system. (In many cases we shouldn't be preserving
mode either, so that readonly source trees can actually be marked
readonly, but that will be a future change)

Change-Id: Ied96fdc303ac5c774347c07363daec8b6dfb22e4
2016-03-01 13:08:50 -08:00
Dan Willemsen
4914c9b28e Merge "Remove unused config variables"
am: 1dde47d0b6

* commit '1dde47d0b6796c3f9c1ec2d41c6c2597f9f13242':
  Remove unused config variables
2016-03-01 18:50:46 +00:00
Dan Willemsen
1dde47d0b6 Merge "Remove unused config variables" 2016-03-01 18:49:37 +00:00
Dan Willemsen
e401e09a3c Merge "Remove destination before copying file"
am: 469665ded5

* commit '469665ded53d758a6cb5b5462e1219efe4135108':
  Remove destination before copying file
2016-03-01 18:21:17 +00:00
Dan Willemsen
469665ded5 Merge "Remove destination before copying file" 2016-03-01 18:20:06 +00:00
Yohann Roussel
ee57268cd7 Use Jack to check build
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.

Bug: 19069325

(cherry picked from commit 43084d9f49)

Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
2016-03-01 16:34:08 +01: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
Dan Willemsen
de17aac9a0 Merge "Remove special cases in installclean"
am: fc7c3d33b8

* commit 'fc7c3d33b8b32042f8c12687fd269270b4e8ec90':
  Remove special cases in installclean
2016-03-01 07:06:44 +00:00
Dan Willemsen
fc7c3d33b8 Merge "Remove special cases in installclean" 2016-03-01 07:04:40 +00:00
Dan Willemsen
3545eeb6c1 Remove destination before copying file
If there's a symlink as the destination to one of these macros,
currently we'll write to the destination of that symlink instead of
overwriting the symlink. We've run into this a few times when a module
is added to replace a symlink that used to exist via
LOCAL_POST_INSTALL_CMD. These have required manual discovery, and
additions to CleanSpec.mk files:
http://android-review.googlesource.com/143334

Use `rm -f` for single-file targets to remove the destination before
copying. On Linux, `cp --remove-destination` can work, but is not
supported by Darwin or acp.

There may still be problems with dependencies when symlinks are
involved, since ninja will use the destination of the symlink to check
whether it is up to date. But at least with this change, if any
dependency gets regenerated, we'll properly reset the file.

Change-Id: I6d3ac0bd9ced5e21a0ff9dad0eaff012a7bc9c75
2016-02-29 22:22:29 -08:00
Duane Sand
cc1a0fdde1 Enable asan/ubsan for mips
Change-Id: I1f3c89d6ca08d109e7d2a6d32448ff248a98daac
2016-02-29 15:42:38 -08:00
Olof Johansson
5cbf049710 Merge "sandybridge setup: no AES_NI, AVX, MOVBE"
am: b044f082e6

* commit 'b044f082e62dd8ac3d2a08b209c95842fb30838e':
  sandybridge setup: no AES_NI, AVX, MOVBE
2016-02-29 23:27:59 +00:00
Olof Johansson
b044f082e6 Merge "sandybridge setup: no AES_NI, AVX, MOVBE" 2016-02-29 23:27:04 +00:00
Dan Willemsen
7574cb582d Remove special cases in installclean
When switch build types or products, it's no longer necessary to special
case these projects that change their command line based on the build
type or product. Ninja keeps track of the command line last used to
create a file, and will mark it as dirty if the new command line is
different.

Change-Id: I905ff9599eae2952bddc05e7328f77f0849be20a
2016-02-29 15:15:16 -08:00
Dan Willemsen
d73633c082 Merge "Remove USE_NINJA=false"
am: 3bfc095f53

* commit '3bfc095f5373ca1756923f8aacdebdadc8ebd4ea':
  Remove USE_NINJA=false
2016-02-29 22:17:29 +00:00
Dan Willemsen
3bfc095f53 Merge "Remove USE_NINJA=false" 2016-02-29 22:16:14 +00:00
Ari Hausman-Cohen
746f40236b Adding a brillo_tests task.
Places whitelisted brillo tests and the whitelist itself
in a zip when run.

BUG: 27385399
Change-Id: I93c2ea8cc521292a6de811bb47bc87a727edd21f
TEST: manual make dist brillo_tests, confirmed desired files were in zip.
2016-02-29 13:48:06 -08:00
Nick Kralevich
7cf7bc0956 Merge "delete recovery policy on changing build types"
am: 1888ea5fef

* commit '1888ea5fef5f41ec3298bfd67f14b06e6dfb6f9c':
  delete recovery policy on changing build types
2016-02-29 16:46:08 +00:00
Nick Kralevich
1888ea5fef Merge "delete recovery policy on changing build types" 2016-02-29 16:44:37 +00:00
Nicolas Geoffray
efe15f7429 Merge "Check LEGACY_USE_JAVA7 before using 1.8."
am: 239783a7ff

* commit '239783a7ff9691ec92034f0268eeebbe75e906e3':
  Check LEGACY_USE_JAVA7 before using 1.8.
2016-02-29 12:29:31 +00:00
Nicolas Geoffray
8d772e26b4 Check LEGACY_USE_JAVA7 before using 1.8.
Fixes current bots not updated to Java8 yet.

Change-Id: I61f5a3f0de6ca0ee9eca64f0ee08454f93e59704
2016-02-29 12:08:42 +00:00
Shinichiro Hamaji
8f9b8ddf00 Merge "Link everything in libpthread.a to ckati"
am: a9b464770b

* commit 'a9b464770bf2a2a2cff279eb6042477786798d24':
  Link everything in libpthread.a to ckati
2016-02-29 11:05:46 +00:00
Shinichiro Hamaji
a9b464770b Merge "Link everything in libpthread.a to ckati" 2016-02-29 11:04:36 +00:00
Neil Fuller
59a8afcc88 Merge "Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8"
am: 008ebe4f04

* commit '008ebe4f04e41ef500bdbcab1b58cadcaec54cb5':
  Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8
2016-02-29 10:59:44 +00:00
Neil Fuller
008ebe4f04 Merge "Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8" 2016-02-29 10:58:09 +00:00
Nick Kralevich
3cb10bbd3b delete recovery policy on changing build types
When the build type changes (for example, from "shamu-userdebug"
to "shamu-user"), the build system doesn't delete all files
and start over. Rather, build artifacts from the old build type
are reused for the new build type.

This is problematic for the recovery SELinux policy, which differs
between build types. Reusing a userdebug policy on a user build
is inappropriate and could lead to security bugs.

Force the deletion of the recovery SELinux policy when changing
build types, so it can be properly regenerated. This is consistent
with how we treat the normal SELinux policy (see commit
a8b3d54101).

Change-Id: I4ebafe3712dc121644828f6538865061aad58cc0
2016-02-27 10:41:41 -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
Colin Cross
44c7b4b80b Merge "Make multiple rules to generate a file an error"
am: 5e2e53e421

* commit '5e2e53e4216300aa841d65f95dd607be58983a14':
  Make multiple rules to generate a file an error
2016-02-27 05:14:02 +00:00
Dan Willemsen
5e2e53e421 Merge "Make multiple rules to generate a file an error" 2016-02-27 05:12:28 +00:00
Neil Fuller
db47d66b5e Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8
Modify the compiler flags for Jack and javac.

This has the following effects:
1) Generally, some of the type inference rules changed.
2) javac: bytecode is generated with the v52 major version (not v51)
3) jack: Java 8 language features are supported.

The javac / dx toolchain does not support Java 8 language features.

Bug: 26753820
(cherry picked from commit fda1ace26116a6677cc77c92c24e5259817fb86e)

Change-Id: I07769de473775d95b13feb38c0eb37086eb120f7
2016-02-26 14:56:38 +00:00
Shinichiro Hamaji
f4511161d5 Link everything in libpthread.a to ckati
With this workaround, we can delete a lot of unnecessary code
in ckati: https://github.com/google/kati/commit/8380fb8525adfb5

Change-Id: I3de1bf4cd6f2a65ee9322e8504459621871612fc
2016-02-26 17:03:55 +09:00
Dan Albert
2b8c384da3 Merge "Add a global define for non-external code."
am: 036b4fce25

* commit '036b4fce2516dfa755f6f9e5566b537ca81de5db':
  Add a global define for non-external code.
2016-02-25 22:20:40 +00:00