Commit Graph

5798 Commits

Author SHA1 Message Date
Yi Kong
599a6032fc Switch to clang-4579689.
Bug: 68397894
Test: http://go/clang-4523590-testing
Change-Id: Ief806250572fe2cc5f39b4c47ff74863acbbb26d
2018-02-01 10:23:32 -08:00
Yi Kong
96548ad441 Add environment variable to globally disable LTO
am: 03d383d038

Change-Id: I4b14aaf2380ca7f768e84574778f769ce3b54d98
2018-02-01 08:45:03 +00:00
Yi Kong
03d383d038 Add environment variable to globally disable LTO
Allow developers to disable LTO to reduce build time.

Test: m checkbuild
Test: DISABLE_LTO=true m checkbuild
Bug: 62839002
Change-Id: I30642e3cfff60c4874a2f8797d08105b4e07cc6d
2018-01-31 16:26:12 -08:00
Pirama Arumuga Nainar
db22f2a700 Merge "Store missing profile files into a Make variable"
am: 407c2434c8

Change-Id: Iacb15d1bdb64e3a10d97fbeace8572308488ed5a
2018-01-30 06:41:09 +00:00
Treehugger Robot
407c2434c8 Merge "Store missing profile files into a Make variable" 2018-01-30 06:34:15 +00:00
Dan Willemsen
4a93b0ea47 Merge "Move namespace mutator earlier to support defaults"
am: 750024367e

Change-Id: I847c756fa7be5d75d09b9b2e70577b09b4ecec42
2018-01-30 00:28:34 +00:00
Dan Willemsen
750024367e Merge "Move namespace mutator earlier to support defaults" 2018-01-30 00:16:13 +00:00
Nan Zhang
f522b991a7 Change syntax for jacoco filter wildcard params.
am: ffe2c1c369

Change-Id: If12e81ccfcf765b09439f14e1f848bed95209e6f
2018-01-29 22:16:39 +00:00
Nan Zhang
ffe2c1c369 Change syntax for jacoco filter wildcard params.
originally:
.* -> /**/*.class
now:
.* -> /*.class
.** -> /**/*.class

Also add NinjaAndShellEscape to allow filtering inner classes with $ in
the name.

Test: unittests.
Bug: b/71889972
Merged-In: Ifb8d7daa22bee02346885171edb15180af18f0de
Change-Id: Ifb8d7daa22bee02346885171edb15180af18f0de
(cherry picked from commit c61066684d5c8ddf600af602852c32fce6e6c6f4)
2018-01-29 12:46:26 -08:00
Pirama Arumuga Nainar
28316d4e3b Store missing profile files into a Make variable
Bug: http://b/72642679

Store missing profile files and the modules that refer to them in the
SOONG_MODULES_MISSING_PGO_PROFILE_FILE variable passed to Make.  The
contents of this variable will be written to
$DIST_DIR/pgo_profile_file_missing.txt as part of the 'dist' target.

Test: 'm dist' and verify creation of pgo_profile_file_missing.txt.
Change-Id: I237cd0398be418be2b7db6fa65ece5ef347ecbc1
2018-01-29 10:02:27 -08:00
Dan Willemsen
6e72ef7225 Move namespace mutator earlier to support defaults
The prebuilts and defaults mutators start adding some dependencies, so
for them to be able to reference imported modules, we need to
run the namespace mutator earlier.

Test: m nothing
Test: Try to use a global defaults module from a namespace
Change-Id: I6e853d20e32251d0fd33c8b2dcc26c0695b808fd
2018-01-26 20:21:18 -08:00
Pirama Arumuga Nainar
4bae924254 Merge "Support instrumenting all PGO-enabled modules"
am: ad4692d5af

Change-Id: I4fad8cae6b95bfcbed8e5598b6c331d60bd7fb0c
2018-01-26 03:02:45 +00:00
Treehugger Robot
ad4692d5af Merge "Support instrumenting all PGO-enabled modules" 2018-01-26 02:52:44 +00:00
Dan Willemsen
159ac4044b Export system module library list to Make
am: 1dde427375

