Commit Graph

2199 Commits

Author SHA1 Message Date
Jiyong Park
6bf77f3ab4 Merge "Fix: runtime apex is not instrumented with sanitizer" am: 101d7600b2
am: 7581398376

Change-Id: I48a87d35e7779265afb1938f761673608ff91f06
2019-01-31 21:56:40 -08: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
dd070fb200 Add unstrippedOutputFilePath to the linker interface am: af6d895941
am: 837c1c1e31

Change-Id: Iffe272e5ac3f571b7767d54e880c1f42b487c9da
2019-01-31 21:43:33 -08: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
33c1d15591 Merge "XOM dependency check skipping static binaries." am: 2ccd9b83d0
am: 054d752f4a

Change-Id: I1d553df12891c101fd5265083b9482ab685f3645
2019-01-31 13:57:03 -08: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
9103612cb3 exclude_shared_libs should exlude headers in {static|shared}.export_*_lib_headers am: 51271c1fb4
am: d48fd64691

Change-Id: Ibc088de6e5792c64a434c89066a47750fe9db630
2019-01-31 03:21:35 -08: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
67e52ef256 "bootstrap: true" modules are using bootstrap Bionic am: a4b9dd08c0
am: 356278b9fa

Change-Id: Ib071e7632d603238e9f101e4dc561f487433a5b2
2019-01-30 21:08:55 -08:00
Jiyong Park
1f67ac48b7 bootstrap bionic are moved to ./bootstrap subdir am: 429660f3c8
am: e9601d6446

Change-Id: I64318b907a0ae7531bd5f236152f661ea2f09e15
2019-01-30 21:08:42 -08: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
de7c431ad1 Merge "Add a header_abi_checker section" am: 4c20135b19
am: cf6869990c

Change-Id: Icde8e896cda9a91c36c12562918a9da010580852
2019-01-30 18:37:09 -08: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
c4843f1d9f Fix: deps to sanitizer runtime libs are with correct 'image' variant am: 3b1746a212
am: dc9872a0d3

Change-Id: I53c6b3a08b1c7e5a2a16e88e202d2eee3989567e
2019-01-30 09:34:29 -08:00
Jiyong Park
11eda2d3dd Merge "Reland "Symbols for libs in APEXes are available"" am: 3a30e13683
am: c49fa7b522

Change-Id: I2c71be24d61b5ad65b7ddd9347c5f52d961da7e6
2019-01-30 09:25:53 -08: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
1b9ee9d55e Merge "config: swap to glibc 2.17" am: f4803454b0
am: 5106157118

Change-Id: If14fbfc6a66f39f36a2d8c626576a2e0582c630a
2019-01-29 14:47:13 -08: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
6ac171c19c Merge "Update compdb to put full path to compiler" am: 4087dd660f
am: 1a90a8a5c0

Change-Id: I3916221ca82ee1044cfd41b5d77406a7596775d4
2019-01-29 13:03:56 -08: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
205efdab08 Merge "Add support for symlink_preferred_arch in apex" am: 5956b2b3cb
am: 4c3b29cd80

Change-Id: I63d2f240e6dd995a1550e6c036b00cf55b6d516a
2019-01-29 09:56:55 -08: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
d5325cde0a Merge "Remove libnativehelper from global includes" am: 6703e6f390
am: 2946369186

Change-Id: I2a4368d191d443fff15e385c6ef89a9af6cb9f03
2019-01-29 06:51:53 -08: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
991d5c09d0 Merge "Create sanitizer variants of APEX only when SANITIZE_TARGET is set" am: 62f6fcbbb9
am: f85699e747

Change-Id: I4c3ce8bdbf9dcbb313651ed515544a9346229b66
2019-01-28 23:13:42 -08:00
Jiyong Park
366532c88a Merge "stubs lib can export headers lib" am: b55752827a
am: b5d6b973f7

Change-Id: I236f45a8f6361ce45901042b14274c51daa1e80f
2019-01-28 23:08:49 -08:00
Logan Chien
aa943b0a65 Merge "Fix a typo related to abidiffs" am: a9403f279c
am: 5258d3a8ad

Change-Id: I01a85bd4dab958053d6856f0c9f30b8139e794d7
2019-01-28 22:40:49 -08:00
Jiyong Park
3f86876d8e Merge "Add __ANDROID_APEX__" am: 0425aa13ec
am: 7cb4725f99

Change-Id: I705f7a3045b3223e4e40736153fcc30d2b02f439
2019-01-28 22:19:07 -08: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