Commit Graph

9727 Commits

Author SHA1 Message Date
Kostya Kortchinsky 66b1193d55 Merge "Add option to disable Scudo globally [Soong]" 2019-02-05 14:45:39 +00:00
Jiyong Park b7c24df220 APEX respects relative_install_path
relative_install_path for cc_library is respected by APEX.

relative_install_path for cc_binary is not yet respected because doing
it will break the path to the dynamic linker in the runtime APEX.
That change should be done along with changes in init, bionic, etc.

Bug: 123721777
Test: m (apex_test.go amended)
Change-Id: I855f8eda0d4255d563861ac96d0d3e2c669e9a2a
2019-02-05 21:00:41 +09:00
Dan Willemsen dcac078c91 Turn on more warnings during CleanSpec processing
We don't want these to be warnings, may as well be errors instead of
turning off the warnings.

Bug: 123583617
Test: treehugger
Change-Id: I6ca518c9647e712426952cb88bdb044d933b23f2
2019-02-04 20:58:25 -08:00
Stephen Hines 363cab0bea Merge "Use llvm-{strip,objcopy} by default" 2019-02-05 03:13:14 +00:00
Jaewoong Jung 24788182a9 Add prebuilt_etc_host module type.
Change-Id: I667ac7325331fa2c1ecaa0f68c24bfb6d47aa8ad
Fixes: 123380976
Test: prebuilt_etc_test.go + external/parameter-framework/Schemas.mk
2019-02-04 14:48:51 -08:00
Kostya Kortchinsky d5275c8657 Add option to disable Scudo globally [Soong]
This adds an option in Soong to turn off Scudo globally.

Bug: 123228023
Test: enable Scudo for tombstoned, lunch marlin_svelte-eng && m -j, and
make sure that Scudo is not linked in
out/target/product/marlin/system/bin/tombstoned
Test: enable Scudo for tombstoned, lunch marlin-userdebug && m -j, and
make sure that Scudo is linked in
out/target/product/marlin/system/bin/tombstoned

Change-Id: I0b0992446953fc4074bde94507b66f92764c8143
Merged-In: I0b0992446953fc4074bde94507b66f92764c8143
2019-02-04 12:29:17 -08:00
Colin Cross 54956abf1f Merge changes I545a832a,I85a51b04
* changes:
  Remove empty DepsMutator methods
  Replace *[]string with []string in product variables
2019-02-04 17:38:05 +00:00
Anton Hansson 0c1fabbb32 Merge "Write out module owner for prebuilt_etc" 2019-02-04 17:35:43 +00:00
Anton Hansson ce0e258977 Write out module owner for prebuilt_etc
Translate owner: "x" into LOCAL_MODULE_OWNER := x in prebuilt_etc
rules.

Test: unit test in CL exercised with m nothing
Change-Id: Ic177b61e6f685f7a0263129a34acdf0bd46d16c2
2019-02-04 14:20:43 +00:00
Yi Kong b5c34d7f40 Use llvm-{strip,objcopy} by default
... except for Darwin Mach-O, as it is not supported by llvm-strip.

Test: m checkbuild
Bug: 119221035
Change-Id: I021637b6dd3530bff1f563f2ec7c2168e1083b7e
2019-02-04 18:20:28 +08:00
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
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
Colin Cross a74ca046da Replace *[]string with []string in product variables
There is no need for *[]string, []string can already hold a nil
value to specify "not set".

Test: all soong tests
Change-Id: I85a51b042c12aee1565a9287d62924feeeafd486
2019-02-01 16:43:02 -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 42b87a2e56 Merge "Switch to clang-r349610" 2019-02-01 16:49:36 +00:00
Treehugger Robot 101d7600b2 Merge "Fix: runtime apex is not instrumented with sanitizer" 2019-02-01 05:45:22 +00: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
Treehugger Robot df819e6b0c Merge changes from topic "libc-bionic"
* changes:
  Give a knob to have apex ignore system-lib special cases
  Add limited target-specific configuration to apex.
2019-01-31 22:24:55 +00:00
Treehugger Robot 2ccd9b83d0 Merge "XOM dependency check skipping static binaries." 2019-01-31 21:42:42 +00:00
Treehugger Robot 2d44f104ee Merge "Expand Jiyong's apex OWNERship" 2019-01-31 21:42:38 +00:00
Dan Willemsen bfd1830c32 Merge "Add sh_binary[_host] for shell script that should be installed as executable" 2019-01-31 21:18:55 +00:00
Dan Willemsen 5e2e3ef846 Expand Jiyong's apex OWNERship
There's more to apex than just apex.go