Change-Id: I51ec4199faa8b088fe9fd4679c690d8855a64dc9
2018-01-26 01:05:00 +00:00
Dan Willemsen
1dde427375 Export system module library list to Make
Bug: 38177569
Test: EXPERIMENTAL_USE_OPENJDK9=true m nothing
      check out/soong/Android-aosp_arm.mk
Change-Id: If35e913c7203c12f4305e74919c0df76a8443253
2018-01-25 14:51:50 -08:00
Stephen Hines
11a27f61e3 Prebuilt sanitizer libraries should always come from linux-x86.
am: 755fe07256

Change-Id: If34b470432858ede8af06dc2d1a6fe970fa16346
2018-01-25 14:55:03 +00:00
Jaekyun Seok
2b6236308b Use product instead of oem for Product specific module
am: 5cfbfbb67a

Change-Id: I3db5f0036c271d9e0b9e86ba139eec689dcac16d
2018-01-25 04:04:04 +00:00
Stephen Hines
755fe07256 Prebuilt sanitizer libraries should always come from linux-x86.
Bug: http://b/68397894
Test: Build on darwin with new toolchain.
Change-Id: I4d81efdc84d0b6f07482206430252ea63a4b081b
2018-01-24 19:58:36 -08:00
Jaekyun Seok
5cfbfbb67a Use product instead of oem for Product specific module
Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.
Change-Id: Icc4f8c16bc389fe20db680849f311d02df1299c3
2018-01-25 07:50:35 +09:00
Andreas Gampe
1b1936c487 Merge "Soong: support Errorprone javacflags"
am: fdc2b3bebe

Change-Id: I67b78c4620c14eb0b3b2f7d03dc3a7afae4f68e1
2018-01-24 19:54:11 +00:00
Treehugger Robot
fdc2b3bebe Merge "Soong: support Errorprone javacflags" 2018-01-24 19:30:02 +00:00
Dan Willemsen
d4b4154ee3 Make GOROOT consistent
am: e7945d76ac

Change-Id: I823de19497ce5fdcde74b330ada8ab37ef1c2783
2018-01-24 17:42:47 +00:00
Dan Willemsen
e7945d76ac Make GOROOT consistent
We were previously setting GOROOT to "prebuilts/go/linux-x86" during the
ninja executions when we were running Soong. But we can also run Soong
during the main ninja execution, were GOROOT was unset. When the GOROOT
was unset, the default GOROOT in our Go installation is
"./prebuilts/go/linux-x86" (note the extra ./).

This would cause g.bootstrap.goRoot to change between some soong runs,
causing us to rebuild all go programs (and anything depending on them)
more often than necessary.

So instead, keep GOROOT undefined when running Soong. Everything that
matters is using runtime.GOROOT(), which will fall back to the default.

Continue setting $GOROOT for bootstrap.bash, otherwise it fails when
there is no system provided go binary. What we give bootstrap.bash
doesn't really matter, since we don't actually use the blueprint wrapper
in Android.

Test: m blueprint_tools; touch bionic/libc/tzcode/new.c;
      m blueprint_tools <doesn't rebuild everything>
Change-Id: I82f30c7c3b5d25e5cbf28fe37a97fdb776c4a164
2018-01-23 22:56:17 -08:00
Andreas Gampe
f3e5b558e7 Soong: support Errorprone javacflags
Add support for an errorprone block in Java modules that accepts
additional javacflags for the errorprone build.

Sample:

    errorprone: {
        javacflags: ["-Xep:EqualsNaN:WARN"],
    },

Bug: 72004718
Test: m RUN_ERROR_PRONE=true
Test: manual - add block with ERROR to a project
Test: androidmk_test
Change-Id: I502248fe76c26aa19102f413af72a7324c35b7f4
2018-01-23 20:30:01 -08:00
Justin Yun
04e36e89df Skip installing the VNDK prebuilt if arch does not match
am: 312ccb974f

