Commit Graph

2371 Commits

Author SHA1 Message Date
Jiyong Park a2aca28750 Use bootstrap linker for asan build
This change the asan version of
https://android-review.googlesource.com/c/platform/build/soong/+/879237

Bug: 123725034
Test: forrest run on asan_cf_x86_pasan
Test: SANITIZE_TARGET=address m init_second_stage
inspect /system/bin/init with readelf
DT_INTERP is set to /system/bin/bootstrap/linker_asan

Change-Id: I0fabe08cc63126aadec18ca8e9f2973c33411a4f
2019-02-02 13:28:57 +09:00
Evgenii Stepanov a60c43aa23 [hwasan] Remove deprecated compiler flag (NFC)
am: 93c3f5368d

Change-Id: I0f2de3a2db53d8a2a963711aaae4fe1a53407ee3
2019-02-01 18:56:43 -08:00
Colin Cross 5f692ec219 Remove empty DepsMutator methods
Add an empty DepsMutator to ModuleBase so it doesn't have to be
implemented on every module that doesn't need it.

Test: all soong tests
Change-Id: I545a832a0dbf27386d3080377a75ea482cd9ce59
2019-02-01 17:17:58 -08:00
Evgenii Stepanov 93c3f5368d [hwasan] Remove deprecated compiler flag (NFC)
-hwasan-with-ifunc=0 matches the default value of the flag, and there
are no plans to change that.

Test: SANITIZE_TARGET=hwaddress keeps working
Change-Id: Ie46ffa6ae3c42a9677c3a9a3b5cdc6fb62c2c2f0
2019-02-01 22:56:03 +00:00
Pirama Arumuga Nainar 8edd1c3632 Merge "Switch to clang-r349610"
am: 42b87a2e56

Change-Id: If67d4fd64234ae0ab727556121a6a4cc21941631
2019-02-01 11:07:54 -08:00
Pirama Arumuga Nainar 42b87a2e56 Merge "Switch to clang-r349610" 2019-02-01 16:49:36 +00:00
Jiyong Park 7581398376 Merge "Fix: runtime apex is not instrumented with sanitizer"
am: 101d7600b2

Change-Id: I836b00a51dce1626de7f3c01cb349d080a62801f
2019-01-31 21:52:36 -08:00
Treehugger Robot 101d7600b2 Merge "Fix: runtime apex is not instrumented with sanitizer" 2019-02-01 05:45:22 +00:00
Jiyong Park 837c1c1e31 Add unstrippedOutputFilePath to the linker interface
am: af6d895941

Change-Id: If00bdc8e45c6f29a8a760ec3edd297d1db2c73a3
2019-01-31 21:38:29 -08:00
Jiyong Park 8222663f1b Fix: runtime apex is not instrumented with sanitizer
Fixing the problem that IsSanitizerEnabled always returns false due to
the different sanitizer names from config.SanitizerDevice() and
sanitizerType.String().

Bug: 123708856
Test: SANITIZE_TARGET=hwaddress m com.android.runtime.release
$ ls -al out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib | wc -l
34
$ ls -al out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib64 | wc -l
35
$ ls -al out/target/product/blueline/apex/com.android.runtime.release/lib | wc -l
34
$ ls -al out/target/product/blueline/apex/com.android.runtime.release/lib64 | wc -l
35

Test: inspect out/soong/build.ninja
- Variant of com.android.runtime.release is "android_common_hwasan_com.android.runtime.release"
- Dependencies of com.android.runtime.release are hwasan variants: e.g.,
  out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-2a_kryo385_core_shared_hwasan_com.android.runtime.release/libc.so