Change-Id: I6603db10c43148c4f17fb9d3b762400472b32526
2019-01-31 18:57:00 +00:00
Alex Light fc0bd7c15b Give a knob to have apex ignore system-lib special cases
apex will normally place libc and some other system libraries into a
separate directory. This is to ensure that early startup works
correctly. Some apex targets want to have these libraries at the
normal places however.

Test: ./art/tools/build_linux_bionic.sh com.android.runtime.host
Bug: 123591866
Bug: 120266448
Change-Id: Ib5a67a43fe3eea6188b4df9215e743f1634045f3
2019-01-31 10:53:02 -08:00
Alex Light 9670d332b6 Add limited target-specific configuration to apex.
Some apex targets need to be able to change their contents based on if
they are host or target or what libc they are using. This adds support
for doing this using the standard 'target: {...}' idiom.

Test: m com.android.runtime.host
Test: ./art/tools/build_linux_bionic.sh com.android.runtime.host
Bug: 123591866
Change-Id: If73bee650cdeb277c0e603763aa0b0108656bfdd
2019-01-31 10:52:57 -08: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
Treehugger Robot d0da240a2d Merge "Enable last released check for SystemApi" 2019-01-31 15:45:02 +00: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
Anton Hansson 704595aa60 Merge "Allow excluding specific overlay sub-directories" 2019-01-31 10:52:22 +00: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 4c20135b19 Merge "Add a header_abi_checker section" 2019-01-31 02:05:51 +00:00
Treehugger Robot de53d15b0f Merge "Increase max line length for KatiReader bufio.Scanner" 2019-01-31 01:46:07 +00:00
Colin Cross 75ec1ec13f Increase max line length for KatiReader bufio.Scanner
bufio.Scanner defaults to a relatively small max line length of
64kB.  Kati output may have long lines, use a max length of 2MB
instead.

Fixes: 123590367
Test: m checkbuild
Change-Id: Ia869c5c2526621244f0065736e0d5fd9a088df06
2019-01-30 23:19:23 +00:00
Adrian Roos 62e34b9f38 Enable last released check for SystemApi
Test: make droid
Bug: 123222452
Change-Id: I952ec3d64a51fb892b14146a7fe38db358bea476
2019-01-30 19:51:39 +01: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
Treehugger Robot 3a30e13683 Merge "Reland "Symbols for libs in APEXes are available"" 2019-01-30 16:57:11 +00:00
Anton Hansson 94c93f37cb Allow excluding specific overlay sub-directories
This change allows PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS to
refer to subdirectories of directories in PRODUCT_PACKAGE_OVERLAYS,
e.g.:
PRODUCT_PACKAGE_OVERLAYS := foo/overlay
PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS := foo/overlay/packages/apps/HelloWorld

Bug: 118823052
Test: m nothing (soong tests)
Change-Id: Ic9f89c11d023ea1b4f6f2f6683d94c81aa7b8a1b
2019-01-30 16:07:56 +00: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
Adrian Roos e8cc556bf7 Merge "Add last released API check to checkapi for public Android API" 2019-01-30 09:31:58 +00:00
Treehugger Robot 05f9055505 Merge "Rename preferCodeIntegrity to useEmbeddedDex" 2019-01-30 05:07:22 +00: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
Treehugger Robot b321d995a1 Merge "Revert "system-clang-format: DontAlign"" 2019-01-30 02:49:19 +00:00
Logan Chien 7505252b4f Merge "Add missing dependencies for python_test" 2019-01-30 01:55:36 +00:00
Tom Cherry eca62454e8 Revert "system-clang-format: DontAlign"
"AlignAfterOpenBracket: DontAlign" is explicitly wrong and was not
common before.

Wrong:

  int fs_mgr_do_mount(Fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point,
          bool needs_checkpoint) {

Right:

  int fs_mgr_do_mount(Fstab* fstab, const char* n_name, char* n_blk_device, char* tmp_mount_point,
                      bool needs_checkpoint) {


This reverts commit a4319f7800.
Test: clang-format works correctly.
Bug: 122835115

Change-Id: Icd988070f208e1963bb68651c63fa369cb1e2782
2019-01-30 00:29:23 +00:00
George Burgess IV f4803454b0 Merge "config: swap to glibc 2.17" 2019-01-29 22:24:58 +00:00
Victor Hsieh d181c8ba76 Rename preferCodeIntegrity to useEmbeddedDex
Test: build and run testing app
Bug: 112037137
Change-Id: Ia82c2c3ba7eb32117a4be078ac31ee2ba510f9eb
2019-01-29 13:09:10 -08:00
Alex Light 4087dd660f Merge "Update compdb to put full path to compiler" 2019-01-29 20:52:27 +00:00
Alexander Smundak faaece8cb0 Merge "Convert BUILD_PREBUILT with LOCAL_MODULE_CLASS=ETC to prebuilt_etc" 2019-01-29 20:42:42 +00:00