Change-Id: If3e8194feb7ab337ef16fd6a30d1408a36194059
2018-01-23 23:03:35 +00:00
Justin Yun
312ccb974f Skip installing the VNDK prebuilt if arch does not match
For the VNDK prebuilt modules that does not match the target arch,
skip installing the module instead of marking the module to prevent
installing.

Bug: 72310137
Bug: 71787263
Test: Install VNDK snapshot v27
      lunch aosp_arm64_ab-userdebug; m vndk_v27_arm64
      - vndk libs must be installed
      m vndk_v27_arm
      - no vndk libs must be installed because target does not match
      OUT_DIR=out_clean m --skip-make

Change-Id: I9df25d90c276ce5e0d94ec7f9bee32f9ce7231df
2018-01-24 07:52:47 +09:00
Pirama Arumuga Nainar
aaa3e473e9 Add only compiler-flag dependencies as implicit
am: f231b19017

Change-Id: Iee9cea01fc419c9a4df0b0ff5d2e82fa45f48390
2018-01-23 22:08:48 +00:00
Pirama Arumuga Nainar
f231b19017 Add only compiler-flag dependencies as implicit
Bug: http://b/72343691

Change https://android-review.googlesource.com/c/572758, in addition to
dependencies from the compiler flags, also marked all exported
dependencies as implicit.  This can cause lots of unnecessary
recompiles.  This change moves exported dependencies back as order-only
dependencies.

Test: 1. mma in art after changing profile_compilation_info.h triggers
         only a limited number of recompiles.
      2. verify that changes to PGO profile files trigger recompiles.

Change-Id: Icb0f4cd2b6da0add3b6e5206661e6aa7a577602f
2018-01-23 11:24:33 -08:00
Jiyong Park
ee33e88111 Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS"
am: d89f6621ae

Change-Id: I1e5f9cca5412ad95c8d0e74a539408a5ea47258b
2018-01-23 18:38:16 +00:00
Pirama Arumuga Nainar
e236b5acfa Support instrumenting all PGO-enabled modules
Bug: http://b/63768402

If ANDROID_PGO_INSTRUMENT has "all" or "ALL", all PGO-enabled modules
are built for profile generation.

Test: Build with and without 'all' in ANDROID_PGO_INSTRUMENT
Change-Id: I3b1a9b562775e80a4ab3965100341d9e8e4ffde9
2018-01-22 20:26:16 -08:00
Treehugger Robot
d89f6621ae Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" 2018-01-23 03:35:19 +00:00
Logan Chien
aef07f2351 Support VNDK extensions
am: f351174107

Change-Id: Ic8694308013e535da7431da1520e5ea023f5f0e1
2018-01-23 02:19:20 +00:00
Logan Chien
f351174107 Support VNDK extensions
This commit adds `extends: "name"` property and provides basic support
to VNDK extensions.  This is the simplest example:

```
cc_library {
    name: "libvndk",
    vendor_available: true,
    vndk {
        enabled: true,
    },
}

cc_library {
    name: "libvndk_ext",
    vendor: true,
    vndk: {
        enabled: true,
        extends: "libvndk",
    },
}
```

A vndk extension library must extend an existing vndk library which has
`vendor_available: true`.  These two libraries must have the same
`support_system_process` property.

VNDK-ext libraries are installed to `/vendor/lib[64]/vndk` and
VNDK-SP-ext libraries are installed to `/vendor/lib[64]/vndk-sp` by
default.

If there is a matching abi-dumps in `prebuilts/abi-dumps`,
`header-abi-diff` will be invoked to check for ABI breakages.

Bug: 38340960

Test: lunch aosp_walleye-userdebug && make -j8   # runs unit tests

Test: lunch aosp_arm-userdebug && make -j8  # build a target w/o VNDK

Test: Create a lsdump for a vndk lib, add an exported API to vndk lib,
and build fails as expected.

Test: Create a lsdump for a vndk lib, create an vndk extension lib with
extra API, and build succeeds as expected.

Test: Create libutils_ext, add an extra function to libutils_ext, and
call it from a HIDL service.

