Commit graph

6153 commits

Author SHA1 Message Date
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
27fa6a5ca8 Skip installing the VNDK prebuilt if arch does not match am: 312ccb974f
am: 04e36e89df

Change-Id: Ib5679d3295a8ee74bc2af17f26c1e0b20aab35ce
2018-01-23 23:07:09 +00: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
33fd287631 Add only compiler-flag dependencies as implicit am: f231b19017
am: aaa3e473e9

Change-Id: I05ed494e3268e362ba551827a53eab6bccd5e0de
2018-01-23 22:11:23 +00: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
a64cc46798 Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" am: d89f6621ae
am: ee33e88111

Change-Id: I617285c03082a27417815942f51b417f2f51a569
2018-01-23 18:47:27 +00: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
e2b6f7bad2 Support VNDK extensions am: f351174107
am: aef07f2351

Change-Id: I9e062bdb3b81194c1c52576d5da282c439e1878a
2018-01-23 02:29:53 +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
281af4413e Merge "Normalize LANG / LC_* environment" am: a167e3ba42
am: 6dd0600225

Change-Id: I16d1f23b7b5ce3d8f68da9051a04cc15053d3c87
2018-01-23 00:33:36 +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
9c9ddf04ec Fix static_ndk_lib for sanitized libraries. am: 7d1eecf3cc
am: bc341ee329

Change-Id: I8585ce8ca0829af847cb3a429b02a9359a85b49a
2018-01-22 20:52:44 +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
0370b8c419 Merge "Revert "Support enabling overflow sanitization by path."" am: e021b0405d
am: a8388ac9e6

Change-Id: I19f71e6471308d32768148ddafbb84daa9d9ebad
2018-01-20 04:03:08 +00: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
4ebbb3f804 Merge "Add Nan to OWNERS" am: af71ddfe28
am: 51bb0698ec

Change-Id: If46959e23fd8b30054f3abc8f69c5f49190249f8
2018-01-20 02:08:01 +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
772f79e491 Merge "Update NdkMaxPrebuiltVersionInt." am: 4fe7c6aee8
am: c0004669b6

Change-Id: I908e2278d48ff0b6d099f6697a79a7263ffd6dbd
2018-01-19 23:58:11 +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
cbc5232329 Merge "Support enabling overflow sanitization by path." am: c1fecc2dfa
am: a613b55860

Change-Id: Ifb8dba1132793e88c2331935abe33db53db935cb
2018-01-19 16:05:16 +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
67d9f21eca Merge "VNDK snapshot modules must have vndk subdirectory" am: d40471c7c8
am: b94713329c

Change-Id: I501e21f65d44c74e8ad2a7a98dd7c1797e7aa2d1
2018-01-19 07:59:31 +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
Jayant Chowdhary
beaef2407d Merge "Use -advice-only for libraries which do not export headers." am: b0712e8014
am: d9ec9ad566

Change-Id: Iaa14e95e6d25db13b66ccc2407b9a5d523f6d6ff
2018-01-19 05:29:58 +00:00
Jayant Chowdhary
d9ec9ad566 Merge "Use -advice-only for libraries which do not export headers."
am: b0712e8014

Change-Id: I3c9386d1adda4291c7556031aeefea25d8f32e0f
2018-01-19 05:28:00 +00:00
Treehugger Robot
b0712e8014 Merge "Use -advice-only for libraries which do not export headers." 2018-01-19 05:20:33 +00:00
Justin Yun
2e0a23ca40 Include VNDK snapshot modules only if the arch matches am: 74c3f5c9d1
am: ce7fe752b4

Change-Id: I3a977e7a48e65a184dcb13ec76ed6c1ec6b77ef4
2018-01-19 04:26:09 +00:00
Justin Yun
ce7fe752b4 Include VNDK snapshot modules only if the arch matches
am: 74c3f5c9d1

Change-Id: Iab52e9f039a9147974fbb540b8f4a6afcd519b38
2018-01-19 04:16:42 +00:00
Justin Yun
3e15b96234 VNDK snapshot modules must have vndk subdirectory
VNDK snapshot modules must have vndk subdirectory for their
LOCAL_MODULE_PATH regardless of BOARD_VNDK_VERSION definition.
The snapshot target output file must be not changed.

Bug: 71782197
Test: Build marlin with snapshot in the source and boot
Change-Id: I2b6ec9a5c20d6a5014f690d4eb8e6cd7b3b2f2fa
2018-01-19 12:19:24 +09:00
Justin Yun
74c3f5c9d1 Include VNDK snapshot modules only if the arch matches
If the target_arch for the snapshot module does not match with
the build variable TARGET_ARCH, hide the module from the make file.

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

Change-Id: I32ab5004832a4164e1b2c056ad149ede50828b92
2018-01-19 09:48:45 +09:00
Jayant Chowdhary
e44995078f Use -advice-only for libraries which do not export headers.
While diffing abi, for libraries which do not export headers, use
-advice-only.

Test: Create reference dump for libdl; mm -j64; header-abi-diff gets
      invoked with '-advice-only'.

Test: Create reference dump for libjpeg; mm -j64; header-abi-diff gets
      invoked without '-advice-only'.

Bug: 71768219

Change-Id: I678346081f15088388f223f1276d0b0c42d2a8c2
2018-01-18 15:52:43 -08:00
Dan Willemsen
278d07dd8e Add Nan to OWNERS
Test: None
Change-Id: I3ba8feab4c389747780aa4d910ec9e2f9363500e
2018-01-18 15:48:48 -08:00
Ivan Lozano
17df3c1b76 Support enabling overflow sanitization by path.
Handle paths variable provided from Make about where integer overflow
sanitization should be enabled by default, and prepare to enable minimal
runtime diagnostics for integer overflow sanitizers in userdebug/eng builds.

This provides Soong support for on-by-default paths from Make for
integer overflow sanitization.

Bug: 30969751
Bug: 63927620
Test: Include paths passed from Make are being sanitized.
Test: Compilation succeeds with and without diagnostics enabled.
Test: See Make patch for further test notes.

Change-Id: I803a75646cc27ef5b4b5b74b8eb2981c39f8a6a3
2018-01-18 14:16:47 -08:00