Test: ls out/soong/.intermediates/art/build/apex/com.android.runtime.release/android_common_hwasan_com.android.runtime.release/image.apex/lib64/*.so  | xargs readelf -d | grep libclang_rt.hwasan | wc -l
29

Change-Id: Idbb1f68a3ea6bdd02351d6f6048c3eedb9cf32d2
2019-02-01 11:26:04 +09:00
Jiyong Park af6d895941 Add unstrippedOutputFilePath to the linker interface
Test: m
Change-Id: I85a0cbda6ebb9838451ed8c607c2087460b7b742
2019-02-01 11:04:58 +09:00
Ivan Lozano 054d752f4a Merge "XOM dependency check skipping static binaries."
am: 2ccd9b83d0

Change-Id: I002f77ac5d41856f3a19ac4505ca5ee292a6d4d1
2019-01-31 13:50:33 -08:00
Treehugger Robot 2ccd9b83d0 Merge "XOM dependency check skipping static binaries." 2019-01-31 21:42:42 +00:00
Ivan Lozano 59a7ae9bdf XOM dependency check skipping static binaries.
The execute-only memory dependency check is skipped for static binaries.
Make sure we check dependencies in this case.

Bug: 123603191
Test: readelf on static binary with xom-incompatible dependencies
Change-Id: I7ddd3058811cdf4e9cf862163e1bf5add4981b32
2019-01-31 10:09:13 -08:00
Pirama Arumuga Nainar 03b58e2210 Switch to clang-r349610
Bug: http://b/122481018

The '-keep' option of llvm-strip has changed to '-keep-section'.  Update
scripts/strip.sh accordingly.

Test: Tested on various targets in AOSP and internal branch.  Googlers
      see http://go/clang-r349610-testing
Change-Id: Ibfc97ecdcdc305c97a4169cead1e1e3cddda9c4c
2019-01-31 16:32:34 +00:00
Victor Chang d48fd64691 exclude_shared_libs should exlude headers in {static|shared}.export_*_lib_headers
am: 51271c1fb4

Change-Id: I57a019a97078ebabfc8809b022bd29c35bbf8f06
2019-01-31 03:14:31 -08:00
Victor Chang 51271c1fb4 exclude_shared_libs should exlude headers in {static|shared}.export_*_lib_headers
Bug: 122882789
Test: m droid vts
Change-Id: I33ec75fa908e557eeadc91c5ca1a5e180bc9f31b
2019-01-31 11:05:03 +00:00
Jiyong Park 356278b9fa "bootstrap: true" modules are using bootstrap Bionic
am: a4b9dd08c0

Change-Id: Ifbed24778563452c2a8bf821fa02d59fe2b2a9ca
2019-01-30 20:55:49 -08:00
Jiyong Park e9601d6446 bootstrap bionic are moved to ./bootstrap subdir
am: 429660f3c8

Change-Id: Iae5d9adb9ed3177f99958688ecd601713d186675
2019-01-30 20:55:40 -08:00
Jiyong Park a4b9dd08c0 "bootstrap: true" modules are using bootstrap Bionic
If the bootstrap property is set to true, a binary configured to refer
to the bootstrap linker at /system/bin/bootstrap/linker[64]. This is for
very early processes that are executed before the init makes the linker
by bind-mounting it.

Bug: 120266448
Test: m init_second_stage and use readelf on the built file
DT_INTERP is set to /system/bin/bootstrap/linker64 and

Change-Id: I67487701192f127679cc8127ddc9f53e102ba9c4
2019-01-31 13:44:20 +09:00
Jiyong Park 429660f3c8 bootstrap bionic are moved to ./bootstrap subdir
Bootstrap bionic (the bionic in the system partition that is for the
early processes before the runtime APEX is ready) is now located under
./bootstrap subdirectory. i.e.,
* /system/lib[64]/bootstrap/lib{c|dl|m}.so

Before this change, the bootstrap bionic were self bind-mounted. This is
causing problem with `adb sync` because the path which is a mount point
couldn't be unlinked and thus rewriting is not done.

Now, the mount points and mount sources are clearly separated.

Bug: 120266448
Test: m libc.bootstrap libm.bootstrap libdl.bootstrap
Following files are found under system and recovery/root/system
./lib[64]/bootstrap/libc.so, libdl.so, libm.so

Change-Id: I90399b3181988814ce07875df8c1a36599f3337f
2019-01-31 13:44:20 +09:00
Logan Chien cf6869990c Merge "Add a header_abi_checker section"
am: 4c20135b19

Change-Id: I414a82c81c1c874595668e2a2c2da74b0cb3dda0
2019-01-30 18:19:56 -08:00
Logan Chien 4c20135b19 Merge "Add a header_abi_checker section" 2019-01-31 02:05:51 +00:00
Jiyong Park dc9872a0d3 Fix: deps to sanitizer runtime libs are with correct 'image' variant
am: 3b1746a212

Change-Id: Ie04156a9528e39d378d7eddec3500e789381303b
2019-01-30 09:24:27 -08:00
Jiyong Park c49fa7b522 Merge "Reland "Symbols for libs in APEXes are available""
am: 3a30e13683

Change-Id: I89cfa808ab2f32f9bf4c3d305c9e3f43c0d6faa2
2019-01-30 09:08:28 -08:00
Jiyong Park 3b1746a212 Fix: deps to sanitizer runtime libs are with correct 'image' variant
This change fixes a bug that sanitizer runtime libs for non-core variant
(e.g. recovery, vendor, etc.) are not installed. It happened because the
dependency to the sanitizer runtime lib was without 'image' variant,
which in most case caused only the core variant - which is the first in
the image variants - of the lib to be installed.

Fixing the issue by correctly selecting image variant depending on the
location of the lib having dependency to the runtime lib.

Bug: 123525879
Test: SANITIZE_TARGET=hwaddress m out/target/product/blueline/boot.img
Test: SANITIZE_TARGET=address m out/target/product/blueline/boot.img
libclang_rt.*.so is under
out/target/product/blueline/root/recovery/system/lib64

Change-Id: Iea7d718d4971e36521f0a3f712a454de944cd7ac
2019-01-31 01:58:26 +09:00
Logan Chien e3d7a0d062 Add a header_abi_checker section
This commit adds a header_abi_checker section so that the library owner
can have a fine-grained control over the ABIs that must be checked.

For example, a library "libexample" may have following configurations:

    cc_library {
        name: "libexample",
        header_abi_checker: {
            symbol_file: "libexample.map.txt",
            exclude_symbol_versions: ["LIBEXAMPLE_PRIVATE"],
            exclude_symbol_tags: ["platform", "apex"],
        },
    }

Bug: 122845490
Test: Add header_abi_checker to libc to filter out LIBC_PRIVATE
Change-Id: I60cfea868f815afe6213c242ed0ca818161d55c6
2019-01-30 22:18:59 +08:00
Jiyong Park 719b4467aa Reland "Symbols for libs in APEXes are available"
This reverts commit eaebd76656.

Bug: 120846816
Test: build/soong/build_test.bash -dist -products mainline_system_arm64
Test: lunch aosp_cf_x86_pasan-userdebug; m && SANITIZE_TARGET=address m

Change-Id: I0d2f3eba33c2d1d034d13839c1bd23970adb9f85
2019-01-30 12:34:46 +09:00
George Burgess IV 5106157118 Merge "config: swap to glibc 2.17"
am: f4803454b0

Change-Id: I7671fe1c1a8bd380aa338cc981cca954fa7d59b6
2019-01-29 14:39:52 -08:00
George Burgess IV f4803454b0 Merge "config: swap to glibc 2.17" 2019-01-29 22:24:58 +00:00
Alex Light 1a90a8a5c0 Merge "Update compdb to put full path to compiler"
am: 4087dd660f

Change-Id: I9bc32323ed59d55922a8555556f1f9c2807b48de
2019-01-29 12:57:53 -08:00
Alex Light 4087dd660f Merge "Update compdb to put full path to compiler" 2019-01-29 20:52:27 +00:00
Alex Light 4c3b29cd80 Merge "Add support for symlink_preferred_arch in apex"
am: 5956b2b3cb

Change-Id: I0070c0782784b11f9e4d860e15921ba81b9fa3d7
2019-01-29 09:51:36 -08:00
Alex Light 5956b2b3cb Merge "Add support for symlink_preferred_arch in apex" 2019-01-29 17:41:25 +00:00
Alex Light e812818656 Update compdb to put full path to compiler
Some language servers (vscode) seem to have started to rely on the
compiler being an absolute path recently. This updates the compdb
generator to match this expectation.

Bug: https://github.com/Microsoft/vscode-cpptools/issues/3112
Test: m nothing && m SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
Test: Open vscode
Change-Id: Id146d69c2b808b23896132bbd4bc38ed5c7fd9c7
2019-01-29 17:27:37 +00:00
Orion Hodson 2946369186 Merge "Remove libnativehelper from global includes"
am: 6703e6f390

Change-Id: I2c35da64b0886c0a6a0d24f8432ef9f8ff92319a
2019-01-29 06:41:33 -08:00
Treehugger Robot 6703e6f390 Merge "Remove libnativehelper from global includes" 2019-01-29 14:30:16 +00:00
Jiyong Park f85699e747 Merge "Create sanitizer variants of APEX only when SANITIZE_TARGET is set"
am: 62f6fcbbb9

Change-Id: Id0f028a8c59f6b99403eb6088532f1ff34e5fb2a
2019-01-28 21:36:13 -08:00
Jiyong Park b5d6b973f7 Merge "stubs lib can export headers lib"
am: b55752827a

Change-Id: I5060665330da4906d42f9bb9e9e7e5de98256e6e
2019-01-28 21:30:09 -08:00
Logan Chien 5258d3a8ad Merge "Fix a typo related to abidiffs"
am: a9403f279c

Change-Id: Iaefd92f7d7734c5b76d60308b49c36f6bad2bd0d
2019-01-28 21:27:13 -08:00
Jiyong Park 7cb4725f99 Merge "Add __ANDROID_APEX__"
am: 0425aa13ec

Change-Id: I0496dc489bb0805730a392a732724e98a4de6cc6
2019-01-28 21:07:28 -08:00
Alex Light 3d67359f2f Add support for symlink_preferred_arch in apex
Some modules rely on symlink_preferred_arch to have expected files
present. This change makes apexs include these symlinks.

Test: m com.android.runtime.debug
      pushd $(mktemp -d)
      mkdir mnt
      unzip $OUT/apex/system/com.android.runtime.debug.apex
      sudo mount -o loop,ro apex_payload.img mnt
      Ensure that mnt/bin/dalvikvm and mnt/bin/dex2oatd both exist and
      are symlinks to mnt/bin/dalvikvm64 and mnt/bin/dex2oatd32
      respectively.

Bug: 119942078
Bug: 122373634
Bug: 123079311
Change-Id: I47868fbedc5bdd3141a836c488f79e91e0a6ddfe
2019-01-29 03:21:47 +00:00
Treehugger Robot 62f6fcbbb9 Merge "Create sanitizer variants of APEX only when SANITIZE_TARGET is set" 2019-01-29 02:46:31 +00:00
Treehugger Robot b55752827a Merge "stubs lib can export headers lib" 2019-01-29 01:52:30 +00:00
Logan Chien a9403f279c Merge "Fix a typo related to abidiffs" 2019-01-29 00:52:31 +00:00
Jiyong Park 7e636d0b98 stubs lib can export headers lib
Add a dependency from a stubs lib to headers libs so that the headers
can be re-exported.

Bug: 122717287
Test: m; a test added to apex_test.go
Change-Id: I8d48c072815c6b02d343ef09cb44dfc6d1af8e64
2019-01-29 07:38:42 +09:00
Jiyong Park 388ef3f5aa Create sanitizer variants of APEX only when SANITIZE_TARGET is set
This fixes a problem that APEX is unconditionally mutated for all
sanitizer types. This can make an APEX to include sanitized version
of a lib even when SANITIZE_TARGET is not set. It can happen when lib X
is directly depended on by an APEX (e.g. via native_shared_libs) and X
has a sanitized variant due to the dependency from another library Y
which is force sanitized (via 'sanitize' property). In that case,
regardless of lib Y is in the APEX or not, the APEX chooses the
sanitized variant of lib X since the dependency from APEX to the lib is
created with AddFarVariationDependency.

Fixing this problem by mutating the APEX for a sanitizer type only when
the device is requested to be sanitized.

Bug: 122717287
Test: add libnetd_client to com.android.runtime APEX.
Inspect build.ninja to verify that libnetd_client.so in the runtime APEX
is not a sanitized one.

Change-Id: I918bc8407137d74c5456142b3a29de13df68c0b3
2019-01-29 07:10:31 +09:00
Dan Willemsen 96ce8e71a3 Stop exporting the windows toolchain to Make
Make no longer supports building for Windows, they must be in Android.bp
files now.

Bug: 122618577
Test: compare build-aosp_arm.ninja before/after
Change-Id: Ie70d8519850da5b1bdddf73788f984eb3f4f0900
2019-01-28 10:59:16 -08:00
Jiyong Park 58e364a373 Add __ANDROID_APEX__
A module can be built multiple times when it is referenced from one
or more APEXes. Sometimes, it is required for the module to behave
differently depending on the context; e.g., do A when built form
APEX M, do B when built for APEX N, and do C when built for platform.

The idea is to have a macro __ANDROID_APEX__ which is set to the
name of the apex that the module is built for. It is undefined when
the module is built for platform.

Bug: 122714993
Test: m (apex_test amended)
Change-Id: I11a89c6a0e799f4810194de7ef9ee472a71ca498
2019-01-28 20:02:27 +09:00
Logan Chien 8f74fe6e14 Fix a typo related to abidiffs
This commit fixes a typo related to abidiffs.  The generated abidiffs
should be copied to `$$DIST_DIR/abidiffs` instead of
`$$DIST_DIR/abidiff`.

(See also. https://android-review.googlesource.com/796458/)

Bug: 123491909
Test: lunch aosp_x86-userdebug && make dist
Change-Id: I89c13580344a27cac5ea0d00497f5bba3227cf61
2019-01-28 14:30:04 +08:00
Orion Hodson 1e7c3d63a9 Remove libnativehelper from global includes
Bug: 119840313
Test: m checkbuild
Change-Id: Id80e26a396c2e289dcd2596a5b799e251d9ccf1b
2019-01-27 11:11:01 +00:00
Colin Cross cf6e78b127 Add export_*_lib_headers to static and shared properties
am: eefe9a35b2

Change-Id: If1f3b987876b7e6ce9df9e78da1ab81537e8472c
2019-01-25 13:40:45 -08:00
Colin Cross eefe9a35b2 Add export_*_lib_headers to static and shared properties
Allow specifying export_static_lib_headers and export_shared_lib_headers
in the static or shared properties of cc_library modules.

Use a named struct for the properties to avoid having to create
a runtime struct type since none of the properties are filtered.
This avoids running into the name length limit in runtime.StructOf.

Fixes: 122882789
Test: m checkbuild
Change-Id: Ib0e9933e93981ba44668a19ed748bd12a4dd4257
2019-01-25 21:27:02 +00:00
Jiyong Park b18e72dd28 Make sure that ASAN runtime lib is the first DT_NEEDED one
am: 64a44f231d

Change-Id: I9de37b751142ba8e26636f318be3f8cfa3d4946e
2019-01-24 21:10:14 -08:00
Pirama Arumuga Nainar d2fffefd91 Merge "Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host"""
am: de54534d2a

Change-Id: Ib19d2a09ba70070aa59c82ea38a7ff53b66d65e6
2019-01-24 21:09:49 -08:00
Jiyong Park 64a44f231d Make sure that ASAN runtime lib is the first DT_NEEDED one
Introduce a new tag earlySharedDepTag which is added in front of the
ordinary sharedDep dependencies. Dependency to the ASAN runtime lib is
added with the new tag.

Bug: 120894259
Bug: 121038155
Test: m; SANITIZE_TARGET=address m
Use readelf -d to see if the runtime lib is in the first DT_NEEDED one.

Change-Id: I90de6ab95df734a99995532d826564b13fe05316
2019-01-25 14:05:51 +09:00
Treehugger Robot de54534d2a Merge "Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host""" 2019-01-25 04:54:40 +00:00
Dan Willemsen cf71b8ca86 Merge "Remove armv7-a without neon support"
am: e4f12785db

Change-Id: I2529ec9417cf4f49e70a424dd7a37441fb884624
2019-01-24 19:57:47 -08:00
Dan Willemsen e4f12785db Merge "Remove armv7-a without neon support" 2019-01-25 03:52:17 +00:00
Pirama Arumuga Nainar 6aa210243c Revert "Revert "Fix: sanitizerRuntimeMutator is not run for host""
Bug: http://b/123254047

This reverts commit 84757ea7ea.

Reason for revert: veridex asan failure is fixed.

Change-Id: Id03180b8d3d1dc1386fd7e4f800d64dc8578139c
2019-01-25 00:21:02 +00:00
Doug Horn ac2925f410 Support building for Fuchsia.
am: c32c6b0d79

Change-Id: Ic180340f6f508e4a897e0464e3e0bc2f3d22c87c
2019-01-24 15:58:35 -08:00
Dan Willemsen f4e0601c7e Remove armv7-a without neon support
Test: treehugger
Change-Id: I8565d84224daedb6a6dde6dfb9c0fe5f5fabb0f6
2019-01-24 15:51:26 -08:00
Doug Horn c32c6b0d79 Support building for Fuchsia.
This CL adds configs for the arm64 and x64 fuchsia
device targets, sets up the necessary linker flags,
and disables some functionality that is not currently
supported on Fuchsia.

Bug: 119831161
Test: Compile walleye, internal validation against
fuchsia_arm64-eng and fuchsia_x86_64-eng.
Change-Id: I2881b99d2e3a1995e2d8c00a2d86ee101a972c94
2019-01-24 18:59:29 +00:00
Dan Albert 9d12a12dc8 Merge "Revert "Fix: sanitizerRuntimeMutator is not run for host""
am: 9f100ca0e3

Change-Id: Ied9767b9a8264bab62e134874cc1fc8a368f7fde
2019-01-23 15:53:28 -08:00
Dan Albert 84757ea7ea Revert "Fix: sanitizerRuntimeMutator is not run for host"
This reverts commit 1c29b0e6ec.

Reason for revert: Broke aosp_x86_64

Change-Id: I581200f1c271c3e1a39d5cdad84c782977b13054
2019-01-23 23:33:25 +00:00
George Burgess IV 7294cdced0 config: swap to glibc 2.17
**Please do not revert this change without consulting with either
srhines@ or gbiv@ first. It's a large change, and if it only causes
simple/small breakages, we plan to fix those as they pop up.**

This CL swaps the host Android Linux toolchain to gcc 4.8.3 + glibc
2.17, landed in Ieeed444801160e3d288bbad7d871067e81411118.

Bug: 111358231
Test: We've done extensive testing on internal master. Please see
      Ieeed444801160e3d288bbad7d871067e81411118.
Change-Id: If991a603a3dce33b55086672c27a11992f0f3123
2019-01-23 14:02:10 -08:00
Dan Willemsen d493964e21 Merge "Fix: sanitizerRuntimeMutator is not run for host"
am: 27fd541cf3

Change-Id: I6bf52e195a6e4ed0bcee103af7829aff20cea648
2019-01-23 13:12:12 -08:00
Jiyong Park 1c29b0e6ec Fix: sanitizerRuntimeMutator is not run for host
Bug: 123254047
Test: m ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address
FORCE_BUILD_LLVM_COMPONENTS=true out/host/linux-x86/bin/adb
nm -an out/host/linux-x86/bin/adb  | grep -c asan
shows non-zero value

Change-Id: I030e08bd0db38585b1fdaecd00220406f1e8b371
2019-01-23 23:37:45 +09:00
Logan Chien 31698575be Fix shared_libs for cc/prebuilt.go
am: c7f797ea54

Change-Id: I2455c46dbce897068ad472740f641e8d5a20c65b
2019-01-22 23:27:35 -08:00
Logan Chien 9839dd76c3 Merge "Add prebuilt ABI checker support to soong"
am: f1b3352b97

Change-Id: I38b6006e3107944826c31bcfb2052b830bff3cd0
2019-01-22 23:26:19 -08:00
Logan Chien c7f797ea54 Fix shared_libs for cc/prebuilt.go
This commit fixes `shared_libs` for `cc_prebuilt_binary`,
`cc_prebuilt_library_static`, and `cc_prebuilt_library_shared`.  Before
this commit, all shared libraries in `shared_libs` are dropped from the
generated `LOCAL_SHARED_LIBRARIES`.  This commit fixes the problem by
delegating `linkerDeps()` to `libraryDecorator.linkerDeps()`.

This commit also fixes the dependencies to NDK shared libraries.  Before
this change, those dependencies are mapped to a `ndkStubDepTag` and then
ignored by the computation of `AndroidMkSharedLibs`.  This commit adds
it back.

Bug: 123053270
Bug: 119084334
Test: libclang_rt.scudo-*.so can be checked with 2 more hacks.
Change-Id: I59e37e1a3fe0c329e8cb7032e5671f117f7832a0
2019-01-23 07:21:56 +00:00
Logan Chien 4fcea3d9a3 Add prebuilt ABI checker support to soong
This commit adds prebuilt ABI checker support to soong so that
`cc_prebuilt_library_shared` and `cc_prebuilt_binary` are checked.

To opt out the check, add `check_elf_files: false` to your module.

Bug: 119086738
Test: lunch aosp_sailfish-userdebug && CHECK_ELF_FILES=true make check-elf-files
Change-Id: Idb4290c8f48aad545894a7ae718a537cbf832233
2019-01-23 10:15:02 +08:00
Logan Chien 9202e84536 Merge "Add sdk version workaround for libclang_rt"
am: 5c7c78a2e0

Change-Id: I0acd7d6d9268d4291c9249769d13c5ed6548a5b7
2019-01-21 17:18:41 -08:00
Logan Chien 5c7c78a2e0 Merge "Add sdk version workaround for libclang_rt" 2019-01-22 01:04:35 +00:00
Jerome Gaillard c5c22a4f86 Merge "Add Skia deps to the list of available Windows libraries"
am: 13a539c009

Change-Id: I45c4f8d8305b9ef8f296d50b374d778fabdaf362
2019-01-21 12:13:31 -08:00
Jerome Gaillard 7f7f34f81a Add Skia deps to the list of available Windows libraries
Building Skia for Windows requires linking some Windows libraries that
were not in the list of available ones. This adds the necessary
libraries.

Test: N/A
Change-Id: I803b7b05f47163316c6f03866145dc50656a6bef
2019-01-21 11:34:46 +00:00
Logan Chien 834b9a6216 Add sdk version workaround for libclang_rt
libclang_rt.*.so depends on libc++, which is not a part of NDK.  Thus,
this workaround must be added in order not to break the build when the
prebuilt dependencies are checked.

Bug: 121358700
Test: make checkbuild
Change-Id: Icaeb7adf96fb72829053e198b659ebcb19a035fc
2019-01-21 10:29:47 +08:00
Logan Chien f2dd11f316 Merge "Add apex stub lib to LOCAL_SHARED_LIBRARIES"
am: 6cf8ff918a

Change-Id: Ib9b482acc7348c5f93022dc01609ae3bd550ba1b
2019-01-18 19:56:37 -08:00
Logan Chien 6cf8ff918a Merge "Add apex stub lib to LOCAL_SHARED_LIBRARIES" 2019-01-19 03:48:30 +00:00
Logan Chien cdc2d913a4 Merge "Always respect system_shared_libs from Android.bp"
am: 6af24f9677

Change-Id: I3ddb5655da9a145154f48d38f5c8a7bfd43d127c
2019-01-18 18:44:35 -08:00
Logan Chien 6af24f9677 Merge "Always respect system_shared_libs from Android.bp" 2019-01-19 02:34:34 +00:00
Logan Chien 09106e182e Add apex stub lib to LOCAL_SHARED_LIBRARIES
This commit removes a break statement so that apex stub libraries are
added to LOCAL_SHARED_LIBRARIES for prebuilt ABI checker.

This CL doesn't change I09b78e38df285033ef6e9c85f7ea4b0274e85070 [1].
The libraries provided by apex modules are not installed to
`/system/lib[64]` because their stub libraries have
`LOCAL_UNINSTALLABLE_MODULE := true`.

[1] https://android-review.googlesource.com/844555

Bug: 120266448
Bug: 119084334
Test: Add `stubs: { symbol_file: "libnetd_resolv.map.txt", versions: ["1"]}`
      to libnetd_resolv, create a program that depends on
      `libnetd_resolve`, build the program, and do not find
      `/system/lib/libnetd_resolv.so`.
Change-Id: Iffa2c1a0eac9c4940ec1fa05fbacb9806272c31e
2019-01-19 07:45:31 +08:00
Jaewoong Jung 9dec005b6b Merge "Move arch variants registering code to arch.go."
am: d4a393466a

Change-Id: I58e957455a7bcfdcf40e3b4454a0195921b54f20
2019-01-17 07:38:47 -08:00
Logan Chien b95b70bf69 Do not check the ABI stability of LL-NDK-Private
am: f6dbd9c5f7

Change-Id: Id1d0350a38529bc90be4c25e3bf52ea98ce95973
2019-01-17 07:37:52 -08:00
Jaewoong Jung d4a393466a Merge "Move arch variants registering code to arch.go." 2019-01-17 15:26:23 +00:00
Logan Chien 14bd0db2f7 Always respect system_shared_libs from Android.bp
This commit removes a special case that ignores `system_shared_libs`
when `sdk_version`, `vendor_available`, or `vendor` is specified.

In the past, that special case was required for `libasync_safe` and
`libpropertyinfoparser`.  However, ignoring `system_shared_libs` meant
that we didn't have a way to skip the default libs when `sdk_version`
was specified.  This becomes a problem when the dependencies of
prebuilts are actually checked.  To be specific,
`libclang_rt.builtins-${arch}` falls into circular dependencies.

Bug: 123006819
Test: make checkbuild
Change-Id: I5fe038c00892b3abe5189b30d57ba59884b47cbb
2019-01-17 21:16:48 +08:00
Logan Chien f6dbd9c5f7 Do not check the ABI stability of LL-NDK-Private
This commit skips the ABI checks on LL-NDK-Private because
LL-NDK-Private libs are only used by other VNDK-core or VNDK-SP libs on
the system partition, are NOT used by vendor modules, and do not
constitute a system-vendor interface.

Bug: 122938657
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py
Change-Id: Ia2af4250ef1443f8ea3ed5ab111668462f120979
2019-01-17 11:54:53 +00:00
Nicolas Geoffray b104c438b9 Return false in DirectlyInAnyApex for host libraries.
am: c22c1bf130

Change-Id: Ib311f7669227f559e54624df474f2beb843703db
2019-01-16 23:00:15 -08:00
Jaewoong Jung e46114c11b Move arch variants registering code to arch.go.
This enables using arch-dependent property values in modules defined in
android/.

Bug: 122332178
Test: Soong tests + TreeHugger
Change-Id: I89869e395fabf0e69f505b77eab8a4221384124e
2019-01-16 18:29:03 -08:00
Nicolas Geoffray c22c1bf130 Return false in DirectlyInAnyApex for host libraries.
Host doesn't have apexes.

Bug: 122947954
Test: build dex2oat, check that libnativebridge is installed.
Change-Id: I3548e3f155a200e56d71e88631b71511bad84161
2019-01-16 23:37:07 +00:00
Vic Yang 2c5ca34298 Merge "Add Symbol_ordering_file property"
am: cdfaaf4d75

Change-Id: Ice92bb7d3e42bf7f9eb9540ce2674cc4902576ad
2019-01-16 10:02:41 -08:00
Treehugger Robot cdfaaf4d75 Merge "Add Symbol_ordering_file property" 2019-01-16 17:52:48 +00:00
Jiyong Park d4e0239cd0 Merge "APEXes can be sanitized" am: a09e13a4ab
am: 81551d4616

Change-Id: I44fcff612e4b4da27abcadf9ee6c0d7dd92dedbd
2019-01-14 18:44:37 -08:00
Jiyong Park 81551d4616 Merge "APEXes can be sanitized"
am: a09e13a4ab

Change-Id: I3ca93248947ccbcc81006a06757788f378fe9f5f
2019-01-14 18:34:37 -08:00
Treehugger Robot a09e13a4ab Merge "APEXes can be sanitized" 2019-01-15 02:13:32 +00:00
Dan Willemsen fc9dff9965 Configure the default arch variant features per-OS am: 01a3c25ed7
am: ea53a95e10

Change-Id: Id1d2733acaa48287da535394c65e9200a67bb72f
2019-01-14 17:18:24 -08:00
Dan Willemsen ea53a95e10 Configure the default arch variant features per-OS
am: 01a3c25ed7

Change-Id: Icb12a09355a8b418667eef9ec6668dbd4f240525
2019-01-14 17:09:56 -08:00
Dan Willemsen 01a3c25ed7 Configure the default arch variant features per-OS
The minimum set of supported features are different between Android and
Linux with X86_64. So while the list of variants and features are still
technically correct, and may be shared more in the future, the default
needs to be configured differently.

Bug: 120208462
Test: add `host_supported: true` to libopus; m libopus
Change-Id: Ib79707d17b852f77341026085230c026b6386b78
2019-01-15 00:53:28 +00:00
Stephen Hines f1d56697e8 Merge "Switch to clang-r346389c." am: db89aa2c1d
am: 053e24087b

Change-Id: I861a7a8b5ff491f84c27f0c546afbcaf80e8da32
2019-01-14 14:34:03 -08:00
Stephen Hines 053e24087b Merge "Switch to clang-r346389c."
am: db89aa2c1d

Change-Id: I93384b066fc2a6aafd89e46ad7c20b80f2e7010d
2019-01-14 14:04:15 -08:00
Stephen Hines db89aa2c1d Merge "Switch to clang-r346389c." 2019-01-14 21:47:17 +00:00
Vic Yang b70617a160 Add Symbol_ordering_file property
We add an optional Symbol_ordering_file property to linker properties
to allow modules to specify the order of symbols in the binary.

Bug: 112073665
Test: Build libc with a symbol ordering file and check the resulting
      binary.

Change-Id: Ibb24697cfdee4a5750442cb74f1ee6390d8a6430
2019-01-14 11:00:10 -08:00
Yi Kong 92071899bd Merge "Move -Wno-null-dereference to external only" am: 98975c301e
am: 52e8b1e270

Change-Id: I39e74436a541b308c88cc09995a7887e5f3680a5
2019-01-13 17:53:37 -08:00
Yi Kong 52e8b1e270 Merge "Move -Wno-null-dereference to external only"
am: 98975c301e

Change-Id: Iaeb4dfe5dd99f8b368b4aaeea94868e434653d75
2019-01-13 17:49:15 -08:00
Yi Kong 98975c301e Merge "Move -Wno-null-dereference to external only" 2019-01-14 01:38:38 +00:00
Jiyong Park dd11dcd66e Merge "Stubs libs are built with version script" am: a374cbb445
am: c287271902

Change-Id: I1658eb55c13121a74ba7618089db43b0481268e5
2019-01-12 16:26:48 -08:00
Jiyong Park c287271902 Merge "Stubs libs are built with version script"
am: a374cbb445

Change-Id: If72f30160049bb8b40aba9f049db274c6d2db934
2019-01-12 16:22:44 -08:00
Jiyong Park c1e7f48b4c Stubs libs are built with version script
Stubs libs are built with the generated version script file.

Bug: 120266448 (comment #23)
Test: lunch walleye_hwasan-userdebug
make SANITIZE_TARGET=hwaddress oatdump

Change-Id: I38652e61d0b336227b7f541590b0e70fe291f0a3
2019-01-13 03:11:27 +09:00
Jiyong Park 379de2fab0 APEXes can be sanitized
This change first introduces the interface "Sanitizeable" that
module types other than cc.Module can use to be handled by the sanitizer
mutator. APEX module, by implementing the interface, gets sanitizer
variants.

In doing so, sanitizer.go is refactored so that modules have explicit
dependencies to the runtime sanitizer libraries. This allows the runtime
library to be packaged into the APEX when required. This also completes
the dependency graph; updating the prebuilt sanitizer runtime will
trigger rebuilding of modules using the runtime.

Bug: 120894259
Bug: 121038155
Test: SANITIZE_TARGET=hwaddress m apex.test
Test: TARGET_FLATTEN_APEX=true SANITIZE_TARGET=address m
Change-Id: Ia91576ff48cda3c996350308b75bf83fcf7c23d7
2019-01-13 00:48:47 +09:00
Michael Butler 6cc8462dc2 Merge "Revert "Symbols for libs in APEXes are available"" am: 4fd001280d
am: 54c454d064

Change-Id: Ife218d4a331975d0754fdaeda4593867e218a217
2019-01-11 13:13:55 -08:00
Michael Butler 54c454d064 Merge "Revert "Symbols for libs in APEXes are available""
am: 4fd001280d

Change-Id: I564df995f01f27eea5a44ffc70fd7baf404d3cd1
2019-01-11 13:02:38 -08:00
Michael Butler eaebd76656 Revert "Symbols for libs in APEXes are available"
This reverts commit 769e50b3c9.

Reason for revert: Likely causing build failure on aosp_x86_64-eng in aosp_master:

"build/make/core/base_rules.mk:271: error: art/build/apex: MODULE.TARGET.SHARED_LIBRARIES.com.android.runtime.host.libart-compiler already defined by art/build/apex."

Change-Id: I83b7caa04b2648e4e4914aae2fa5878516634eed
2019-01-11 20:23:36 +00:00
Jiyong Park 40236a3498 Merge "Symbols for libs in APEXes are available" am: 07feb07a16
am: 3007628413

Change-Id: I3170fcf6ba7f1a4ff46f2dd04d8f152e35ad122c
2019-01-11 10:11:39 -08:00
Jiyong Park 3007628413 Merge "Symbols for libs in APEXes are available"
am: 07feb07a16

Change-Id: I6ef148e599227633baf30b15f84fdd96062d1ea1
2019-01-11 09:51:07 -08:00
Stephen Hines c0042a2c77 Switch to clang-r346389c.
This cherry-pick update picks up a few patches to improve hwasan, ELF
tls, and LLD for kernel builds.

Bug: http://b/122549771
Test: make checkbuild, boot
Change-Id: I8a90282af41ad4c74df819484ba2c3507e20100f
2019-01-11 09:21:46 -08:00
Jiyong Park 769e50b3c9 Symbols for libs in APEXes are available
The unstripped file for libraries in APEXes are available via
out/target/product/<device>/symbols/apex/<apex_name>/path_to_lib.

This change make the symbol files available by installing the individual
files in APEXes to the directory where the APEXes will be mounted at
(i.e. runtime directory which is /apex/<apex_name>). Note that the files
are not actually packaged to a filesystem image; they are installed just
to create the symbol files under the out directory where developers can
use them for debugging.

Bug: 120846816
Test: m com.android.runtime.debug
There are unstripped files under
out/target/product/walleye/symbols/apex/com.android.runtime.debug

Change-Id: Ib182e2bf8787b7669ccba13814491db35370f468
2019-01-11 23:45:20 +09:00
Jiyong Park e45af66fc5 Rename non-stubs variant of a lib if it is included in APEX am: b07885714c
am: 8e071293b4

Change-Id: Id156d16ed3e5b8a224d692fbaf00e0d19a42f941
2019-01-09 19:29:36 -08:00
Jiyong Park 8e071293b4 Rename non-stubs variant of a lib if it is included in APEX
am: b07885714c

Change-Id: I01f9965ce641e561ec8429e037789718c73e951b
2019-01-09 19:26:21 -08:00
Jiyong Park b07885714c Rename non-stubs variant of a lib if it is included in APEX
If a lib is directly included in an APEX (via native_shared_libs
property) and the lib has stubs (via stubs.versions property), then the
ordinary non-stubs variant of the library is renamed to
<libname>.bootstrap in the makefile. At the same time, the stubs variant
of the lib becomes visible and it's name is <libname>.

This ensures that modules in Android.mk build against the stubs
variant thus preventing them from using private APIs in the lib.

The non-stubs variant, however, is used if the module explicitly has
set the new 'bootstrap' property to true. This is useful for building
some early binaries (such as init and vold) which need to run before
APEXes are activated. Since they can't use the bionic libs from the
runtime APEX, they should use the bionic libs left in the system
partition which is called the boostrap bionic.

Bug: 120266448
Test: m
Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044

Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
2019-01-10 09:57:29 +09:00
Dan Willemsen 0302e36cce Merge "Don't expect depfile from .s files" am: 9b84d34be3
am: 20541f773c

Change-Id: Icf4ffa0c93ff7a50a47477e611913adc307b3773
2019-01-04 08:39:56 -08:00
Dan Willemsen 20541f773c Merge "Don't expect depfile from .s files"
am: 9b84d34be3

Change-Id: Ib87334c82091ea52883d5b0273cdcc2bcc43d315
2019-01-04 08:28:42 -08:00
Treehugger Robot 9b84d34be3 Merge "Don't expect depfile from .s files" 2019-01-04 15:19:33 +00:00
Logan Chien 4d713ded4d Do not build lsdump for APEX variants am: fa478c0234
am: e500da9ba6

Change-Id: If18fe0a061fea7e23b59b6ce261b70ae278b2122
2019-01-04 00:40:27 -08:00
Logan Chien e500da9ba6 Do not build lsdump for APEX variants
am: fa478c0234

Change-Id: I05e604c67099562282fddd9cfc5a2f8672ad584b
2019-01-04 00:35:18 -08:00
Dan Willemsen fcabb1c518 Don't expect depfile from .s files
.s files (unlike .S files) aren't run through the preprocessor, so -M*
doesn't actually write out a depfile.

Since our ninja is now going to be verifying that the depfile is created
(https://android-review.googlesource.com/861510), don't specify a
depfile for .s files.

Bug: 121058584
Test: apply https://android-review.googlesource.com/861510
Test: cd external/libavc; mma
Change-Id: I1697aa020c63639317c8f4771147026601ae72fc
2019-01-03 23:25:11 -08:00
Logan Chien fa478c0234 Do not build lsdump for APEX variants
This commit stops building lsdump files for APEX variants since APEX
variants are local to APEX modules themselves.

Bug: 121986692
Test: make findlsdumps  # compare $ANDROID_PRODUCT_OUT/lsdump_paths.txt
Change-Id: I37fcd152d0d84d235a354ea53e53e808dd71464a
2019-01-04 13:28:06 +08:00
Jiyong Park dafd8fa529 Merge "Fix: stubs lib is installed in APEX" am: f17284e05d
am: 368c7463b5

Change-Id: I9e6d49a7c8da72fdbe4cd2fe8988306133942e88
2019-01-03 15:35:38 -08:00
Jiyong Park 368c7463b5 Merge "Fix: stubs lib is installed in APEX"
am: f17284e05d

Change-Id: I56b89e36a260bf0cb1792285b0eddda775523772
2019-01-03 15:28:53 -08:00
Jiyong Park 67883b3ec6 Fix: stubs lib is installed in APEX
This CL fixes the problem that when a lib is defined with stubs, the
stubs variantof the lib is installed to the APEX. This was happening
because the non-stubs variant is the last variant of the 'version'
variants and addFarVariationDependencies selects the first variant when
the 'version' variant isn't specified.

Fixing the problem by making the non-stubs variant (whose name is "")
the first variant.

Test: m (apex_test)

Change-Id: I1505fd2f29a0d70c916bad51000aa06f2b80b137
2019-01-04 03:37:00 +09:00
Jiyong Park 31b2ec74d3 Fix: 'required' property is ignored am: f7df9b7e55
am: f71e439bc9

Change-Id: Id621ffc23766da4e6854de363f26a455cfb64186
2019-01-03 09:54:40 -08:00
Jiyong Park f71e439bc9 Fix: 'required' property is ignored
am: f7df9b7e55

Change-Id: I9f9be8cc1da6d598c54d7a71ac672819f35e15da
2019-01-03 09:48:33 -08:00
Jiyong Park f7df9b7e55 Fix: 'required' property is ignored
This change fixes a bug that the 'required' property of a module is
ignored when the module is using a shared from an APEX. This is
happening because LOCAL_REQUIRED_MODULES is overwritten (with := instead
of +=) when ApexesProvidingSharedLibs is not empty.

Fixing the bug by appending ApexesProvidingSharedLibs to
AndroidMkData.Reuired so that it is handled in android/androidmk.go

Test: m
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
and make sure that system/bin/vold_prepare_subdirs exist.

Change-Id: Ie57bca480ba4198b4da0df1c73e92fa42b5ebda8
2019-01-04 01:19:44 +09:00
Dan Willemsen 60e8a8ddd4 Remove incorrect file comments am: d56097dc27
am: 6053fd4ba7

Change-Id: Ibab200a85543999cc347f8f31e5c7f2c7c823aee
2018-12-27 14:39:35 -08:00
Dan Willemsen 6053fd4ba7 Remove incorrect file comments
am: d56097dc27

Change-Id: I5cfee829375c83b182d4bd78a80f21fed899a674
2018-12-27 14:23:27 -08:00
Dan Willemsen d56097dc27 Remove incorrect file comments
Test: none
Change-Id: Ia2889ee29c2c0bf18adf5d90e506cfce4b14fdcc
2018-12-27 12:26:30 -08:00
Yi Kong fae5dac8fd Move -Wno-null-dereference to external only
Test: m checkbuild
Bug: 29823425
Change-Id: Icd675e451b2a2a8e3f489706e533f92d991de9c0
2018-12-21 14:51:41 -08:00
Jiyong Park 980f53d05e Fix: static dependency across an APEX is lost am: 16e91a067d
am: 53cfd00417

Change-Id: I3bf3c9e2c790de063c8670f55482088c55a9f0f4
2018-12-21 12:56:47 -08:00
Jiyong Park 53cfd00417 Fix: static dependency across an APEX is lost
am: 16e91a067d

Change-Id: I3686643a6606dda25dba39971198e43c6e638404
2018-12-21 12:52:45 -08:00
Jiyong Park 16e91a067d Fix: static dependency across an APEX is lost
This change fixes following problem:

1) a native lib having stubs is defined.
2) the lib is included in an APEX.
3) a static binary is linking the lib from outside of the APEX.
4) then, the dependency from the binary to the lib is vanishing.

This is happening because cc.depsToPaths() mistakely does not
distinguish static lib deps from shared lib deps. For shared lib deps,
it creates two dependencies (one for stubs variant and the other for
non-stubs variant) and choose the stubs variant when the lib and the
current module is not in the same APEX (i.e. dependency to the non-stubs
variant is discarded). However, since we don't have stubs variant for
static library, it ends up having no dependency to the library if the
link is static.

Fixing the issue by skipping the variant selection routine when the link
is static.

Test: m (apex_test added)
Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044
Change-Id: I21102a31cc5c0b105da2affdd035bd5cc571a6ab
2018-12-21 18:01:39 +09:00
Jiyong Park 23e17e4406 Add use_vendor to APEX module am: da6eb592bf
am: d3447f29f2

Change-Id: Ic01572a209a75e03356027f6fee058c68e714f73
2018-12-20 22:49:44 -08:00
Jiyong Park d3447f29f2 Add use_vendor to APEX module
am: da6eb592bf

Change-Id: I7e5f7a24d6058e7a0fef0f9907e5f0da9e3e2a56
2018-12-20 22:45:38 -08:00
Jiyong Park da6eb592bf Add use_vendor to APEX module
use_vendor, when set to true, brings vendor variant of the native
libraries and binaries to the APEX.

Bug: 115707625
Test: m (apex_test updated)
Change-Id: Ib4e996f8652f4ce4645a9c22f6914e2ab35edda6
2018-12-20 14:33:02 +09:00
Jaewoong Jung c8d9f14958 Merge "Ignore shared libs for static executables." am: 3a0989ce4c
am: 23dbe700a4

Change-Id: I24a0ba472a8af71faf729b4967dbfdff15f70e97
2018-12-19 08:32:07 -08:00
Jaewoong Jung 23dbe700a4 Merge "Ignore shared libs for static executables."
am: 3a0989ce4c

Change-Id: I338b355c60ec18558d5002c0c70ae85f7b89713e
2018-12-19 08:26:56 -08:00
Jaewoong Jung 3a0989ce4c Merge "Ignore shared libs for static executables." 2018-12-19 16:16:24 +00:00
Sundong Ahn 1a5a13465c Merge "Add dependency for sysprop" am: 6ebbf3da29
am: 32f04e838b

Change-Id: Ie11cc8568d604481732dc25c1b7db65949b16808
2018-12-19 03:38:44 -08:00
Sundong Ahn 32f04e838b Merge "Add dependency for sysprop"
am: 6ebbf3da29

Change-Id: Icd09bef563aa335a36327c6e0e252667ac3f5371
2018-12-19 03:29:43 -08:00
Jiyong Park 184cf73914 Merge changes Idb2b552b,I190bca35 am: 8cc51b5620
am: e3c89e73b7

Change-Id: Ia71c4b780b690c810461295c0d1b5adeefbf853c
2018-12-19 00:38:16 -08:00
Evgenii Stepanov cff8c6cd03 Merge "[hwasan] Reduce history size to save memory." am: 3181721a1e
am: 8801703a91

Change-Id: I27705b2f968660d117c1870f9c4b3aa28c319e6e
2018-12-19 00:35:13 -08:00
Jiyong Park e3c89e73b7 Merge changes Idb2b552b,I190bca35
am: 8cc51b5620

Change-Id: I045c83d128ed0efbd477cd3a43e80c9bbbc46a09
2018-12-19 00:22:36 -08:00
Evgenii Stepanov 8801703a91 Merge "[hwasan] Reduce history size to save memory."
am: 3181721a1e

Change-Id: Iae83ccfc53a363d45ad4793c3f9d17c697f52a74
2018-12-19 00:19:40 -08:00
Sundong Ahn 5b73f31c80 Add dependency for sysprop
The dependency is added because the module that uses the sysprop library
needs generated code before it is built.

Test: m -j
Change-Id: I2858fc6fa6f2fe16afa2f4a7ae62746ba0f67e5c
2018-12-19 07:23:08 +00:00
Treehugger Robot 8cc51b5620 Merge changes Idb2b552b,I190bca35
* changes:
  When a stub is built for APEX, it is generated with --apex
  APEX-specific symbols can be tagged as # apex
2018-12-19 06:28:23 +00:00
Evgenii Stepanov 3c5a52a477 [hwasan] Reduce history size to save memory.
Bug: 112437883
Test: adb shell echo $HWASAN_OPTIONS
Change-Id: Ifc4ab10e37efb1a0ce7ea77ad691947d24c2da2b
2018-12-18 17:02:44 -08:00
Jaewoong Jung 232c07c217 Ignore shared libs for static executables.
Ie42edc5184f315f998db953594e425214b810e0e added system_shared_libs to
static libraries so that their exported headers can be referenced.
However, it also added unrequired dependencies, which is an
error-triggering issue for static executables.

This change addresses it by adding a condition to shared libs handling code
in binary.go.

Bug: 121152570
Test: cc_test.go, library_test.go
Change-Id: I1828442c4e496f8d815fccaeca970cd5766bdf5d
2018-12-18 15:56:59 -08:00
Jiyong Park 098ab903b1 Remove -include <file> when compiling stubs. am: 6437995170
am: b24226fdcc

Change-Id: Ie286839df36ba9bd7bf439e233c888d3c1a715cf
2018-12-15 09:18:06 -08:00
Jiyong Park b24226fdcc Remove -include <file> when compiling stubs.
am: 6437995170

Change-Id: I9a6d6b7b2d6498c404104d6b731b9a20b2913464
2018-12-15 09:14:05 -08:00
Jiyong Park 3fd0baf651 When a stub is built for APEX, it is generated with --apex
Now, symbols that are only to be visible to across APEXes can be tagged
as # vndk. Then when generating the stubs library, the tagged symbol
is included. The symbol is NOT included in other cases; build NDK stubs,
etc.

Bug: 120638081
Test: m (apex_test updated.)
Change-Id: Idb2b552badddfc26af113cc8d4b984788f478813
2018-12-16 02:13:14 +09:00
Jiyong Park bb4e13536e APEX-specific symbols can be tagged as # apex
If a symbol is tagged as # apex, then it is exported when gen_stub_libs
is invoked with --apex.

Bug: 120638081
Test: python3 cc/test_gen_stub_libs.py

Change-Id: I190bca35d1a4fb422b37d1be41a34de1ad64de6b
2018-12-16 02:12:13 +09:00
Jiyong Park d0c11753f6 Merge changes I350fe490,I31e61862,I09b78e38 am: 1ee00b54d9
am: 04f6a9db21

Change-Id: I6ba60b168f05f53d1e368229ab2ce2b1d2b9bf87
2018-12-15 06:04:15 -08:00
Jiyong Park 6437995170 Remove -include <file> when compiling stubs.
Otherwise, the force included headers might cause conflicting types
error with the symbols in the generated stubs source code. e.g.

double acos(double); // in header
void acos() {} // in the generated source code

Bug: 120266448
Test: m (apex_test also updated, and passing)
Change-Id: I717df990959d1b24ec515f0f52a4e28b94e92f32
2018-12-15 23:03:47 +09:00
Jiyong Park 04f6a9db21 Merge changes I350fe490,I31e61862,I09b78e38
am: 1ee00b54d9

Change-Id: I2ea8c8333ecd2d48111131b6236d3005cb6f9075
2018-12-15 05:59:22 -08:00
Treehugger Robot 1ee00b54d9 Merge changes I350fe490,I31e61862,I09b78e38
* changes:
  Stubs libs are available for host
  Don't create unnecessary APEX variations
  Stubs dependency is not installed
2018-12-15 13:47:59 +00:00
Yi Kong 393bbbfe66 Merge "Move -Wno-null-pointer-arithmetic to external only" am: df76efe524
am: 3b47a3bd02

Change-Id: Id9623315759a50ee0480c10aebfa560cee47a7a1
2018-12-14 16:57:06 -08:00
Yi Kong 3b47a3bd02 Merge "Move -Wno-null-pointer-arithmetic to external only"
am: df76efe524

Change-Id: I71ba1b6dbd242eaf7614750076b565419ca8dae6
2018-12-14 16:44:58 -08:00
Yi Kong c9f6db50d3 Move -Wno-null-pointer-arithmetic to external only
Test: m checkbuild
Bug: 72331524
Change-Id: I9c49a8cef547f6c840001fd203a0abecaeef44d5
Merged-In: I9c49a8cef547f6c840001fd203a0abecaeef44d5
(cherry picked from commit 3e88cb0399)
2018-12-13 18:36:19 -08:00
Ivan Lozano c5c4a3adec Merge "Add option to avoid recovering with diagnostics." am: e98d11f733
am: e9c8b727e3

Change-Id: I981ed804967b1378821431d93efdd3f917cf32c7
2018-12-13 15:33:22 -08:00
Ivan Lozano e9c8b727e3 Merge "Add option to avoid recovering with diagnostics."
am: e98d11f733

Change-Id: I25dc9e445265751e20e9da805fbb2905090e3efd
2018-12-13 14:53:26 -08:00
Ivan Lozano e98d11f733 Merge "Add option to avoid recovering with diagnostics." 2018-12-13 20:56:18 +00:00
Jiyong Park 0fefdeac91 Stubs libs are available for host
The runtime APEX is built for host as well as for target. Therefore
stubs libs should be available also for host.

Bug: 120670568
Test: follow the repro step shown in b/120670568#comment4
Change-Id: I350fe490848ae9ceb55aade0521bdfaf48ed083f
2018-12-13 12:01:31 +09:00
Jiyong Park 0ddfcd1188 Don't create unnecessary APEX variations
This change fixes a problem that APEX variations are created for the
modules that actually shouldn't built for any APEX. For example,
consider this case.

apex { name: "myapex", native_shared_libs: ["mylib"],}

cc_library { name: "mylib", shared_libs: ["libfoo#10"],}
cc_library { name: "libfoo",
             shared_libs: ["libbar"],
             stubs: { versions: ["10"], }, }
cc_library { name: "libbar", ...}

Before this change, both the stubs and non-stubs variations of libfoo
were mutated with apexMuator, which is incorrect for the non-stubs
varia; there is no dependency chain from the apex "myapex" to the
non-stubs variation, but to the stubs variation due to the #10 syntax.

This was happening becauses we used the name of the module to determine
whether it should be built for APEX or not. Both stubs and non-stubs
variations have the same module name "libfoo".

Fixing this issue by recording the list of APEX variations required
directly on the module. So, the stubs variation of libfoo has myapex in
its apex variations list, but the non-stubs variation doesn't, and thus
apexMutator does not pick up the non-stubs variation.

Test: m (apex_test updated and passing)
Test: cherry-pick ag/5747464 and m
Change-Id: I31e618626809a828a55fff513ef5f81f79637afa
2018-12-13 10:48:15 +09:00
Jiyong Park de866cbe50 Stubs dependency is not installed
When the stubs variant of a library is dependend by a platform component
and the library is included in one or more APEX, the library is not
installed to the platform, because it is provided by APEX.

Bug: 120266448
Test: m
Test: add stubs: { versions: ["1"], }, to libnetd_resolv
then build netd. libnetd_resolv.so does not exist under /system.

Change-Id: I09b78e38df285033ef6e9c85f7ea4b0274e85070
2018-12-13 10:48:15 +09:00
Dongwon Kang ca2ee9f499 Merge "Don't install stubs" am: f576fcd413
am: 32386a41e1

Change-Id: I068e1e6907070769dacd5a04f4d86a7a66fa01ce
2018-12-12 10:50:02 -08:00
Dongwon Kang 32386a41e1 Merge "Don't install stubs"
am: f576fcd413

Change-Id: I85557c7896c53cdaeee3df300e88cc02f84e6c2a
2018-12-12 10:40:53 -08:00
Dongwon Kang f576fcd413 Merge "Don't install stubs" 2018-12-12 18:15:35 +00:00
Ivan Lozano 7929bba218 Add option to avoid recovering with diagnostics.
Add a no_recover option that allows specifying which sanitizers in
diagnostics modes shouldn't recover. This can help debugging as we test
enabling sanitizers in new libraries since it'll cause tombstones to be
generated along with the diagnostics information.

Bug: 80195448
Bug: 110791537
Test: Compiled test module with this flag, checked compiler command.
Test: Test module crashed, tombstone contained diagnostics information.
Change-Id: Ie938923ef95716c2d49d6cd719ee223ad62755c6
2018-12-12 10:01:16 -08:00
Jerome Gaillard b49619f48c Merge "Upgrade Windows default build version from Vista to 7" am: ff42f04af8
am: 475b7d7fb7

Change-Id: Ibde618c5677e708944eae7b72f76c2db647582c7
2018-12-12 06:16:42 -08:00
Jerome Gaillard 475b7d7fb7 Merge "Upgrade Windows default build version from Vista to 7"
am: ff42f04af8

Change-Id: I5bbcb61e74a847918867a7b26f9fc295c387b99d
2018-12-12 06:11:39 -08:00
Jerome Gaillard ff42f04af8 Merge "Upgrade Windows default build version from Vista to 7" 2018-12-12 13:59:56 +00:00
Yi Kong 127d96dd4f Merge "Remove unneeded -Wno-expansion-to-defined flag" am: e2025abe96
am: 353bdb292f

Change-Id: I80c01c4875530e7b93bc51b4af5b527f040f9ed0
2018-12-11 18:57:01 -08:00
Yi Kong 353bdb292f Merge "Remove unneeded -Wno-expansion-to-defined flag"
am: e2025abe96

Change-Id: If7726e9e4b70134c9551dd36d54bdd14baefcc2d
2018-12-11 18:51:52 -08:00
Yi Kong e2025abe96 Merge "Remove unneeded -Wno-expansion-to-defined flag" 2018-12-12 02:27:48 +00:00
Jiyong Park 127d56580d Don't install stubs
Stubs libs are build-time only artifact. Can't be installed.

Test: OUT_DIR=out build/soong/scripts/build-ndk-prebuilts.sh
with https://android-review.googlesource.com/c/platform/frameworks/av/+/846770/7
and two more CLs in the same chain
Examine out/soong/build.ninja
Build rule for out/soong/target/product/generic_arm64/system/lib64/arm64/libmediandk.so
exist only once.

Change-Id: I58ff09ef3fbbdbd2d968aa21b87a493192d4216d
2018-12-12 10:41:55 +09:00
Chih-hung Hsieh 418ff7b331 Merge "Disable cert-dcl16-c clang-tidy check for mingw32." am: d340852732
am: baeab573a1

Change-Id: I8e17caa06e137f3d0179ea0ec0ab4bc84a7edfc5
2018-12-11 09:54:50 -08:00
Chih-hung Hsieh baeab573a1 Merge "Disable cert-dcl16-c clang-tidy check for mingw32."
am: d340852732

Change-Id: I4ebd440971b10de101cbe8a1db8b088ff6e1ef82
2018-12-11 09:50:46 -08:00
Chih-hung Hsieh d340852732 Merge "Disable cert-dcl16-c clang-tidy check for mingw32." 2018-12-11 17:41:38 +00:00
Jiyong Park 280d73aec0 Disable cfi and stl for stubs libraries am: 090d9df206
am: 84d1d27efe

Change-Id: I1d1da2c99dfe4b2fca9d2df23072c596113ee7cb
2018-12-11 09:26:35 -08:00
Jiyong Park 84d1d27efe Disable cfi and stl for stubs libraries
am: 090d9df206

Change-Id: Ifdf9fb0a066a8a9b320aaa6054e25b5d2327f997
2018-12-11 09:22:33 -08:00
Jiyong Park 090d9df206 Disable cfi and stl for stubs libraries
Stubs libs are not built with dependencies required for cfi and stl.
Also it does not make much sense to build stubs with cfi and stl because
the libs are not for runtime and there is no C++ symbols.

Test: cherry-pick ag/5747464 and m
Change-Id: I83d6d82513a77a6a8a345e7d12707940c2c906c7
2018-12-11 19:43:56 +09:00
Chih-Hung Hsieh 327b6f0c69 Disable cert-dcl16-c clang-tidy check for mingw32.
Bug: 120614316
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,cert-*
Change-Id: Ibe46409543eaa4a7f3b710d9742b3252dc9ac7e8
2018-12-10 16:28:56 -08:00
Yi Kong 4603b9f411 Remove unneeded -Wno-expansion-to-defined flag
Test: m checkbuild
Bug: 29823425
Change-Id: I8c9c7cc92757af20d3a3bbcebeb6360d1df91530
2018-12-10 04:55:51 -08:00
Yi Kong a62c5ac2f1 Remove unneeded -Wno-deprecated-register flag am: 02c0ad48ba
am: b8506d246e

Change-Id: I29f8ee1d895b078d2640fb7fb1603b301f8c0342
2018-12-08 20:54:36 -08:00
Yi Kong b8506d246e Remove unneeded -Wno-deprecated-register flag
am: 02c0ad48ba

Change-Id: I129ebec38b7d8c99d72affb3ea0a97cfaaefd7e7
2018-12-08 20:50:34 -08:00
Yi Kong 02c0ad48ba Remove unneeded -Wno-deprecated-register flag
Test: m checkbuild
Change-Id: I030a66b8a484673caf3a96a844dc26954e08071a
2018-12-09 04:41:38 +00:00
Evgenii Stepanov 126da038e7 Merge "Disable hwasan frame descriptions." am: adeb54c811
am: aabc76c5eb

Change-Id: Id77bd7d258a77e8d3b25f2bf24e02de02421bf93
2018-12-08 18:06:59 -08:00
Evgenii Stepanov aabc76c5eb Merge "Disable hwasan frame descriptions."
am: adeb54c811

Change-Id: I8fc3f24dcb501c5729a3be72412f7d3c3d53acc3
2018-12-08 18:01:52 -08:00
Treehugger Robot adeb54c811 Merge "Disable hwasan frame descriptions." 2018-12-09 01:42:00 +00:00
Dan Albert 6319ca9b9d Merge "Add flag to disable source directory includes." am: 3adf8b05f5
am: 440be95512

Change-Id: I60cb5508b590ff9315d70606edc1908cdaedaf3e
2018-12-07 16:45:52 -08:00
Dan Albert 440be95512 Merge "Add flag to disable source directory includes."
am: 3adf8b05f5

Change-Id: I5b79bbc90bd889701e0f3f55dcc7be9df62dec17
2018-12-07 16:41:43 -08:00
Treehugger Robot 3adf8b05f5 Merge "Add flag to disable source directory includes." 2018-12-08 00:33:35 +00:00
Evgenii Stepanov 0a87b664c3 Disable hwasan frame descriptions.
Current implementation does not play nice with -gc-sections.

Bug: 120673911
Test: make SANITIZE_TARGET=hwaddress recovery-persist
Change-Id: I36cd37fb41c0c26c7e747e2c1dd5fadf7a31f4e7
2018-12-07 15:33:24 -08:00
Yi Kong e05613dd70 Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 4a7400be79
am: 11c39a728a

Change-Id: I880489b16e51cb6e43ed94f54394ae403a0e4fea
2018-12-07 15:16:29 -08:00
Yi Kong 11c39a728a Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag""
am: 4a7400be79

Change-Id: I5bce78df06270134ebf3f9ac00b176f1fd80304e
2018-12-07 15:12:26 -08:00
Yi Kong a2eae4dfe7 Merge "Remove unneeded -Wno-dangling-field flag" am: 3412046caf
am: a9d3b3a947

Change-Id: Ibbd5e1cff74266844feb3b3c4c02f51d00ad7d40
2018-12-07 14:25:10 -08:00
Yi Kong a9d3b3a947 Merge "Remove unneeded -Wno-dangling-field flag"
am: 3412046caf

Change-Id: If82dad79f357ba4c59a0e24f7b15b6285051a511
2018-12-07 14:21:07 -08:00
Yi Kong 4a7400be79 Revert "Revert "Remove unneeded -Wno-constant-logical-operand flag""
This reverts commit f993e7797d.

Build breakage fixed.

Test: m checkbuild
2018-12-07 22:00:57 +00:00
Yi Kong 3412046caf Merge "Remove unneeded -Wno-dangling-field flag" 2018-12-07 21:59:21 +00:00
Chih-hung Hsieh 9a0bf162ab Merge "Switch to clang-r346389b." am: 98f91d4f72
am: 7a43111d0f

Change-Id: I0b91738943b3b334bc095c58fcf3f08386850072
2018-12-07 12:36:24 -08:00
Chih-hung Hsieh 7a43111d0f Merge "Switch to clang-r346389b."
am: 98f91d4f72

Change-Id: Iefcb7128460c336642f22440e0de22111913c586
2018-12-07 12:31:18 -08:00
Chih-hung Hsieh 98f91d4f72 Merge "Switch to clang-r346389b." 2018-12-07 20:19:09 +00:00
Yi Kong d218df1b2f Remove unneeded -Wno-dangling-field flag
Test: m checkbuild
Change-Id: I4867fb80ffa901d4fef96b315cd114e6f9b82476
2018-12-06 16:43:55 -08:00
Chih-Hung Hsieh 25a972280f Undo workaround of flag filtering. am: 1017b37654
am: 058cd51ebb

Change-Id: Ib5fed3a392a0e7e6f5bd25ed583ce2db1daf37ba
2018-12-06 16:11:42 -08:00
Chih-Hung Hsieh 058cd51ebb Undo workaround of flag filtering.
am: 1017b37654

Change-Id: I1645934dad7001555a2ac32e4fe17cd72aa540c4
2018-12-06 16:07:04 -08:00
Chih-Hung Hsieh 1017b37654 Undo workaround of flag filtering.
* Now header-abi-dumper does not complain about -fno-sanitize=implicit-integer-sign-change

Bug: 119558057
Test: make checkbuild
Change-Id: I80be08dd5aa184498bdbb83b42b877dbec152165
2018-12-06 12:12:41 -08:00
Chih-Hung Hsieh a910d83a41 Switch to clang-r346389b.
Bug: 120551946
Test: make checkbuild, boot, go/clang-r346389b-testing
Change-Id: I71e28ee97cb02b6be71847b53fbb05007c936e34
2018-12-06 11:18:28 -08:00
Dan Albert 899c23e19b Add flag to disable source directory includes.
Not all projects can be built when their base directory (the
directory containing the Android.bp file) is automatically included.
For example, external/jsoncpp has a file named version, which will
override the standard library's <version> header.

It would maybe be reasonable for this to be on by default, but many
projects in the tree currently depend on this behavior.

Test: make checkbuild
Bug: None
Change-Id: I58dff2689270ae56fef7cf83be31262d16794fc4
2018-12-06 11:04:03 -08:00
Martin Stjernholm 9c1fb0502d Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag"" am: 53afe27ef9
am: ae0f414646

Change-Id: Ib4fca3dc896396ff4e5af6e0894913bdcf9d0db0
2018-12-06 04:54:48 -08:00
Martin Stjernholm ae0f414646 Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag""
am: 53afe27ef9

Change-Id: Id9e853048df0ead63df11f5460289dd96aac622b
2018-12-06 04:51:37 -08:00
Jerome Gaillard 82bb8b1359 Upgrade Windows default build version from Vista to 7
This is needed to build libicui18n on Windows, as it depends on APIs
created in Windows 7 (ResolveLocaleName).

Test: sdk build
Change-Id: If64510a262f7f1d4d356b1a9960ceea114cfa78a
2018-12-06 12:39:12 +00:00
Martin Stjernholm 53afe27ef9 Merge "Revert "Remove unneeded -Wno-constant-logical-operand flag"" 2018-12-06 12:33:30 +00:00
Martin Stjernholm f993e7797d Revert "Remove unneeded -Wno-constant-logical-operand flag"
This reverts commit 4f0ce757aa.

Reason for revert: Breaks several targets in internal git_master, e.g. http://ab/5165971.

Test: Build failing library
Change-Id: I02a5ade05a76b24020586c55a4e8f441ca7708a9
2018-12-06 12:17:40 +00:00
Yi Kong 608217f1e0 Merge "Remove unneeded -Wno-constant-logical-operand flag" am: a7a432fb82
am: 3c861d1b33

Change-Id: I5a5a77ff4f3e68f34dccfe95097b9980a1954b70
2018-12-05 20:42:22 -08:00
Yi Kong 3c861d1b33 Merge "Remove unneeded -Wno-constant-logical-operand flag"
am: a7a432fb82

Change-Id: I5dcc954fc139d9ab43a1f399fefe61ce7ceef2f1
2018-12-05 20:38:17 -08:00
Treehugger Robot a7a432fb82 Merge "Remove unneeded -Wno-constant-logical-operand flag" 2018-12-06 03:36:11 +00:00
Peter Collingbourne 7731129d55 Merge "Stop mapping c++17 to c++1z." am: 60045811c0
am: 49801f4373

Change-Id: Idc29b66b27e5c9bb09d2f3ad159f8e4991a9128f
2018-12-05 18:24:46 -08:00
Peter Collingbourne 49801f4373 Merge "Stop mapping c++17 to c++1z."
am: 60045811c0

Change-Id: Ia9aeb2454ba7ead27e10edd24a2fc9051a4213b6
2018-12-05 18:19:35 -08:00
Peter Collingbourne 60045811c0 Merge "Stop mapping c++17 to c++1z." 2018-12-06 02:07:31 +00:00
Yi Kong 4f0ce757aa Remove unneeded -Wno-constant-logical-operand flag
Test: m checkbuild
Change-Id: If1ec62b6d88b8260c9ec39e0d63a379e7ae573e9
2018-12-06 00:18:05 +00:00
Dimitry Ivanov 2e091d6544 Merge "Make filegroups work for library.Shared/Static.Srcs" am: 53c21b7152
am: c0da7bb41b

Change-Id: I7478587cb8a0a4c1d2a4446a251743561b98a056
2018-12-05 14:38:47 -08:00
Dimitry Ivanov c0da7bb41b Merge "Make filegroups work for library.Shared/Static.Srcs"
am: 53c21b7152

Change-Id: Iaf655ef7d621dd7a3ac422b62f8c80360babd7c8
2018-12-05 14:30:28 -08:00
Dimitry Ivanov 53c21b7152 Merge "Make filegroups work for library.Shared/Static.Srcs" 2018-12-05 22:13:33 +00:00
Chih-hung Hsieh 022595785e Merge "Switch to clang-r346389." am: 89dbee61ff
am: 644df40b33

Change-Id: I929e08b8da5863abe41a814f06fb3c4400635438
2018-12-05 11:07:26 -08:00
Chih-hung Hsieh 644df40b33 Merge "Switch to clang-r346389."
am: 89dbee61ff

Change-Id: I18befe8152bb455cee18852a5b494256c0c175be
2018-12-05 10:53:03 -08:00
Chih-hung Hsieh 89dbee61ff Merge "Switch to clang-r346389." 2018-12-05 18:24:12 +00:00
dimitry 0345ad8073 Make filegroups work for library.Shared/Static.Srcs
Add dependencies for source modules when they are referenced in
library.Shared/Static.Srcs. Use ExpandSources to expand filegroups
for these properties.

Bug: http://b/120534727
Test: make
Change-Id: I58d02d8f7d60026abbcde75298c7a61b27bdbf12
2018-12-05 15:31:10 +00:00
Haibo Huang 9ae1005f63 Remove denver from soong am: 47c9d4c8a3
am: 9223081372

Change-Id: I9a6f28e148340cc0700fda13bfc065fe32682fa4
2018-12-04 23:37:39 -08:00
Haibo Huang 9223081372 Remove denver from soong
am: 47c9d4c8a3

Change-Id: Ie63b19efa16354b8e6003bca7e4330cd03c2981c
2018-12-04 23:29:36 -08:00
Haibo Huang 47c9d4c8a3 Remove denver from soong
Test: build
Change-Id: If740c2aaa321dee01f5d99c37171390e15f62c62
2018-12-04 19:39:48 -08:00
Peter Collingbourne d7225eaac4 Stop mapping c++17 to c++1z.
Clang has been accepting -std=c++17 since August 2017.

Change-Id: Iebb91438ba26b3cc4dbbdcd86e15c9df5901f402
2018-12-04 16:46:27 -08:00
Haibo Huang 7ae1eb16f1 Remove denver64 from soong am: f46b1cb06e
am: 238f6c330d

Change-Id: I640a9e965b47ae5269818a2076ca1389e0a748ff
2018-12-04 16:44:14 -08:00
Haibo Huang 238f6c330d Remove denver64 from soong
am: f46b1cb06e

Change-Id: I400a0bcabbb3ebd63136a28e6cf58314f4b499e8
2018-12-04 16:35:13 -08:00
Haibo Huang f46b1cb06e Remove denver64 from soong
Test: build
Bug: 73545680
Change-Id: I6b213a1d83275c566fd6142a07550094240528c4
2018-12-04 21:01:50 +00:00
Chih-Hung Hsieh 3567e62f97 Switch to clang-r346389.
* Add -fno-sanitize=implicit-integer-sign-change when
  there is any integer related sanitizer, and this check
  is not explicitly specified.
  Android core does not boot with this new sanitizer yet.
* Filter out -fno-sanitize=implicit-integer-sign-change
  from tooling flags.

Bug: 119329758
Bug: 119557795
Test: make checkbuild, boot, go/clang-r346389-testing
Change-Id: I709de569cb73d070fc4958e2b4387f4041bc5438
2018-12-04 19:50:45 +00:00
Jiyong Park d28f1dfcbd Merge "Stubs variant is used when building for APEX" am: ce16f3bac8
am: 421ba99ebc

Change-Id: Icbcc08fcb9d075baabac41d25ac8824868e4404f
2018-12-04 06:31:23 -08:00
Jiyong Park 421ba99ebc Merge "Stubs variant is used when building for APEX"
am: ce16f3bac8

Change-Id: I47381a8546586a6a1b7f20158b58c34a0cdf9f2a
2018-12-04 06:21:32 -08:00
Jiyong Park ce16f3bac8 Merge "Stubs variant is used when building for APEX" 2018-12-04 14:07:56 +00:00
Yi Kong b910379c91 Merge "Revert "Revert "Remove unnecessary warning suppression""" am: 3a33fe535e
am: 9d256a5aa1

Change-Id: I76bdf7af21564068168fa3cad9b3934f7d6f2bf4
2018-12-04 01:52:57 -08:00
Yi Kong 9d256a5aa1 Merge "Revert "Revert "Remove unnecessary warning suppression"""
am: 3a33fe535e

Change-Id: I81421f5340798c181c7f9b72faea5bc433bc0ed5
2018-12-04 01:47:51 -08:00
Yi Kong 3a33fe535e Merge "Revert "Revert "Remove unnecessary warning suppression""" 2018-12-04 09:30:54 +00:00
Justin Yun 2a428940a3 Merge "VNDK lib must not have `product_specific: true`" am: 2098eb8c2a
am: ec8bf83f9c

Change-Id: Ic99179293d988bfadd3d25beae81851b6ac315fa
2018-12-04 01:03:55 -08:00
Justin Yun ec8bf83f9c Merge "VNDK lib must not have `product_specific: true`"
am: 2098eb8c2a

Change-Id: Iac87ea02330944d0dce438209433186220114c6e
2018-12-04 00:57:43 -08:00
Jiyong Park 25fc6a9cc9 Stubs variant is used when building for APEX
When a native module is built for an APEX and is depending on a native
library having stubs (i.e. stubs.versions property is set), the stubs
variant is used unless the dependent lib is directly included in the
same APEX with the depending module.

Example:

apex {
    name: "myapex",
    native_shared_libs: ["libX", "libY"],
}

cc_library {
    name: "libX",
    shared_libs: ["libY", "libZ"],
}

cc_library {
    name: "libY",
    stubs: { versions: ["1", "2"], },
}

cc_library {
    name: "libZ",
    stubs: { versions: ["1", "2"], },
}

In this case, libX is linking to the impl variant of libY (that provides
private APIs) while libY is linking to the version 2 stubs of libZ. This is
because libY is directly included in the same apex via
native_shared_libs property, but libZ isn't.

Bug: 112672359
Test: apex_test added
Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
2018-12-04 17:46:22 +09:00
Treehugger Robot 2098eb8c2a Merge "VNDK lib must not have `product_specific: true`" 2018-12-04 08:39:35 +00:00
Dan Willemsen 172e8d3ac0 Merge "Apply system_shared_libs to static libraries" am: 6f3e24ab55
am: 1bd48bd2b2

Change-Id: I1eeb1440f1c2dfc53771ccb13f9a725f2e8005b3
2018-12-03 22:35:08 -08:00
Dan Willemsen 1bd48bd2b2 Merge "Apply system_shared_libs to static libraries"
am: 6f3e24ab55

Change-Id: I67b4841cf66fd01528e542334a28734c6aa0c8dd
2018-12-03 22:30:52 -08:00
Justin Yun 9357f4aeda VNDK lib must not have `product_specific: true`
VNDK libs are system defined libraries. They must not be product
specific. Adding sanity check and a test to prevent setting
`product_specific: true` on VNDK libs.

Bug: 119575107
Test: building a vndk lib with 'product_specific: true,'
      must return error.

Change-Id: Ie0326540a692573f076ee08baf5d2e2f09d1007e
2018-12-04 14:10:59 +09:00
Yi Kong 734a07c66d Revert "Revert "Remove unnecessary warning suppression""
This reverts commit afedf3bdc9.

Build failure fixed.

Change-Id: I46e7e222c2b5bfa5b1846f3fe87444afb70f1b31
2018-12-04 00:42:27 +00:00
Dan Willemsen 3a26eefdbe Apply system_shared_libs to static libraries
Even though we aren't doing any linking for static libraries, the
default libraries (libc, libm, libdl) are now exporting headers, so we
should be using those for both static and shared libraries (especially
when re-using objects between the two). Without this we've been in a
state where a cc_library will compile differently than a
cc_library_shared, as we'd re-use the compilation units from the static
variant in the shared library.

This does require marking many of libc's dependencies as not using libc
with system_shared_libs, otherwise we run into dependency loops.

Test: treehugger
Change-Id: Ie42edc5184f315f998db953594e425214b810e0e
2018-12-03 15:38:39 -08:00
Evgenii Stepanov 44ab1d9f09 Merge "Add sanitizer runtime library to recovery when needed." am: 5b46a085d7
am: 792684273d

Change-Id: Ie37758e2906bb7ee611d8ff9794850183350ed2a
2018-12-03 14:43:34 -08:00
Evgenii Stepanov 792684273d Merge "Add sanitizer runtime library to recovery when needed."
am: 5b46a085d7

Change-Id: I7115159d4bd3eb88636699c4164fabe07501554f
2018-12-03 13:53:18 -08:00
Treehugger Robot 5b46a085d7 Merge "Add sanitizer runtime library to recovery when needed." 2018-12-03 20:42:37 +00:00
Zhizhou Yang 9759e5e76a Merge "Do not generate SHT_RELR relocations before API 28" am: 89df00c216
am: e74941431e

Change-Id: Ib4b63e48374e239dc71318e1d39c76087ae5d75b
2018-12-03 12:20:17 -08:00
Zhizhou Yang e74941431e Merge "Do not generate SHT_RELR relocations before API 28"
am: 89df00c216

Change-Id: I76f45bbea868f137906074dfda233ecad02d9caa
2018-12-03 11:27:53 -08:00
Treehugger Robot 89df00c216 Merge "Do not generate SHT_RELR relocations before API 28" 2018-12-03 18:40:59 +00:00
Pirama Arumuga Nainar 7bb60504c5 Merge "Use libucrt instead of libmsvcr110" am: 7ef2700761
am: 81c3d410fb

Change-Id: I6ddca4684065170c788751b6855638b20b077e34
2018-12-03 10:06:53 -08:00
Pirama Arumuga Nainar 81c3d410fb Merge "Use libucrt instead of libmsvcr110"
am: 7ef2700761

Change-Id: I8aedf207323172895f103b4939c3c4170bec096e
2018-12-03 10:01:33 -08:00
Pirama Arumuga Nainar 7ef2700761 Merge "Use libucrt instead of libmsvcr110" 2018-12-03 17:53:43 +00:00
Yi Kong ec10bb5d51 Merge "Revert "Remove unnecessary warning suppression"" am: cf492adb34
am: 1e8681d22f

Change-Id: I2debeb50164d6c5f8d516fe66a6870d34f9dd3eb
2018-11-30 15:47:19 -08:00
Yi Kong 1e8681d22f Merge "Revert "Remove unnecessary warning suppression""
am: cf492adb34

Change-Id: If2941e0eb1a19194bce00af67e5e81aab6368286
2018-11-30 15:42:10 -08:00
Yi Kong cf492adb34 Merge "Revert "Remove unnecessary warning suppression"" 2018-11-30 23:20:11 +00:00
Elliott Hughes de93ddd67e Merge "C++17: switch the default." am: 3633e8641e
am: 0d64de3c0f

Change-Id: Ib6c1c6ba366276da72523acdd111c20a4f7a8b38
2018-11-30 14:14:58 -08:00
Elliott Hughes 0d64de3c0f Merge "C++17: switch the default."
am: 3633e8641e

Change-Id: I45e98afc8f6fce72ca98ec40c251ffee1f860dea
2018-11-30 14:09:50 -08:00
Zhizhou Yang 9100b1d83d Do not generate SHT_RELR relocations before API 28
This patch fixes an issue that SHR_RELR relocation is not supported by
SDK version earlier than API 28. We only turn it on when SDK is not
used, or SDK version is newer than or equal to API 28.

Test: m -j48 for aosp_taimen-userdebug
Bug: http://b/119086751
Change-Id: I33124ae4f35fb8c00ae9103e8c04e2d4ccd5fec3
2018-11-30 22:07:35 +00:00
Elliott Hughes 3633e8641e Merge "C++17: switch the default." 2018-11-30 22:03:45 +00:00
Pirama Arumuga Nainar 087bba7356 Use libucrt instead of libmsvcr110
Bug: http://b/117796718

ucrt is either preinstalled in newer Windows or can be installed in
older Windows, whereas a dependence on msvcr110 doesn't work on Windows
without additional dependencies.

Test: Run generated binaries on Windows VM (7, 8, and 10) without
installing any extra dependencies.

Change-Id: Ibfaea5d78ac85ff4eeed35c97ad8cae4b44dadbc
2018-11-30 21:42:33 +00:00
Vishnu Nair afedf3bdc9 Revert "Remove unnecessary warning suppression"
This reverts commit ee53a98e31.

Reason for revert: build break

Change-Id: I065b702d6eaa2e72d47a2b7a404fdd7fe51661c3
2018-11-30 21:01:30 +00:00
Yi Kong a9c6ec0c95 Merge "Remove unnecessary warning suppression" am: da5cf6a7f3
am: 779ec3a2dc

Change-Id: I581200aa4df67c8ab7076bfbfa9b110b8c15e5ec
2018-11-30 12:05:28 -08:00
Yi Kong 779ec3a2dc Merge "Remove unnecessary warning suppression"
am: da5cf6a7f3

Change-Id: I84ae0cb712c26ff4941aaea583bfa467378292a5
2018-11-30 11:51:03 -08:00
Yi Kong da5cf6a7f3 Merge "Remove unnecessary warning suppression" 2018-11-30 19:24:35 +00:00
Nikita Iashchenko 3d043a6ebb Merge "Revert "C++17: switch the default."" am: a9e5a40bb8
am: 1ba2e34897

Change-Id: I853197b418817bd09e99b43f5b875a1260619907
2018-11-30 08:26:50 -08:00
Nikita Iashchenko 1ba2e34897 Merge "Revert "C++17: switch the default.""
am: a9e5a40bb8

Change-Id: I29aa03b1dbb6b149fd3c393070d89461a1815d73
2018-11-30 08:22:29 -08:00
Elliott Hughes 34e4e416e7 C++17: switch the default.
Bug: http://b/111067277
Change-Id: I07af7cd9e65a6e238d7d256c65927fe128a0f052
Test: builds
2018-11-30 16:03:06 +00:00
Nikita Iashchenko a9e5a40bb8 Merge "Revert "C++17: switch the default."" 2018-11-30 14:27:16 +00:00
Jerome Gaillard 80e1b1250c Merge "Add flags for Windows assembly builds" am: ba0653cdb4
am: dacb269342

Change-Id: Iea9ad5904ffb2eef10354faf1989e8239fd0c552
2018-11-30 04:47:39 -08:00
Jerome Gaillard dacb269342 Merge "Add flags for Windows assembly builds"
am: ba0653cdb4

Change-Id: I7e60185582a0a55e81529d353fbd633873b7a408
2018-11-30 04:43:31 -08:00
Jerome Gaillard ba0653cdb4 Merge "Add flags for Windows assembly builds" 2018-11-30 12:30:06 +00:00
Nikita Iashchenko 7a782203b9 Revert "C++17: switch the default."
This reverts commit c35fc0e130.

Reason for revert: fix broken targets in the internal master.

Change-Id: I70447a05ae5b2afa7efc7ab21c0432e651cab1ba
2018-11-30 11:15:16 +00:00
Elliott Hughes 60bc94c195 Merge "C++17: switch the default." am: b44bdb2be3
am: 92fbd0699e

Change-Id: Ibd90ee82cb36c3e3884d42e016414e09ab60a39f
2018-11-30 00:47:34 -08:00
Elliott Hughes 92fbd0699e Merge "C++17: switch the default."
am: b44bdb2be3

Change-Id: Ib4fd903bd957d3114e9c7e87712497ea65eb9a17
2018-11-30 00:32:12 -08:00
Treehugger Robot b44bdb2be3 Merge "C++17: switch the default." 2018-11-30 08:06:02 +00:00
Evgenii Stepanov 98f5b0642c Add sanitizer runtime library to recovery when needed.
Make sanitized targets in recovery depend on ".recovery" flavor of
sanitizer runtime library. This forces installation of the runtime
library in recovery image as long as at least one target depends on it.

Test: hwasan build can boot into recovery
Bug: 112438058
Bug: 119582521
Change-Id: I1b7f9fa4ff5f29acb03c27074512ea24467a3d37
2018-11-29 23:22:20 +00:00
Ivan Lozano 672e74cede Merge "Disable AArch64 XOM when not using lld." am: a6703fe6b7
am: 2ba4fd10f4

Change-Id: I94a1808e7021672b9666230d7539a88c86e2aa95
2018-11-29 08:33:19 -08:00
Ivan Lozano 2ba4fd10f4 Merge "Disable AArch64 XOM when not using lld."
am: a6703fe6b7

Change-Id: I6af0beba0c9766b3793534aa7c364cea46545dc0
2018-11-29 08:20:00 -08:00
Ivan Lozano a6703fe6b7 Merge "Disable AArch64 XOM when not using lld." 2018-11-29 15:58:39 +00:00
Jerome Gaillard 80fec097b1 Add flags for Windows assembly builds
This is necessary to build libjpeg for Windows.

Test: lunch sdk, make libjpeg
Change-Id: I6ace0e524d1d710b5ce78320e7a06777511d1634
2018-11-29 15:47:31 +00:00
Stephen Hines cafef7bd53 Merge "Support Qualcomm Kryo 385 CPU variant." am: c027b309f1
am: 8284a728de

Change-Id: I6d4166c54bf7d274db52c9fbbdbd65d25c232ddd
2018-11-29 00:13:28 -08:00
Stephen Hines 8284a728de Merge "Support Qualcomm Kryo 385 CPU variant."
am: c027b309f1

Change-Id: I69def413ca375096f37620398a44462e2779b753
2018-11-29 00:06:55 -08:00
Stephen Hines c027b309f1 Merge "Support Qualcomm Kryo 385 CPU variant." 2018-11-29 07:23:40 +00:00
Elliott Hughes c35fc0e130 C++17: switch the default.
Bug: http://b/111067277
Test: builds
Change-Id: I5065b03218772bf8cf8173f3d9808b3f0a484dc5
2018-11-28 21:45:23 -08:00
Elliott Hughes f4346985f2 Merge "Bump "experimental" C++ to C++2a." am: 4afedfadb2
am: d1ad118bbe

Change-Id: I11636172901425896137ef45834af95886580087
2018-11-28 18:12:16 -08:00