Change-Id: Iba90e08848ee99814405457f047321e6b52b2df0
2018-01-23 01:40:54 +00:00
Dan Willemsen
6dd0600225 Merge "Normalize LANG / LC_* environment"
am: a167e3ba42

Change-Id: I4a3a05923dc486911e9597db2fdc49a4ea9e133a
2018-01-23 00:28:32 +00:00
Treehugger Robot
a167e3ba42 Merge "Normalize LANG / LC_* environment" 2018-01-23 00:15:29 +00:00
Dan Albert
bc341ee329 Fix static_ndk_lib for sanitized libraries.
am: 7d1eecf3cc

Change-Id: I41e9aeb072f8c5b5acb9485c99758ce39b514ae7
2018-01-22 20:50:09 +00:00
Dan Albert
7d1eecf3cc Fix static_ndk_lib for sanitized libraries.
Test: build-ndk-prebuilts.sh with libc/libm included in the NDK
Bug: https://github.com/android-ndk/ndk/issues/272
Change-Id: Ic398f541036f6c16f7dc58b9af984c60ed948495
2018-01-22 12:40:13 -08:00
Ivan Lozano
a8388ac9e6 Merge "Revert "Support enabling overflow sanitization by path.""
am: e021b0405d

Change-Id: Iaeceb0c8afece1ac7f2664e92de40f624da156ab
2018-01-20 04:00:31 +00:00
Treehugger Robot
e021b0405d Merge "Revert "Support enabling overflow sanitization by path."" 2018-01-20 03:54:23 +00:00
Dan Willemsen
51bb0698ec Merge "Add Nan to OWNERS"
am: af71ddfe28

Change-Id: I3134df47d72875661efbfd43c7155eb47035ac10
2018-01-20 02:04:59 +00:00
Treehugger Robot
af71ddfe28 Merge "Add Nan to OWNERS" 2018-01-20 01:59:37 +00:00
Ivan Lozano
b7d0f52337 Revert "Support enabling overflow sanitization by path."
This reverts commit 17df3c1b76.

Change-Id: Id5dab777da591c24113c3048b8606547a661afdd
2018-01-20 01:44:38 +00:00
Dan Albert
c0004669b6 Merge "Update NdkMaxPrebuiltVersionInt."
am: 4fe7c6aee8

Change-Id: Id46cc747c082e64d5c26ab3cd02c579d7a06ae0f
2018-01-19 23:56:04 +00:00
Treehugger Robot
4fe7c6aee8 Merge "Update NdkMaxPrebuiltVersionInt." 2018-01-19 23:48:32 +00:00
Dan Willemsen
ed86952403 Normalize LANG / LC_* environment
This ensures that the current locale supports UTF-8, and that we're
getting a consistent (but still supported by the system) locale for
every configuration except user-facing messages. This should eliminate
any reproducibility problems around sorting, formatting, etc for all
built products, while still showing localized error messages where
available.

Bug: 71573630
Test: LANG=es_ES LANGUAGE=es: m   (check env in soong.log)
Change-Id: If33311899eaed8c44573113ee35c5a71cee503a0
2018-01-19 21:46:21 +00:00
Ivan Lozano
a613b55860 Merge "Support enabling overflow sanitization by path."
am: c1fecc2dfa

Change-Id: I20a412c972f20016cfc230575864adfdbab2a4b9
2018-01-19 16:03:01 +00:00
Ivan Lozano
c1fecc2dfa Merge "Support enabling overflow sanitization by path." 2018-01-19 15:55:38 +00:00
Justin Yun
b94713329c Merge "VNDK snapshot modules must have vndk subdirectory"
am: d40471c7c8

Change-Id: I14eeafb91e36aa835e8b5383dec04d89f780dedd
2018-01-19 07:52:25 +00:00
Treehugger Robot
d40471c7c8 Merge "VNDK snapshot modules must have vndk subdirectory" 2018-01-19 07:14:27 +00:00
Jiyong Park
1a5d7b1539 Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.

The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.

Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.

When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION  is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).

Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: Id38f02b4be86710411be22bc28109e6894f8a483
2018-01-19 15:42:18 +09:00