Commit Graph

3228 Commits

Author SHA1 Message Date
Hsin-Yi Chen ff7321b32a Merge "Skip ABI checks for APEX variants of opt-in libraries" 2019-08-07 02:00:43 +00:00
Stephen Hines b28643b33f Merge "Add support for AUTO_*_INITIALIZE to build/soong."
am: 7f0560d962

Change-Id: I2d964d462a29539252b3f76544a096028f48c668
2019-08-06 14:39:36 -07:00
Stephen Hines 7f0560d962 Merge "Add support for AUTO_*_INITIALIZE to build/soong." 2019-08-06 21:04:04 +00:00
Hsin-Yi Chen af17d74a1a Skip ABI checks for APEX variants of opt-in libraries
Test: make findlsdumps
Bug: 138219814
Change-Id: I2ae6fadad5af4f7b648aa15307a0bd11339ffc7c
2019-08-06 17:54:01 +08:00
Yifan Hong e7efbc8c78 Add cc_*.target.recovery.static_libs
Test: use static_libs in target.recovery

Change-Id: Ib2a10d09e205932be83e74274a641fd8544f7188
2019-08-05 19:56:44 -07:00
yidong.zhang 263802ebda Merge "Fix recovery-variant VNDK libs miss-installed to recovery img"
am: 52644cb29a

Change-Id: I05db8d67248c11dce6a04d90ae53705ddc3f9228
2019-08-05 15:20:49 -07:00
Treehugger Robot 52644cb29a Merge "Fix recovery-variant VNDK libs miss-installed to recovery img" 2019-08-05 22:02:46 +00:00
Mitch Phillips cead9bad66 Merge "Disable LTO when building with fuzzer support."
am: df7d2cc9f8

Change-Id: Ie4f0e1c6266cca662c4eb133ce2bd9ce85b1dcd9
2019-08-05 11:39:28 -07:00
Mitch Phillips 34b493fec5 Disable LTO when building with fuzzer support.
Bug: 131771163

LTO is currently broken when building with SANITIZE_TARGET=fuzzer. The
compiler bug is currently being addressed upstream (see linked bug), but
we have applied a local workaround in the build system to disable LTO
when building using the fuzzer config.

There is a bug here however. In the sanitizer mutator we explicitly
remove -flto and add -fno-lto. The sanitizer mutator runs after the LTO
mutator, so (in general) this works just fine. The problem exists when a
target specifies an explicit 'lto: { ... }' flag in their Android.bp. In
this case, the sanitizer mutator disables LTO, then the flags are parsed
from the Android.bp, re-enabling LTO.

This patch fixes this issue. If the sanitizer mutator has added the
-fsanitize=fuzzer-no-link flags, then the LTO mutator won't add the LTO
flags after this fact.

Test: Build a target with SANITIZE_TARGET=fuzzer (or a cc_fuzz target),
where there is an explitiy 'lto: { ... }' and watch it now succeed in
building.

Change-Id: I6643909417f666539c23469816926b806e204b06
2019-08-02 16:57:55 -07:00
yidong.zhang d06ecc8af1 Fix recovery-variant VNDK libs miss-installed to recovery img
When no-vendor-variant VNDK is enabled,the vendor variant of VNDK
libraries are not installed.This should not be fit for recovery module.
Recovery module deps should be always installed.

Bug: 138812833
Test: `adb reboot recovery;` recovery mode boot ok

Change-Id: I0c3b8ac0fb0176677ddd94ba7216dd068f2eb81b
2019-08-02 16:24:15 +08:00
Slava Shklyaev a9c30574ce Merge "Add neuralnetworks to ndkPrebuiltSharedLibs"
am: 395ab52ee9

Change-Id: Ida1de881468a7e8eb0dbb3509ded14ec6ea59248
2019-08-01 03:49:09 -07:00
Slava Shklyaev 395ab52ee9 Merge "Add neuralnetworks to ndkPrebuiltSharedLibs" 2019-08-01 10:30:00 +00:00
Roland Levillain d571a52d49 Merge "Handle `test_per_src` modules as indirect dependencies in APEXes."
am: cadffcdd66

Change-Id: I6e420de099250d40069a188b4eef618b0b403591
2019-07-30 04:10:50 -07:00
Roland Levillain cadffcdd66 Merge "Handle `test_per_src` modules as indirect dependencies in APEXes." 2019-07-30 10:41:20 +00:00
Vic Yang 6f127a7fa3 Merge "Add sort_bss_symbols_by_size property for shared libs"
am: 446441fc19

Change-Id: I83344693e2d67721b1fb38eda4d72f993fa419f1
2019-07-29 20:10:54 -07:00
Vic Yang 446441fc19 Merge "Add sort_bss_symbols_by_size property for shared libs" 2019-07-30 02:34:23 +00:00
Peter Collingbourne cb521cb1ca Merge "Specify the API level via the triple instead of __ANDROID_API__."
am: 5f66d76d69

Change-Id: Idea2c10a557ba59bfc303633cdb8fedb9c4fff9e
2019-07-29 18:39:29 -07:00
Peter Collingbourne 5f66d76d69 Merge "Specify the API level via the triple instead of __ANDROID_API__." 2019-07-30 01:23:04 +00:00
Sasha Smundak 61272795a7 Merge "Support source code cross-referencing for C++ and Java"
am: 247de68b89

Change-Id: I5284d9be9865e95671ce8ec1927f74059f7fdf44
2019-07-29 18:13:05 -07:00
Treehugger Robot 247de68b89 Merge "Support source code cross-referencing for C++ and Java" 2019-07-30 00:13:12 +00:00
Vic Yang 6cd1be8993 Add sort_bss_symbols_by_size property for shared libs
If sort_bss_symbols_by_size is true, a shared library is built twice.
The first build generates an unsorted output file, which is used to
generate the symbol ordering file.  The output of the second build is
a shared library with its bss symbols sorted by their size.

With this, the only user of symbol_ordering_file, libc, is migrated to
use the new property, so we remove symbol_ordering_file support as well.

Bug: 135754984
Test: Build and check the resulting libc.so has its bss symbols sorted.
Change-Id: I5c892b44d82eb99cbc070cfa2c680be3087f3364
2019-07-29 13:25:55 -07:00
Roland Levillain f89cd0949c Handle `test_per_src` modules as indirect dependencies in APEXes.
In `apex.apexBundle.GenerateAndroidBuildActions`, we used to pass the
"all tests" ("") module as `module` for all `apexFile` objects created
from a test module using `test_per_src: true`.  An immediate issue of
this situation was that the "" module is hidden from Make, which made
all the generated `apexFile` objects hidden from Make too. This would
break the construction of flattened APEXes, as they rely on Make logic
to install their files.

Instead of collecting `test_per_src` test variations' output files in
`cc.Module.GenerateAndroidBuildActions` and using them in
`apex.apexBundle.GenerateAndroidBuildActions` as part of handling the
"" variation as a direct dependency of an `apexBundle`, process them
as indirect dependencies (and do nothing for the "" variation direct
dependency).

Adjust the indirect dependency logic in
`apex.apexBundle.GenerateAndroidBuildActions` to allow not only
shared/runtime native libraries as indirect dependencies of an
`apexBundle`, but also `test_per_src` tests.

Test: m (`apex/apex_test.go` amended)
Bug: 129534335
Change-Id: I845e0f0dd3a98d61d0b7118c5eaf61f3e5335724
2019-07-29 19:21:27 +01:00
Sasha Smundak 2a4549ec98 Support source code cross-referencing for C++ and Java
Use Kythe (https://kythe.io) to build cross reference for the Android
source code. ~generate the input for it during the build. This is done
on demand: if XREF_CORPUS environment variable is set, build emits a
Ninja rule to generate Kythe input for each compilation rule. It
also emits two consolidation rules (`xref_cxx` and `xref_java`),
that depend on all Kythe input generation rules for C++ and Java.

The value of the XREF_CORPUS environment variable is recorded in the
generated files and thus passed to Kythe. For the AOSP master branch it is
`android.googlesource.com/platform/superproject`, so the command to build
all input for Kythe on that branch is:
```
XREF_CORPUS=android.googlesource.com/platform/superproject m xref_cxx xref_java
```

Each Kythe input generation rule generates a single file with .kzip
extension. Individual .kzip files have a lot of common information, so
there will be a post-build consolidation step run to combine them.
The consolidated .kzip file is then passed to Kythe backend.

The tools to generate .kzip files are provided by Kythe (it calls them
'extractors'). We are going to build them in toolbuilding branches
(clang-tools and build-tools) and check them in as binaries into master
and other PDK branches:
For C++,  `prebuilts/clang-tools/linux-x86/bin/cxx_extractor`
for Java, `prebuilts/build-tools/common/framework/javac_extractor.jar`

Bug: 121267023
Test: 1) When XREF_CORPUS is set, build generates Ninja rules to create
.kzip files; 2) When XREF_CORPUS is set, building
`xref_cxx`/`xref_java` creates .kzip files; 3) Unless XREF_CORPUS is
set, build generates the same Ninja rules as before

Change-Id: If957b35d7abc82dbfbb3665980e7c34afe7c789e
2019-07-26 09:16:47 -07:00
Paul Duffin 25edbe5de7 Merge "Correct tags on StaticSharedLibraryProperties.Cflags"
am: c6fa3eca11

Change-Id: I875b48b1ca3456b99285532343500ccf27e2e1f9
2019-07-26 02:00:46 -07:00
Slava Shklyaev aef0d6e7ff Add neuralnetworks to ndkPrebuiltSharedLibs
Bug: 138207382
Test: make
Change-Id: Id0b334011446546963a2f1258d8a3b6999e4f96f
2019-07-26 08:57:54 +00:00
Paul Duffin c6fa3eca11 Merge "Correct tags on StaticSharedLibraryProperties.Cflags" 2019-07-26 08:46:13 +00:00
Peter Collingbourne b0e6143b9b Specify the API level via the triple instead of __ANDROID_API__.
Clang derives the value of __ANDROID_API__ from the triple these days. In a
future version of clang I plan to start making the behaviour of the HWASAN pass
dependent on the API level in the triple, so it's going to need to be accurate.

Test: walleye-userdebug boots
Change-Id: Ie5e36b5c8f6dcda084cc12b1160abbdf94765174
2019-07-25 17:18:22 -07:00
Alex Light dd76f920cf Merge "Disable linux_bionic fuzzers"
am: 71568c7cef

Change-Id: I426c9882a97cea7fc031e5dd9d0de92cbf3c7aa7
2019-07-25 16:34:26 -07:00
Paul Duffin 5213e2b431 Correct tags on StaticSharedLibraryProperties.Cflags
Remove path as cflags are not paths.

Test: m nothing
Change-Id: Ia3f3064cb6642a67e8320ab3c472af2ad5863b52
2019-07-25 12:22:47 +01:00
Alex Light 71123ec1bc Disable linux_bionic fuzzers
fuzzers require linking to libclang_rt which does not support
linux_bionic. Therefore always disable this target.

Test: ./art/tools/build_linux_bionic_tests.sh
Bug: 138307504
Bug: 118058804
Change-Id: I12816f302d32d5ee846f90c62814744ae35c49bb
2019-07-24 21:13:05 +00:00
Dan Albert 2da19cbc20 Link libc++demangle with libc++ for the device.
libc++demangle provides __cxa_demangle, which used to be a part of
libc++.so but is being moved out to save on resources since very few
libraries need it.

Test: make checkbuild
Bug: http://b/138245375
Change-Id: Ie97225d496d7d40f8749522bf36702a2d9dcdfe7
2019-07-24 12:17:40 -07:00
Przemyslaw Szczepaniak 91655856da Merge "Do not install LLNDK libs moved APEX on /system"
am: 1ab2b7b8c5

Change-Id: Ic161398aadf2b2ac3c0f015803be70f7c7e0c75a
2019-07-24 02:25:46 -07:00
Przemyslaw Szczepaniak 1ab2b7b8c5 Merge "Do not install LLNDK libs moved APEX on /system" 2019-07-24 09:12:18 +00:00
Roland Levillain e41bbbf94c Merge "Fix some typos in Soong."
am: 5260acef69

Change-Id: I61050b05bf4831ca753e4a70efb5e184c379232b
2019-07-23 12:58:15 -07:00
Roland Levillain dfe75b389c Fix some typos in Soong.
Test: m
Change-Id: I5b332ce12d70f13eca93b23060620c0ea4f46db7
2019-07-23 17:29:57 +01:00
Dan Albert 233d006ef7 Merge "Remove asanLibs."
am: 6303423549

Change-Id: I4c5bc78924613aa6c61399400f468f7ff7353a53
2019-07-22 11:29:26 -07:00
Dan Albert 6303423549 Merge "Remove asanLibs." 2019-07-22 18:05:10 +00:00
Przemyslaw Szczepaniak e6fc507234 Do not install LLNDK libs moved APEX on /system
Export LLNDK_MOVED_TO_APEX_LIBRARIES which is used by make
to filter out LLNDK libs that been migrated to an APEX.
It's used by the ld.config.txt generaton, and to filter out
the vndk_package dependencies.

Test: Build&flashed crosshatch image
Bug: 137320025
Change-Id: I1449dad79edf36a628fa1ac15c35f163dbd8ee2a
2019-07-22 13:29:20 +01:00
Roland Levillain 581656c377 Merge "Handle `test_per_src` test variations as dependencies of APEX modules."
am: 525d8dec66

Change-Id: I22330fc27969c39343a380cf233bdbad3aebd2ad
2019-07-22 02:49:11 -07:00
Roland Levillain b367e0dfe9 Merge "Create an extra variation in `test_per_src` mutator collecting all outputs."
am: 0934737003

Change-Id: I2e60ad08f540702b350e6a2208e5e7d99ba85f7d
2019-07-22 02:48:47 -07:00
Roland Levillain 525d8dec66 Merge "Handle `test_per_src` test variations as dependencies of APEX modules." 2019-07-22 09:38:53 +00:00
Roland Levillain 0934737003 Merge "Create an extra variation in `test_per_src` mutator collecting all outputs." 2019-07-22 09:37:31 +00:00
Dan Albert 55a18ba71a Remove asanLibs.
We already link the shared prebuilt from the toolchain. This is
redundant and the wrong version.

Test: make checkbuild
Bug: http://b/74067984
Change-Id: I4b5d23514158eebfb4eea2aa6761e076131c3224
2019-07-19 12:53:27 -07:00
Paul Duffin 318c4dc2c9 Merge "Add header_libs to cc_object"
am: 60c0cd9a5f

Change-Id: I089f2b22d87021ad066d67fcc7e0f23d923a388a
2019-07-19 11:34:40 -07:00
Paul Duffin 60c0cd9a5f Merge "Add header_libs to cc_object" 2019-07-19 18:13:44 +00:00
Roland Levillain 9b5fde9ca4 Handle `test_per_src` test variations as dependencies of APEX modules.
If a test module with a `test_per_src` property set to `true` is
included in an APEX module, add all the variants for mutator
`test_per_src` as dependencies of the APEX module (not just the
first one).

This is done by adding variation "" of mutator `test_per_src` when
adding a test dependency to an APEX module, which creates an indirect
dependency of the APEX module on all the `test_per_src` variants of
the test module. When generating outputs for the APEX bundle, fetch
and include the set of test outputs from the "" variant.

Test: m (`apex/apex_test.go` amended)
Bug: 129534335
Change-Id: I1c99855971a8a9b2fc5b964a420e882b6791d4e6
2019-07-19 14:15:06 +01:00
Roland Levillain f2fad97158 Create an extra variation in `test_per_src` mutator collecting all outputs.
Have `cc.testPerSrcMutator` create an additional variation named "",
having no sources (and generating no output file), but depending on
all other `test_per_src` variations and collecting their output files
in a new field named `cc.Module.testPerSrcOutputFiles`. This is useful
in the case where a module depends on all the `test_per_src`
variations of a test module.

Test: m
Bug: 129534335
Change-Id: I905decc0b9417f47cee9113466677d3bb61ad7b6
2019-07-19 14:15:06 +01:00
Jiyong Park f35b561d95 filegroup.path is used to specify the include path for aidl files
am: 2907459e43

Change-Id: Ibf604d664111401d4bcca20db20c754c6845f05a
2019-07-19 04:51:18 -07:00
Colin Cross 0ba21628ab Disable cc_fuzz darwin host modules
am: eec9b286b0

Change-Id: I38e44d1a557c59ed4ab7bf812979e94a3b37b56a
2019-07-19 04:50:50 -07:00
Treehugger Robot b1469d53e7 Merge changes from topic "docs_circular_dep"
* changes:
  aidl include paths are exported to droiddoc
  filegroup.path is used to specify the include path for aidl files
2019-07-19 11:28:16 +00:00
Jiyong Park 2907459e43 filegroup.path is used to specify the include path for aidl files
filegroup {
    name: "foo",
    srcs: ["srcs/aidl/com/android/**/*.aidl"],
    path: "srcs/aidl",
}

cc_library { // or java_library, etc.
    name: "bar",
    srcs: [":foo"],
}

automatically adds "-Ipath/to/foo/srcs/aidl" when compiling the aidl
files from foo for bar. This allows us to omit aidl include path
when using sources in other places via file group.

Bug: 135922046
Test: m (unit tests added)
Change-Id: I9b42f316f2858fb6da72c2f58a314f391416e809
2019-07-19 11:31:31 +09:00
Colin Cross eec9b286b0 Disable cc_fuzz darwin host modules
The fuzzer runtime is not present for darwin host modules, disable
cc_fuzz modules when targeting darwin.

Test: m on darwin
Change-Id: I9da319e00e36c3e0a5912329de7890a6409f1a55
2019-07-18 16:23:45 -07:00
Mitch Phillips d47d87d7d0 Merge "Add the cc_fuzz target."
am: 178f8fb732

Change-Id: I4a1a2f68054dde52442798f9fa08e04536a02cc7
2019-07-18 14:07:12 -07:00
Treehugger Robot 178f8fb732 Merge "Add the cc_fuzz target." 2019-07-18 20:38:33 +00:00
Christopher Ferris 6373d0fd39 Merge "Add liblog as shared dependency for isolated tests."
am: cc9a246063

Change-Id: Ib2d2dd62c148ba08e2c64d21b53a8f489b5a8e59
2019-07-18 12:21:18 -07:00
Christopher Ferris cc9a246063 Merge "Add liblog as shared dependency for isolated tests." 2019-07-18 19:00:46 +00:00
Paul Duffin a37832a3c3 Add header_libs to cc_object
Needed to allow removal of the include_dirs property from the
asm_defines.s module. Also, adds ObjectLinkerProperties to cc_defaults
so that default settings of header_libs are correctly prepended to the
properties in cc_object.

Bug: 35624006
Test: m cpp-define-generator-asm-support - compare output before and after change
Change-Id: Ib95d79c5eba4a89b7ab04b6c62090b720ec7e9fe
2019-07-18 15:58:58 +01:00
Jeff Vander Stoep 8b2bd15423 Renderscript: rename .rs extension to .rscript
Reserve .rs extension for Rust.

Bug: 137365032
Test: make checkbuild
Test: cd frameworks/compile/slang/tests
    ./slang_tests.py
    Test: atest CtsRenderscriptTestCases
    Test: CtsRsCppTestCases

Exempt-From-Owner-Approval: Clean CP
Change-Id: I0458009b8bb64a012fece364835d5b78d52e15e9
Merged-In: I0458009b8bb64a012fece364835d5b78d52e15e9
(cherry picked from commit 41ce1c0d82)
(cherry picked from commit a50b16974a)
2019-07-18 04:02:38 +00:00
Jeffrey Vander Stoep 38aaf75e44 Merge "Renderscript: rename .rs extension to .rscript" 2019-07-18 02:02:00 +00:00
Christopher Ferris 34cbba6e16 Add liblog as shared dependency for isolated tests.
If liblog is a static library, then unit tests cannot properly
override log functions.

Test: Build isolated tests and run them.
Change-Id: Id202c5950518408ce66ceea70988dde8080fd1f9
2019-07-17 15:46:29 -07:00
Jeff Vander Stoep d612627169 Renderscript: rename .rs extension to .rscript
Reserve .rs extension for Rust.

Bug: 137365032
Test: make checkbuild
Test: cd frameworks/compile/slang/tests
    ./slang_tests.py
    Test: atest CtsRenderscriptTestCases
    Test: CtsRsCppTestCases

Change-Id: I0458009b8bb64a012fece364835d5b78d52e15e9
Merged-In: I0458009b8bb64a012fece364835d5b78d52e15e9
2019-07-17 18:57:32 +00:00
Colin Cross 9dbe4eea79 Merge changes from topic "buildnumberfromfile"
am: 223e6a65b6

Change-Id: I4e2f0514434ddf6833d03334dbf36869d762214e
2019-07-16 19:59:12 -07:00
Colin Cross 223e6a65b6 Merge changes from topic "buildnumberfromfile"
* changes:
  Allow jar wrapper to take quoted arguments
  Add rspfile support to RuleBuilder
  Prepare droiddoc for using RuleBuilder
  Manually escape BuildNumberFromFile
  Fix android.Expand and ninja escaping
  Add RuleBuilder helper functions for built and prebuilt tools
  Add documentation to droiddoc.go module types
2019-07-17 02:45:03 +00:00
Peter Collingbourne d0ae5425be Merge "Use LLD for partialLd."
am: 2e16e2d9e1

Change-Id: I1492850ecfaa0f3bd42ca6b4308fc13f31d3e939
2019-07-16 18:18:23 -07:00
Mitch Phillips da9a463794 Add the cc_fuzz target.
Adds the cc_fuzz target via a cc_fuzz module. Also implements the
libclang runtime interface for the x86 toolchain to allow host-built
fuzzers.

Bug: 133261679
Bug: 137398545

Test: Build a fuzzer (with all topic patches), notice that you now
have a host-built fuzzer :)

Change-Id: I7fa069603415f40b3f12a002c253fca6e2aa1988
2019-07-16 16:30:53 -07:00
Peter Collingbourne 84d8385ae1 Use LLD for partialLd.
Clang will soon start using relocations that are currently unsupported by
the version of ld.bfd that Android uses when HWASAN is enabled. This will
cause partialLd to fail since the clang driver defaults to ld.bfd.

Switch to using LLD, since it will support those relocations.

Change-Id: I0964f53dc63773f3b52bb377f863df9c39961a07
2019-07-16 14:14:36 -07:00
Colin Cross 5822b552ef Manually escape BuildNumberFromFile
Change ctx.Config().BuildNumberFromFile() to be unescaped, and then
escape it manually where necessary.  This will allow passing
ctx.Config().BuildNumberFromFile() to RuleBuilder, which will handle
the necessary escaping.

Test: no change to out/soong/build.ninja
Change-Id: I5329ab2ba70ccea49958864488aa81794a7e4b56
2019-07-16 10:23:41 -07:00
Dimitry Ivanov 1866802e07 Merge "Make relative path for native_bridge binaries configurable"
am: 2ca7a8835e

Change-Id: I2cc8f8145c6464cf0ab91a602a5861ffc5a24505
2019-07-16 02:43:41 -07:00
Dimitry Ivanov 2ca7a8835e Merge "Make relative path for native_bridge binaries configurable" 2019-07-16 09:17:35 +00:00
dimitry 8d6dde8831 Make relative path for native_bridge binaries configurable
This change introduces NativeBridgeRelativePath and
NativeBridgeSecondaryRelativePath product variables to
make relative path to native_bridge binaries configurable.

It also removes moves information about native bridge
host architecture to Target and sets it during decodeTargetProductVariables

Test: make PRODUCT-cf_x86_phone-userdebug dist
Change-Id: Ie736e81eae507e1775566ce9f29135011b12af27
2019-07-15 20:04:07 +02:00
Elliott Hughes 0a4996eae5 Merge "Stop defining unused USE_SSSE3."
am: b940a1499b

Change-Id: I1ffdadb67b35ef899db10b49253f2c93073527c7
2019-07-13 10:23:29 -07:00
Treehugger Robot b940a1499b Merge "Stop defining unused USE_SSSE3." 2019-07-13 16:59:49 +00:00
Elliott Hughes b22dcfe05c Stop defining unused USE_SSSE3.
This copy & paste has even made it into the fuchsia configuration...

Test: builds
Change-Id: If22615fdf04448c058db014d93155e6264fb3eb2
2019-07-12 22:40:45 -07:00
Mitch Phillips 88cddcf297 Merge "Re-enable ASAN globals instrumentation for devices."
am: 68c9eed6b2

Change-Id: I8a29cd64cd1c9a60adcc1bc8858163a1589cc20e
2019-07-12 13:20:19 -07:00
Stephen Hines 66c8b446aa Add support for AUTO_*_INITIALIZE to build/soong.
Bug: http://b/131390872
Test: Builds with/without AUTO_ZERO_INITIALIZE set.
Test: Builds with/without AUTO_PATTERN_INITIALIZE set.

Change-Id: If085ec53c619e2cebc86ca23f7039298160d99ae
2019-07-12 02:22:10 -07:00
Mitch Phillips cba311bcfc Re-enable ASAN globals instrumentation for devices.
ASan globals instrumentation apparently broke the build in the pass.
This is now a customer feature to get this up and running, let's see if
it works.

Bug: 137312732

Test: Build the platform, deploy and run an asan-ified test (maybe
resolv_integration_test?).

Change-Id: Ic4ee0db617c290d8a3fec52db4b90bc4772696b8
2019-07-11 17:16:58 -07:00
Colin Cross ee94d6ab14 Add RuleBuilder helper functions for built and prebuilt tools
Replace the common pattern of:
cmd.Tool(ctx.Config().HostToolPath(ctx, "tool"))
with:
cmd.BuiltTool("tool")

And similarly for PrebuiltBuildTool.

Test: m checkbuild
Change-Id: I7d63188505362c7df6a3b3e7330b4a2cca5a2409
2019-07-11 13:05:19 -07:00
Jiyong Park 6374a89990 Merge "Use ctx.Target().NativeBridge to detect if the arch is translated or not"
am: f378a85523

Change-Id: I1d2fb8391f9339e0f27dce606b67ca0c192c8e5e
2019-07-10 18:24:05 -07:00
Jiyong Park acbf6c76c6 Use ctx.Target().NativeBridge to detect if the arch is translated or not
Bug: 137015854
Test: m
Test: build cf_x86_phone and ensure there is no dangling symlink
/system/lib/arm/libm.so

Change-Id: I0f5efdb9e1f5e4e213ca4ebaa28ace0a130b36a6
2019-07-10 18:07:38 +09:00
Pirama Arumuga Nainar ce09846256 Merge changes from topic "gcov-prefix-permissions-fix"
am: bc53fefd6a

Change-Id: I9c4a91abd6e114abedbfb6e0916678cab2da2d6c
2019-07-09 08:57:21 -07:00
Pirama Arumuga Nainar e3493d33a7 Refactor libprofile-extras to be added as a whole static library
am: 82fe59b656

Change-Id: Idfa4b3fdbf4f7ffa461652464c557aa5dc44e523
2019-07-09 08:57:15 -07:00
Pirama Arumuga Nainar bc53fefd6a Merge changes from topic "gcov-prefix-permissions-fix"
* changes:
  Wrap getenv when linking a coverage-enabled binary
  Refactor libprofile-extras to be added as a whole static library
2019-07-09 15:32:48 +00:00
Inseob Kim f23a2bfa6f Merge "[trivial] Remove dead code"
am: fccc52f46b

Change-Id: Ieac00d1f29b5077836e68748f2e2e41df17315ec
2019-07-08 17:27:49 -07:00
Inseob Kim 0ce291ebee [trivial] Remove dead code
Bug: N/A
Test: m
Change-Id: Ia278008249f5fc1cf5fd7d29e55e2e54f1d6f3ca
2019-07-04 14:39:22 +09:00
Pirama Arumuga Nainar 100bbdc8f3 Wrap getenv when linking a coverage-enabled binary
The wrapper to getenv() appends the effective userid (euid) of the
current process to GCOV_PREFIX.  This avoids conflicts and permissions
issues when multiple processes try to create/access the same directories
and files under /data/misc/trace.

Test: Verify that coverage files are written to
/data/misc/trace/<euid>/proc/... instead of /data/misc/trace/proc/...

Change-Id: If58081a12b2b9bc40cfcbf64c99beafe198d07af
2019-07-03 15:28:54 -07:00
Pirama Arumuga Nainar 82fe59b656 Refactor libprofile-extras to be added as a whole static library
Bug: http://b/134177005
Bug: http://b/116873221

Previously, the libprofile-extras dependency was added as a
LateStaticLib and the constructor in this library was included during
linking with the '-uinit_profile_extras' linker flag.  This was done
because at the deps() stage, the exact binaries that need coverage are
not known (in fact the coverage-enabled variants are not created yet).

This meant that for a link command, if one of the shared libraries
already exported the constructor, the output of the link command did not
load/link libprofile-extras.

For other reasons, we now want to add more symbols to this library that
need to be linked into all libraries and executables.  To accomplish
that, refactor the dependency handling so libprofile-extras can be added
as a 'WholeStaticLib'.

This is done by creating a new dependency type (with a coverageDepTag
dependency tag) to add libprofile-extras as a dependency for all modules
that can potentially link with coverage.  During the flags() call, this
dependency is moved as a WholeStaticLib dependency iff coverage is
enabled in this link step.

There are a few NFC changes as well:
- deps() takes a DepsContext parameter.
- flags() has an extra PathDeps parameter and return value.
- add useSdk() helper to cc.Module.

Test: Build with coverage and check that we can generate coverage using
SIGUSR1 and the debug.coverage.flush sysprop.

Change-Id: I7e7d8201956a150febbda5bb1794f8ece016db8b
2019-07-03 15:28:50 -07:00
jaishank 3cb1f6a532 Merge "Disabled avx avx2 avx512 compiler flags by default. Library components can enable the flags based on performance impact" am: dd5cf7574b
am: 1b4699a2cf

Change-Id: I553cab57535513558e3d976e0d3e5c6a4532a02b
2019-06-28 14:28:05 -07:00
Colin Cross d3c8c1ed26 Merge "Treat .cxx files as c++" am: 35bb770e0e
am: 6598f20be5

Change-Id: Ib62c7134007c7e7ed9d838a377261c9b3d169213
2019-06-28 14:27:47 -07:00
Treehugger Robot dd5cf7574b Merge "Disabled avx avx2 avx512 compiler flags by default. Library components can enable the flags based on performance impact" 2019-06-28 21:14:33 +00:00
Colin Cross d34ab7c6b2 Treat .cxx files as c++
Fixes: 135749365
Fixes: 135667566
Test: m checkbuild
Change-Id: If47274812dfe781ebbb9f8a60a395650573727d5
2019-06-27 14:46:10 -07:00
jaishank 7e84969f96 Disabled avx avx2 avx512 compiler flags by default.
Library components can enable the flags based on
performance impact

Test: run-test gtest
Change-Id: I41c4464cffd2b0e830d4ab1c5a25b378e2a25129
Signed-off-by: jaishank <jaishankar.rajendran@intel.com>
2019-06-27 10:36:23 +05:30
Hsin-Yi Chen 01cc4601fb Merge "Generate ABI dumps for libraries without source" am: 30057808e1
am: 1ee24e40dd

Change-Id: I8fc879a871e43f276b9e9fa4d6ce25be38063dd6
2019-06-26 19:42:08 -07:00
Hsin-Yi Chen 30057808e1 Merge "Generate ABI dumps for libraries without source" 2019-06-27 02:08:34 +00:00
Dan Willemsen 079e8ac9bf Merge "Use prebuilt m4 for bison too" am: 02f6880c27
am: 257400347a

Change-Id: I3ddd5f905685fbf6b1a102bb800e854c0a304291
2019-06-25 22:20:02 -07:00
Dan Willemsen c4a6aa83e8 Use prebuilt m4 for bison too
Bison is currently looking for m4 directly in `/usr/bin/m4`, instead of
through $PATH, so it hadn't been tracked via the $PATH interposer
checks. But if you don't install m4 at all, it starts failing.

Bug: 117561006
Bug: 130111713
Test: Run on a machine without m4, build passes
Change-Id: I3fbad64127c183de79c17511e979fd5df946eb80
2019-06-25 16:12:12 -07:00
Hsin-Yi Chen f6a95467e2 Generate ABI dumps for libraries without source
This commit enables ABI diff for libraries without source.
Stub libraries are excluded.

Test: ./create_reference_dumps.py -products aosp_arm64
Test: make
Bug: 135728451
Change-Id: Idbe276db6f5e057175fc098f0226cb38996faa17
2019-06-25 15:06:13 +08:00
Colin Cross e0318dec1b Merge changes Ia77090da,I95a57f76 am: e264f22bec
am: 0240f5cea1

Change-Id: I61e3e45e533cb62c548fcd09b2bf5eb3890e0a38
2019-06-21 10:51:45 -07:00
Colin Cross e264f22bec Merge changes Ia77090da,I95a57f76
* changes:
  Fix data races in finder_test.go
  Optimize sanitizerRuntimeDepsMutator
2019-06-21 17:01:23 +00:00
Mitch Phillips a87c8005b4 Merge "Remove experimental pass manager for fuzzer builds." am: c4be0815d8
am: 07c9775cef

Change-Id: I333316ff6041b6139b86bed5469885b42b6be96d
2019-06-20 18:17:19 -07:00
Treehugger Robot c4be0815d8 Merge "Remove experimental pass manager for fuzzer builds." 2019-06-21 00:51:26 +00:00
Dan Willemsen 9178a6ccb7 Merge "Use prebuilt m4 instead of system m4" am: d9cf7fc48e
am: 809fb63cc1

Change-Id: Icfc74137bafb6333538553d9bde9dc6f8e57a42d
2019-06-20 16:18:02 -07:00
Colin Cross 0b90833ea8 Optimize sanitizerRuntimeDepsMutator
sanitizerRuntimeDepsMutator only modifies the currently visited
module, it can visit modules in parallel.

Also, stop recursing into modules that are not static dependencies,
and stop recursing if the module already has all modifications that
the mutator could make.

Test: m checkbuild
Change-Id: I95a57f763a91940f1854ba3c587a2f70e8baba97
2019-06-20 15:23:41 -07:00
Dan Willemsen c69d715d72 Use prebuilt m4 instead of system m4
Bug: 117561006
Test: treehugger
Change-Id: I588d867d95cc52963ce764018a9c09b26973c8c3
2019-06-19 12:50:32 -07:00
Nick Desaulniers 8414bef84d Merge "Switch to clang-r353983d" am: 2deb017c04
am: f1b45a21a4

Change-Id: If3444510dbf9767c5c825a5414f0046f5c272449
2019-06-17 10:40:40 -07:00
Mitch Phillips 74384758a6 Remove experimental pass manager for fuzzer builds.
Sanitizer coverage is currently broken with the experimental pass
manager. See b/133876586 for more information. The patch is currently
being worked on upstream (https://reviews.llvm.org/D62888), but is not
ready yet. Hence, we disable it here (similar to the LTO bug).

Bug: 133876586
Test: Build anything with SANITIZE_TARGET='fuzzer', verify that it has
'sancov' symbols.

Change-Id: I4302a8cf05300015aaff137f40b61d5685dc3fea
2019-06-17 10:33:52 -07:00
Nick Desaulniers 2deb017c04 Merge "Switch to clang-r353983d" 2019-06-17 16:25:51 +00:00
Inseob Kim bd4435b2e0 Merge "sysprop_library: Rename system scope to public" am: b1856799b1
am: 653ac78cbc

Change-Id: I0938fb362e86739b9c7d870bcb514118dd8b23ea
2019-06-15 23:22:47 -07:00
Treehugger Robot b1856799b1 Merge "sysprop_library: Rename system scope to public" 2019-06-16 06:08:14 +00:00
Evgenii Stepanov d7344ad0ca Disable new LLVM pass manager for HWASan. am: 1c69e83030
am: b85d386af5

Change-Id: I443bdbf313216591841272cbe51491fd6bd51fbd
2019-06-15 14:13:04 -07:00
Evgenii Stepanov 1c69e83030 Disable new LLVM pass manager for HWASan.
Current Android toolchain does not support hwasan with new pm.

Bug: 135298400
Test: manual, inspect the binaries for calls to __hwasan_init
Change-Id: I126c59e6ecabc3a1699e1bf34c546568b6e8a21f
2019-06-14 18:39:59 -07:00
Nick Desaulniers 36a39c9852 Switch to clang-r353983d
Test: build+boot sargo, TreeHugger
Bug: 131714073
Change-Id: Ieec2500027a78b80147f86b2bdaeaedaa1c18360
2019-06-14 16:31:34 -07:00
Dan Shi a2e7deb129 Merge "Support require_root in auto-gen test configs" am: 9314e1124b
am: c22778c363

Change-Id: Ie9c3248937ccce23a55a99d29e65a2e88aabd4d2
2019-06-14 15:45:20 -07:00
Dan Shi 9314e1124b Merge "Support require_root in auto-gen test configs" 2019-06-14 22:21:39 +00:00
Pirama Arumuga Nainar fcd0182d26 Merge "Remove redundant -fexperimental-new-pass-manager" am: 50b382a9e3
am: bd6e734a8a

Change-Id: I01fa59cb0df22850d1d55dd7752bae936dd43acd
2019-06-14 14:41:06 -07:00
Pirama Arumuga Nainar 50b382a9e3 Merge "Remove redundant -fexperimental-new-pass-manager" 2019-06-14 21:02:45 +00:00
Dan Shi 37ee3b8f49 Support require_root in auto-gen test configs
require_root is added to allow auto-generated test config to include
RootTargetPreparer so the test runs with root permission.

Bug: 134509111
Test: add "require_root: true" to init_benchmarks and libpower_test
  build the modules, confirm the extra target preparer is added in the
  test configs.

Change-Id: Ia07503e338935d6aa92560e7cf7b18d2a4c51243
2019-06-14 11:10:13 -07:00
Pirama Arumuga Nainar 3a25405acc Remove redundant -fexperimental-new-pass-manager
This is now turned on by default (cc/config/clang.go).

Test: N/A
Change-Id: I61bcf2049448b4200ca303ebcad555cc24a43c18
2019-06-14 09:54:23 -07:00
Dan Willemsen ebb0478869 Merge changes If25be604,I0a310229,I44155630 am: 42d33779cd
am: f32716e448

Change-Id: I08a9a38e59896cbec930d6087f96eaa9b327d4cc
2019-06-14 01:29:49 -07:00
Treehugger Robot 42d33779cd Merge changes If25be604,I0a310229,I44155630
* changes:
  Add another jar used by kotlinc
  Actually depend on the headers from renderscript
  Fix a few missing dependencies in APEX building
2019-06-13 17:40:01 +00:00
Yi Kong 6731da7fe2 Merge "Move darwin to llvm-ar" am: 4821597065
am: 5c54831a17

Change-Id: Ib8e327b77ec1702de52d3faa1c5920c74630ba16
2019-06-12 23:20:20 -07:00
Dan Willemsen b085b9b907 Actually depend on the headers from renderscript
Instead of having all the object compilations depend on a stamp file,
instead depend on the headers, which are already available in the build
graph.

This allows my RBE builds to just find the headers, instead of having to
walk the graph to find the other outputs.

Test: treehugger
Test: build a system image with RBE
Change-Id: I0a310229be26d7bd399e074a4350d5be038f8661
2019-06-13 05:21:37 +00:00
Yi Kong 823532df31 Move darwin to llvm-ar
Test: build
Bug: 71618641
Change-Id: Ib45963bc9e295afe39752a270f7b5a1197335c69
2019-06-12 19:16:25 -07:00
Colin Cross 31de2eaf51 Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ... am: 72ea641dff
am: 98a6f300fa

Change-Id: I84683c2204afb5792ec11e2c608dca288e9431ec
2019-06-12 13:52:07 -07:00
Dan Willemsen 3fea9cbe7f Merge "Convert cc aidl to rule builder" am: 733728b42c
am: b29f7672a1

Change-Id: I2c1e300e268467d1b91b4aa93ac3754d890bfcd0
2019-06-12 13:50:02 -07:00
Colin Cross 72ea641dff Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ...
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Add test for missing defaults modules with AllowMissingDependencies
  Capture missing dependency error rules
  Share buildDir for android/soong/android tests
  Reimplement AddMissingDependencies
  Add GenerateAndroidBuildActions to DefaultsModuleBase
2019-06-12 20:19:55 +00:00
Dan Willemsen 733728b42c Merge "Convert cc aidl to rule builder" 2019-06-12 20:08:46 +00:00
Jiyong Park 4852239e35 Merge "Let genrule be mutatable by the apex mutator" am: 7b8afc798a
am: 8e5d79cc67

Change-Id: I674e8eedc63b632e1c775b9f06deeb4388b893ae
2019-06-12 11:57:55 -07:00
Treehugger Robot 7b8afc798a Merge "Let genrule be mutatable by the apex mutator" 2019-06-12 18:39:28 +00:00
Jiyong Park fc752ca1ac Let genrule be mutatable by the apex mutator
genrule modules were not mutated by the apex mutator. As a result, a
module that is mutated for an apex have depended on the genrule modules
host_bionic_linker_{asm|flags} that are not mutated for the APEX.

This in turn caused an inconsistency problem because the
host_bionic_linker_* genrules use the dynamic linker that isn't mutated
for APEX as an input, while the outputs of the genrules are used by
modules mutated for APEX. The inconsistency caused b/135008828.

Fixing this issue by correctly let genrule to be mutated by the apex
mutator.

Bug: 135008828
Test: checkout master-art-host
ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist
./art/tools/dist_linux_bionic.sh -j50 showcommands
com.android.runtime.host
is passing

Change-Id: I92d90400c61d3951f6202d932832d0cb63c95a7d
2019-06-12 13:28:11 +09:00
Oliver Nguyen f3906b64f6 Merge "Package coverage files as a zip." am: 7268fd494d
am: 85cefe661b

Change-Id: I9937d797b9447e921c56dbf8c3b01c05f0514648
2019-06-11 19:28:00 -07:00
Treehugger Robot 7268fd494d Merge "Package coverage files as a zip." 2019-06-12 02:00:01 +00:00
Oliver Nguyen c743414d42 Package coverage files as a zip.
Test: make NATIVE_COVERAGE=true COVERAGE_PATHS="*"
Change-Id: I955212a20ea19c854ebc88635252a1d174ea8f7f
2019-06-11 16:04:11 -07:00
Inseob Kim 5cefbd289d sysprop_library: Rename system scope to public
In the first design, public sysprops have been accessible from Java
modules linking against SDK. But SDK modules shouldn't do, because
sysprop_library isn't for the apps. This renames system to public, so
that only public(System till now) and internal scopes remain from now.

Bug: 131637873
Test: m && sysprop_test
Change-Id: I548007d4a6018922f98d3d13915cee1d66070086
2019-06-11 23:31:32 +09:00
Roland Levillain bcb2d44966 Merge "Have `symlink_preferred_arch: true` honor the `stem` property." am: d7607c1c99
am: 299abf19c3

Change-Id: If982b553818062f476298027f0ae19b9e6699a06
2019-06-11 07:01:03 -07:00
Roland Levillain d7607c1c99 Merge "Have `symlink_preferred_arch: true` honor the `stem` property." 2019-06-11 13:45:25 +00:00
Inseob Kim 434e298b5d Merge "Separate exported includes out of flags" am: b879fb6b4b
am: 6011640688

Change-Id: I2128da11b37b5a378cfb64039968cd9695a34ec3
2019-06-10 22:12:21 -07:00
Treehugger Robot b879fb6b4b Merge "Separate exported includes out of flags" 2019-06-11 04:57:47 +00:00
Dan Willemsen f8bd602f3f Merge "Add dependency to version script when linking stub libraries" am: d1fcc4a93d
am: 2cb02169d4

Change-Id: Icb497c8eb70c22bc5ff8c4b402d2277756c5078c
2019-06-10 21:16:11 -07:00
Treehugger Robot d1fcc4a93d Merge "Add dependency to version script when linking stub libraries" 2019-06-11 03:59:42 +00:00
Josh Gao 8563a453d6 Merge "Revert "Revert "Revert "Revert "Enable lld for windows""""" am: a1738e2c00
am: 1697e781bb

Change-Id: I6ceaffde7b71606ca5a6d086502fcc6e52e24266
2019-06-10 19:00:22 -07:00
Inseob Kim 7c8b645347 Merge "Fix sysprop_library build err when using filegroup" am: 4b0cc8c3c5
am: 6364f4732a

Change-Id: Ibb1c9b593efe79d6de25ee828bfde9510fc8f9cb
2019-06-10 18:49:19 -07:00
Josh Gao a1738e2c00 Merge "Revert "Revert "Revert "Revert "Enable lld for windows""""" 2019-06-11 01:43:42 +00:00
Inseob Kim 6937844c29 Separate exported includes out of flags
Exported includes have been maintained along with other C/C++ flags.
This makes dependencies unclear, and users have had to parse flags to
get exported directories. This separates exported includes and
exported flags, thus making data more structured and explicit.

Bug: 132818174
Test: m
Change-Id: I5c25ac2224988c4a67e4db6fd6e4d39090b74041
2019-06-11 10:37:56 +09:00
Treehugger Robot 4b0cc8c3c5 Merge "Fix sysprop_library build err when using filegroup" 2019-06-11 01:21:44 +00:00
Dan Willemsen 939408aa22 Add dependency to version script when linking stub libraries
This isn't an effective issue with local builds currently, since the
version script is generated from the same rule as the sources used to
compile the objects that are also used in the link command. But if we
ever separated those paths or adopted restat, we could miss this
dependency.

This is also required for my RBE build to actually expose this file to
the link step.

Test: treehugger
Change-Id: I32bbb18cf7edddc88759d4f445d081868f3e9b44
2019-06-10 18:02:25 -07:00
Colin Cross 59037628f4 Add GenerateAndroidBuildActions to DefaultsModuleBase
Add an empty GenerateAndroidBuildActiosn to DefaultsModuleBase
so that every defaults module doesn't need to provide one.  This
will also allow adding an implementation in the next patch.

Test: m checkbuild
Change-Id: I13554bdb3a287c2f18e1efab74d4f08a1ba8620c
2019-06-10 13:51:17 -07:00
Josh Gao 75a50a2c15 Revert "Revert "Revert "Revert "Enable lld for windows""""
This reverts commit b20200b3f5.

Bug: http://b/110800681
Test: manual
Change-Id: Id3eb45ed29f3977fef3da241ec2c43755116d60c
2019-06-10 12:59:11 -07:00
Colin Cross 9d5d72f7a6 Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4be
am: 236ac108f5

Change-Id: Ia0777130add15aceb17739f5dcb613ca4e1bf172
2019-06-10 10:00:33 -07:00
Colin Cross a6bf56d4be Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Consolidate baseContext, BaseContext, and BaseModuleContext
  Rename ModuleBase receivers
  Remove repetition in android package names
2019-06-10 16:38:11 +00:00
Inseob Kim da63a49338 Fix sysprop_library build err when using filegroup
.sysprop files are intended to be used only with sysprop_library, and we
can prevent build error by specifying dependencies upon CreateModule.

Bug: 131708148
Test: 1) try building sysprop_library module.
Test: 2) see liblog is correctly linked.
Change-Id: I702cedc255ee0b6a30c15e474dd6a88d9607b145
2019-06-10 14:18:13 +00:00
Roland Levillain 9efb8c773f Have `symlink_preferred_arch: true` honor the `stem` property.
If a module defines a `stem` property, use it to name the symlink
created for `symlink_preferred_arch: true` (instead of the module's
name).

Also always require suffixes when using `symlink_preferred_arch: true`.

Test: m
Change-Id: Ia8a56f94d21599194797ef8b259f5f03e08cb16a
2019-06-10 15:03:44 +01:00
Josh Gao adb1511181 Merge "Revert "Revert "Revert "Enable lld for windows"""" am: 46160c6423
am: 118d99de1e

Change-Id: Id8073e33bd20ab63d4c6bace043ad8387f6d8ddd
2019-06-07 15:55:46 -07:00
Josh Gao b20200b3f5 Revert "Revert "Revert "Enable lld for windows"""
This reverts commit 6d8c0a50bc.

The switchover to lld appears to be making adb crash on exit for unclear
reasons. Revert it as a quick fix pending further investigation.

Bug: http://b/134613180
Test: adb.exe under windbg
Change-Id: Ibdf5981c3c6828b3684974b7c30a7c96449c64c5
2019-06-07 12:34:18 -07:00
Colin Cross 0ea8ba82fc Consolidate baseContext, BaseContext, and BaseModuleContext
blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators).  The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.

Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
2019-06-06 20:01:31 -07:00
Roland Levillain 7b7aaf7e2f Merge "Allow arch-specific `symlink_preferred_arch` properties." am: 42729b481a
am: d0814ca920

Change-Id: If31f5553207a024f447c0b5b232a8490e5a2a81d
2019-06-06 12:25:19 -07:00
Treehugger Robot 42729b481a Merge "Allow arch-specific `symlink_preferred_arch` properties." 2019-06-06 19:10:41 +00:00
Dan Willemsen 1945a4b47d Convert cc aidl to rule builder
This fixes an incremental build issue where we didn't clean up old aidl
header files (or necessarily notice that they were updated).

We do this by declaring the header files as outputs in the build graph,
but this means that the src file name needs to be convertible to the
aidl package name, as that's how the header file paths are created. In
many cases, filegroups can be used to strip path prefixes from the aidl
files.

Bug: 112114177
Test: treehugger
Change-Id: If534ff3dbfac329dea9a7402e30be74495754160
2019-06-06 08:23:53 -07:00
Jaewoong Jung 6a98d5d59b Merge "android_app stl property bug fix" am: 4f67c42d76
am: 58d0f0cf69

Change-Id: Ic14f463f27b8413e0d4960658c41407763d79ba6
2019-06-05 13:47:32 -07:00
Jaewoong Jung 4f67c42d76 Merge "android_app stl property bug fix" 2019-06-05 20:16:13 +00:00
Roland Levillain d9bf9be007 Allow arch-specific `symlink_preferred_arch` properties.
Test: m
Bug: 133864678
Change-Id: Ia6e62156adda2b3a51220552bbe4dab738753674
2019-06-05 19:38:45 +01:00
Colin Cross d6e75e4ef9 Merge "Support tagged module references" am: b4c35f3378
am: a360b2b335

Change-Id: I61cff6302236ed5c67b86682563eaeae9d0e3363
2019-06-05 10:34:40 -07:00
Treehugger Robot b4c35f3378 Merge "Support tagged module references" 2019-06-05 17:17:32 +00:00
Yi Kong 37e223acba Merge "Clean up no_libgcc" am: 4cb61bed13
am: 98c2e16956

Change-Id: Ieda5df559695429ca26fe6fa48b9a4dc12d43302
2019-06-04 19:39:46 -07:00
Yi Kong 4cb61bed13 Merge "Clean up no_libgcc" 2019-06-05 00:58:35 +00:00
Jaewoong Jung 710756a6ff android_app stl property bug fix
When it is set to c++_shared, the added dependency should be
libc++_shared, not libc++.

Fixes: 130891985
Test: app_test.go, atest 'CtsNdkBinderTestCases' w/ conversion CL
Change-Id: I0e50e0d5bf511aa6e52d16cd715a185721011255
2019-06-04 12:36:00 -07:00
Colin Cross 41955e8895 Support tagged module references
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output.  For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files.  Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).

Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
2019-06-04 10:22:51 -07:00
Colin Cross 9cc712aa51 Merge changes I88973671,If5a3b53a am: 2406a123ba
am: 5a927378ea

Change-Id: Ibba9c6d25e075943ffd8d91ee5929a9b591bd25a
2019-06-03 23:30:30 -07:00
Treehugger Robot 2406a123ba Merge changes I88973671,If5a3b53a
* changes:
  Fix nondeterminstic iteration of vndk modules map
  Fix data race and ordering consistency in apex modules
2019-06-04 06:10:00 +00:00
Ryan Prichard 50a38af826 Merge "Omit .gnu_debuglink sections in object files" am: e29e2473d2
am: b78d3c1b70

Change-Id: I8a83acd15739c4ae2bd52bb3b450f09bd4c9f872
2019-06-03 16:35:31 -07:00
Ryan Prichard e29e2473d2 Merge "Omit .gnu_debuglink sections in object files" 2019-06-03 23:15:38 +00:00
Yi Kong e7fe9913d6 Clean up no_libgcc
no_libgcc is no longer needed anywhere. Move all occurances to no_libcrt
and remove no_libgcc.

Test: build
Change-Id: I6dd49db71d05d7685aa90cc837627f65e6742d6d
2019-06-03 15:52:40 -07:00
Colin Cross 4c2c46f0a7 Fix nondeterminstic iteration of vndk modules map
Sort the list of libraries when iterating over the vndk modules
map to avoid a non-deterministic output file.

Test: m nothing && mv out/soong/build.ninja /tmp && m nothing && diff -u out/soong/build.ninja /tmp/build.ninja
Change-Id: I889736715dab491bb7e69f3499ab1a5e2c876171
2019-06-03 15:52:27 -07:00
Ryan Prichard f979d73428 Omit .gnu_debuglink sections in object files
I'm not sure if these sections are used, but by adding them to
libgcc_stripped.a, we can end up with multiple .gnu_debuglink sections in
an executable, where the first two unhelpfully point at "libgcc.a". e.g.:

$ readelf -SW -x.gnu_debuglink out/target/product/walleye/system/bin/bootstrap/linker64
...

Section Headers:
  ...
  [18] .gnu_debuglink    PROGBITS        0000000000000000 10f19c 000020 00      0   0  1
  ...
  [22] .gnu_debuglink    PROGBITS        0000000000000000 18a2c8 000010 00      0   0  4
  ...

Hex dump of section '.gnu_debuglink':
  0x00000000 6c696267 63632e61 00000000 3d5f65d8 libgcc.a....=_e.
  0x00000010 6c696267 63632e61 00000000 3d5f65d8 libgcc.a....=_e.

Hex dump of section '.gnu_debuglink':
  0x00000000 6c696e6b 65723634 00000000 f85db7ea linker64.....]..

Bug: none
Test: m libgcc_stripped linker
Test: no .gnu_debuglink section in libgcc_stripped.a
Test: only one .gnu_debuglink section in system/bin/bootstrap/linker64
Change-Id: I0c47a9acd6d52f5cbc5bfa8b67d072ebb075a242
2019-05-31 15:07:16 -07:00
Dimitry Ivanov 4fb0004f6b Merge "Skip native_bridge modules when installing vndk snapshot" am: 656833e0c8
am: 441c715fe8

Change-Id: Ie8425f616d0393101637ff2d63ba957fa26a49ea
2019-05-31 06:12:32 -07:00
Dimitry Ivanov 656833e0c8 Merge "Skip native_bridge modules when installing vndk snapshot" 2019-05-31 12:51:55 +00:00
Mitch Phillips bfeade6424 Fix fuzzer builds [#2].
- Updates the fuzzer builds to use SANITIZE_TARGET='fuzzer' instead of
'coverage'.
- Removed an old dependency that made fuzzer builds without ASan
an error.
- Fixed up the build flags to allow fuzzers to be built. Previously, the
coverage flags were manually provided. As the toolchain has moved on,
these flags are no longer compatible with libFuzzer, and so I've updated
them to use the correct, compatible flags.
- Added a dependency mutator for fuzzer coverage.

Bug: 121042685
Test: With all patches in the bug merged, build a fuzzer using
'SANITIZE_TARGET=fuzzer mmma <your_fuzzer>'.

Change-Id: Ib6246980f77bc4babe587b1e88038aa12228fa83
Merged-In: Ib6246980f77bc4babe587b1e88038aa12228fa83
2019-05-30 16:49:42 +00:00
Mitch Phillips 5a6ea6cf3b Fix fuzzer builds [#2].
- Updates the fuzzer builds to use SANITIZE_TARGET='fuzzer' instead of
'coverage'.
- Removed an old dependency that made fuzzer builds without ASan
an error.
- Fixed up the build flags to allow fuzzers to be built. Previously, the
coverage flags were manually provided. As the toolchain has moved on,
these flags are no longer compatible with libFuzzer, and so I've updated
them to use the correct, compatible flags.
- Added a dependency mutator for fuzzer coverage.

Bug: 121042685
Test: With all patches in the bug merged, build a fuzzer using
'SANITIZE_TARGET=fuzzer mmma <your_fuzzer>'.

This is the qt-dev-plus-aosp cherrypick of aosp/954925. See the AOSP
commit for further information.

Change-Id: Ib6246980f77bc4babe587b1e88038aa12228fa83
2019-05-28 15:46:11 -07:00
Jooyung Han 519f9f337e Merge "exports LOCAL_SOONG_VNDK_VERSION for VNDK libs" am: 75fcf98038
am: e1d405b385

Change-Id: Ib30ccf47efd65401e2f59d2d18c94c6599674782
2019-05-24 20:05:45 -07:00
Treehugger Robot 75fcf98038 Merge "exports LOCAL_SOONG_VNDK_VERSION for VNDK libs" 2019-05-25 00:16:31 +00:00
Yi Kong 8973bd7683 Merge "Enable the experimental LLVM new pass manager" am: 2adb7eec9a
am: c0377c2a12

Change-Id: Ia4af6b0c9be34bea2aff6d7c536a38420ebb567d
2019-05-24 11:17:33 -07:00
Yi Kong 2adb7eec9a Merge "Enable the experimental LLVM new pass manager" 2019-05-24 17:33:26 +00:00
Dimitry Ivanov c44f7bbd9f Merge "Fix override for native_bridge modules" am: acce05a58c
am: ed0b1aa02f

Change-Id: Ie0887663e9366f0cfd7319e8026c67b33b62c79c
2019-05-24 06:11:32 -07:00
Dimitry Ivanov acce05a58c Merge "Fix override for native_bridge modules" 2019-05-24 12:47:24 +00:00
Dimitry Ivanov 16e7643f54 Merge "Apply native_bridge suffix to all cc_modules" am: 7636b362e1
am: 158ca2bfa2

Change-Id: I09fd0978f62c8812b3ba7e3ea02608b278448a11
2019-05-24 01:47:32 -07:00
Dimitry Ivanov 7636b362e1 Merge "Apply native_bridge suffix to all cc_modules" 2019-05-24 08:28:55 +00:00
dimitry 51ea18a437 Skip native_bridge modules when installing vndk snapshot
Do not install natively bridged libraries as part of vndk snapshot.

Bug: http://b/77159578
Test: Enable 4arch build -> make
Change-Id: I519ef92ca356ee6438abb3c85fa639af2170c2ef
2019-05-23 13:35:13 +02:00
dimitry db41747c8b Fix override for native_bridge modules
Native_bridge modules should override only native_bridge modules
and not regular ones.

Bug: http://b/77159578
Test: make 4-arch product
Change-Id: I79d96736082397abeb36d653840679a7aa0edbf5
2019-05-23 13:35:13 +02:00
dimitry 4320449c97 Apply native_bridge suffix to all cc_modules
This fixes the problem with cc_object not having this suffix and
as a result overriding non-bridged variants for modules using mk files.

Bug: http://b/77159578
Test: build 4arch product
Change-Id: Ie958f997c6f54f93d8b2987ca5ba605004e1eb70
2019-05-23 13:31:10 +02:00
Jooyung Han a579e144c6 Merge "soong: fix wrong link type for VNDKs" am: 18bb34d633
am: b0aca51ad6

Change-Id: I87f4534284f563a58e8b4f0777a9f68d9a451c14
2019-05-23 03:20:17 -07:00
Colin Cross a78a8691d6 Merge "Cut darwinStripPool from 10 to 5" am: ecca61f0f2
am: bf96a947f1

Change-Id: I7ccd87d793f0451568f4ef27371fc32d7fd2f8ea
2019-05-23 03:17:43 -07:00
Treehugger Robot 18bb34d633 Merge "soong: fix wrong link type for VNDKs" 2019-05-23 07:32:24 +00:00
Yi Kong 2fc3248b6b Enable the experimental LLVM new pass manager
For walleye, the overall binary size is decreased by ~1.1%.

For Googlers, http://go/android-llvm-newpm

Test: build
Bug: 131855431
Change-Id: I6726cd3de0d528b773fb23eae1a7c5c360e29807
2019-05-23 07:17:27 +00:00
Jooyung Han 380029182c soong: fix wrong link type for VNDKs
Do not rely on 'module.Name()' to decide VNDK link type.
Some prebuilt modules such as libclang_rt_prebuilt_library_shared and
vndk_prebuilt may have different naming schemes.(prefix/suffix)
And llndk_library module has '.llndk' suffix.

Instead, use VNDK-related properties (e.g. vndk.enabled,
vendor_available, etc.).

Bug: 132800095
Test: m & check LOCAL_SOONG_LINK_TYPE for prebuilts
Change-Id: I06b0c182aeab16969c44a86397f02be4beb80bbd
2019-05-23 12:24:51 +09:00
Colin Cross badf8d691f Cut darwinStripPool from 10 to 5
Failures in strip.sh are still occurring with darwinStripPool set to
10, try 5.

Bug: 132822437
Test: none
Change-Id: I2df247c89b6d8f6e741d4e17057b06ff9ec72b40
2019-05-23 02:09:07 +00:00
Peter Collingbourne 51e434c8d3 Restore the test for bionic being in an APEX. am: 49a25cbc7c
am: 34acae298d

Change-Id: Iea6a09d95f04bcc4715cb35907e3d00aa7f81e88
2019-05-22 01:14:22 -07:00
Peter Collingbourne 49a25cbc7c Restore the test for bionic being in an APEX.
This was removed in
https://android-review.googlesource.com/c/platform/build/soong/+/950885
because it appeared that bionic was always in an APEX, but apparently the
ART host tests have bionic outside of an APEX.

Test: art/test/testrunner/run_build_test_target.py -j50 art-linux-bionic-x64
Change-Id: I0b99462e8636da53c87f9250093689aaaf9ea695
2019-05-21 16:15:29 -07:00
Christopher Ferris 6ac2ce2433 Merge "Add an option to preserve symbols and debug_frame." am: 8a7469a0d7
am: 0361ccc398

Change-Id: I0243a02b8b83b3cd33d9680d531cdd14dcc650a1
2019-05-21 15:41:20 -07:00
Christopher Ferris 8a7469a0d7 Merge "Add an option to preserve symbols and debug_frame." 2019-05-21 18:09:08 +00:00
Jooyung Han 76106d977e exports LOCAL_SOONG_VNDK_VERSION for VNDK libs
For vndk_prebuilt_shared module, it is set by 'version' property.
For other vndk libs(e.g. cc_library with vndk.enabled), it is set as
PLATFORM_VNDK_VERSION.

Background:
To support "skip installing current VNDK".

You can get a system.img without current VNDK libs.
This may help when you want a smaller system.img given that the image
will be used with a specific version (not current) of vendor image.

Bug: 132140714
Test: m TARGET_SKIP_CURRENT_VNDK=true && see if current VNDK is not
installed

Change-Id: I1c603efc3e95fe8bdf870f2de91994077899fca7
2019-05-21 14:56:27 +09:00
Peter Collingbourne e690f5894e Merge "Teach soong not to duplicate the HWASAN runtime into each APEX." am: 90b6561d5d
am: 369f315575

Change-Id: I152a188cf3f2607c1deeaf2993312ee3821eeb81
2019-05-20 21:50:16 -07:00
Peter Collingbourne 90b6561d5d Merge "Teach soong not to duplicate the HWASAN runtime into each APEX." 2019-05-21 02:29:46 +00:00
Colin Cross dd761b255d Merge "Limit calls to strip.sh on darwin" am: 288a1e2957
am: 131a9a8dcb

Change-Id: I910226b14dfd2c40c0d0306697128ad98a6bbb34
2019-05-17 20:27:18 -07:00
Treehugger Robot 288a1e2957 Merge "Limit calls to strip.sh on darwin" 2019-05-18 01:57:37 +00:00
Colin Cross 1f547cfaac Merge changes I3dc3fded,Ic1276329,I6be04dec am: 045f0f1f30
am: 4c18d670df

Change-Id: I0c32a4d28740aa23c4a8ee90a879b19374f915ed
2019-05-17 18:40:13 -07:00
Christopher Ferris b43fe7a838 Add an option to preserve symbols and debug_frame.
New strip option named keep_symbols_and_debug_frame, that will keep the
symbols and the .debug_frame. This is meant for use by libc.so only on
arm32. Other libraries might want to use it to keep better unwinding
information on device.

Bug: 132992102

Test: Built libc.so with this option and verified that it contains
Test: the .debug_frame section.
Change-Id: I823a28199dec8316e8b26fe31ff9f17e6b11d406
2019-05-17 17:52:18 -07:00
Colin Cross 57f3e6c30f Merge "Support using cc_prebuilt_library_shared with cc_library" am: 77c22bf008
am: e3106ff23d

Change-Id: I569390897de21972c0b35924326e8073829dfee5
2019-05-17 17:06:11 -07:00
Colin Cross ee3ea31a24 Limit calls to strip.sh on darwin
strip.sh can use a file descriptor per .o file when run on .a files,
which can hit the system file descriptor limit on darwin.  This
causes failures when manay variants of libgcc_stripped are built
simultaneously.  Put all strip rules on darwin into a pool that
limits them to 10 concurrent processes, which will limit the file
descriptor usage to ~7500.

Fixes: 132822437
Test: no mention of darwinStripPool in out/soong/build.ninja on linux
Test: m libgcc_stripped on darwin
Change-Id: I3d4fbbd8d44d2e9059a79df113ab95336ec2c658
2019-05-17 22:51:00 +00:00
Peter Collingbourne 3478bb2a7f Teach soong not to duplicate the HWASAN runtime into each APEX.
When HWASAN is enabled, the runtime is conceptually part of Bionic (and
mutually depends on it), so it needs to be treated in the same way as the
Bionic libs.

Now there are only two copies of the runtime: the one in
/system/lib64/bootstrap (which won't be used by ordinary processes) and the
one in the runtime APEX.

This reduces the size of the HWASAN system image and fixes an issue where
multiple copies of the HWASAN runtime were being loaded into 64-bit binaries in
APEXes because the linker namespace for the binary is different from the one
for its dependent libraries outside of APEXes. HWASAN only supports loading
one copy of the runtime per process, so this was causing such binaries to
crash on startup.

Change-Id: I228896e193a035e6dfba9f6e28d0b2e12fc163ea
2019-05-17 10:00:39 -07:00
Colin Cross 815daf95b2 Add bpf_test.go to build and fix tests
bpf_test.go was not listed in testSrcs, which meant it was not run
during the build, but ran and failed with go test android/soong/...

Don't redeclare the cc module types and mutators, use exported
functions from cc/testing.go instead, which contain a new
dependency needed by cc modules.

This reapplies I4542640e8ff08e71565ed50617dbe67d86b29b69 after
fixes for mac tests.

Test: m
Test: go test android/soong/...
Change-Id: I3dc3fdedbd7063df4a2e0cadf2a4e0711b1823ad
2019-05-17 08:43:36 -07:00
Colin Cross 9a94287fc9 Move CreateTestContext to cc/testing.go
Allow CreateTestContext to be called by tests in other packages
that need cc modules.

Test: all soong tests
Change-Id: I6be04dec50632baa8cb51e55ba14d0ddc0df60b8
2019-05-17 08:43:36 -07:00
Colin Cross 33b2fb7333 Support using cc_prebuilt_library_shared with cc_library
Allow a cc_prebuilt_library_shared to share the same name as a
cc_library by always creating static and shared variants of
prebuilts so that the variants of the source module are always
a superset of the variants of the target module.

Bug: 131709055
Test: TestPrebuilts
Change-Id: I4afd6d37e6a986d08ad25aee69eca6d994febc6b
2019-05-17 08:40:42 -07:00
Inseob Kim b3ea83a22f Merge "Generate VNDK snapshot with Soong except configs" am: 651f40bbe1
am: 62ca44a36b

Change-Id: I35f356f9590518406a2fd8d1d3c318cf529dad92
2019-05-15 15:38:29 -07:00
Evgenii Stepanov 6c8b9a0296 Disable malloc fill in HWASan.
am: 2c6484e334

Change-Id: I84cd62a3cc76006c968136b69bf4d88137b2f934
2019-05-15 15:28:45 -07:00
Treehugger Robot 651f40bbe1 Merge "Generate VNDK snapshot with Soong except configs" 2019-05-15 22:13:35 +00:00
Evgenii Stepanov 2c6484e334 Disable malloc fill in HWASan.
HWASan has a feature to fill malloc() memory with non-zero pattern.
This has found a bug or two in the past, but it also keep causing hard
to debug issues. The main problem is lack of diagnostics - use of
pattern-initialized memory is not an immediate crash. More often than
not it manifests as a subtle change in system behavior.

Having MemorySanitizer on Android would be nice...

This change does not affect any shipping configuration, but improves
stability of testing-only SANITIZE_TARGET=hwaddress build.

Bug: 132803232
Bug: 132652537
Bug: 131438232
Bug: 132810685
Test: SANITIZE_TARGET=hwasan on crosshatch successfully boots in ~100%
      attempt (up from ~99% currently).

Change-Id: I7dcbcdf1b8a5b8556e32690327b32f04879e5db1
2019-05-15 13:53:37 -07:00
Inseob Kim 1f086e2f0d Generate VNDK snapshot with Soong except configs
This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.

Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
     development/vndk/snapshot/update.py

Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
2019-05-15 10:26:54 +09:00
Christopher Ferris 422687005a Merge "Remove libc_scudo library when building asan." am: d7e66d9e7c
am: 486b170bbc

Change-Id: Ifd1c9021bad87c4a74104be311a04ba73a4419b6
2019-05-13 17:30:56 -07:00
Christopher Ferris d7e66d9e7c Merge "Remove libc_scudo library when building asan." 2019-05-14 00:12:33 +00:00
Sasha Smundak 6c0b93509d Merge "Add aaudio, amidi, camera2ndk and nativewindow NDK libraries." am: 95aabdad9c
am: f742a23db7

Change-Id: I37c42997d43bf9a583d573a1be2d6d0f5428655c
2019-05-13 11:52:34 -07:00
Treehugger Robot 95aabdad9c Merge "Add aaudio, amidi, camera2ndk and nativewindow NDK libraries." 2019-05-13 18:30:33 +00:00
Dimitry Ivanov f8eb90728a Merge "Enable native bridge support by default for certain ndk modules" am: 9c9fd4e73a
am: 64ad4e8d72

Change-Id: I610996c9aa9a3b6bca8572e939bd4f92958da1d8
2019-05-10 03:39:39 -07:00
Dimitry Ivanov 9c9fd4e73a Merge "Enable native bridge support by default for certain ndk modules" 2019-05-10 08:16:49 +00:00
Inseob Kim c012b19eb0 Merge "Attach global variables to Context" am: a1591ab08c
am: 66c5cac22b

Change-Id: Icaf7aa78580459fd76605ec66b5bbaac13a30c9e
2019-05-09 19:42:18 -07:00
Treehugger Robot a1591ab08c Merge "Attach global variables to Context" 2019-05-09 22:36:30 +00:00
Christopher Ferris 753d4a69d5 Remove libc_scudo library when building asan.
Running any executable built with asan and libc_scudo results in crashes.

Bug: 131810078

Test: Built the media processes with the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is not listed in the
Test: mediaextractor and the mediaswcodec binaries.
Test: Build the media processes without the sanitizer enabled verifying
Test: that the libc_scudo.so shared library is listed in the
Test: mediaextractor and the mediaswcodec binaries.
Change-Id: Ie55a0414088787ec11d85fffcb04592ed4f23c57
2019-05-09 13:35:37 -07:00
dimitry 03dc3f63f6 Enable native bridge support by default for certain ndk modules
The ndk_library, ndk_prebuilt_object and ndk_prebuilt_static_stl
modules are natural targets to have native bridge support enabled,
since they build user facing object which have to be supported for
translated architectures.

Bug: http://b/77159578
Test: make
Change-Id: Ic556f4c1c41e5b3dc92f9c290b4482dee8faed33
2019-05-09 16:37:16 +02:00
Inseob Kim 9516ee9556 Attach global variables to Context
Global variables make testing difficult, and they should attached to
Context.

Bug: N/A
Test: m
Change-Id: Ic671dda755e99d036c7ddce0eed114496374d7ec
2019-05-09 12:29:58 +09:00
Sasha Smundak b500ce53e2 Add aaudio, amidi, camera2ndk and nativewindow NDK libraries.
Various CTS tests refer to them.
Test: treehugger
Change-Id: I455063b02ec872c430edb1c619d38323d7ffd488
2019-05-07 19:29:53 -07:00
Yi Kong 94b9b2655d Exclude libgcc_stripped wherever libgcc is excluded
Test: manual testing
Bug: 130267141
Bug: 29275768
Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03
Merged-In: Icc0d50e403dc4a3592e5bf389101cdef129042df
(cherry picked from commit 3d8792f7dd)
2019-05-07 21:12:49 +00:00
Yi Kong b0e95c1e60 Revert "Revert "Strip libgcc to only keep fallback symbols""
This reverts commit 619cd098b6.

Test: manual testing
Bug: 130267141
Change-Id: Ie156d4a3255be0ad082cda35c22bac4359852f22
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
Exempt-From-Owner-Approval: Cherry pick
2019-05-07 21:11:31 +00:00
Yi Kong fcd11c7c71 Merge "Exclude libgcc_stripped wherever libgcc is excluded" am: 3277c39c6b
am: 29ae56ede9

Change-Id: Iaeb5531631c175af08b2e0d96dfccd4ad25ea080
2019-05-07 09:42:38 -07:00
Yi Kong 29ae56ede9 Merge "Exclude libgcc_stripped wherever libgcc is excluded"
am: 3277c39c6b

Change-Id: Idbe82ea4a3e5cb9a9a7c194dd0a4d8a282d56c03
2019-05-06 20:13:01 -07:00
Yi Kong 3d8792f7dd Exclude libgcc_stripped wherever libgcc is excluded
Test: manual testing
Bug: 130267141
Bug: 29275768
Change-Id: Icc0d50e403dc4a3592e5bf389101cdef129042df
2019-05-06 16:18:33 -07:00
Patrice Arruda 628e320278 Merge "Soong: Add synopsis to ndk_prebuilt_* modules." am: e0dbdd87f0
am: 2a38d89734

Change-Id: Iebf89c24fc2786564e79223f3654d84f1714e90c
2019-05-06 11:49:58 -07:00
Patrice Arruda 2a38d89734 Merge "Soong: Add synopsis to ndk_prebuilt_* modules."
am: e0dbdd87f0

Change-Id: I757be447a4868755799c0cb40d21ed52989f9e7a
2019-05-06 11:37:08 -07:00
Treehugger Robot e0dbdd87f0 Merge "Soong: Add synopsis to ndk_prebuilt_* modules." 2019-05-06 18:12:12 +00:00
Colin Cross 619cd098b6 Revert "Strip libgcc to only keep fallback symbols"
This reverts commit bd475367c3.

Reason for revert: b/130267141
Bug: 29275768
Bug: 130267141
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
Change-Id: Ieab56390b27240ef7f2f52a48a673809da7bcf8e
2019-05-06 17:29:49 +00:00
dimitry 46becd866e Merge "Add native_bridge target to Android.bp" am: ec89e4c65c
am: 9da19e15ee

Change-Id: I49ecaa7fdb8bd283c9a8df00ddb6572bab9d140d
2019-05-03 16:47:46 -07:00
dimitry 9da19e15ee Merge "Add native_bridge target to Android.bp"
am: ec89e4c65c

Change-Id: I90803e4cac6fccdaaabc9d1ba3fb01491bb9bd65
2019-05-03 16:08:33 -07:00
Treehugger Robot ec89e4c65c Merge "Add native_bridge target to Android.bp" 2019-05-03 22:23:00 +00:00
dimitry 1f33e40972 Add native_bridge target to Android.bp
This allows us to build guest libraries for the native bridge for
arm/arm64 architectures.

Bug: http://b/77159578
Test: make
Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
2019-05-03 15:33:28 +02:00
Yi Kong bd475367c3 Strip libgcc to only keep fallback symbols
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.

Create libgcc_stripped, which only contains unwind symbols from libgcc.

Bug: 29275768
Test: bionic-unit-tests
Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8
(cherry picked from commit acee27cd72)
2019-05-03 08:24:10 +00:00
Yi Kong b5624d7620 Merge "Strip libgcc to only keep fallback symbols" am: 940ef9bc89
am: 6e14640082

Change-Id: I7597fa6208f143555f04ddb300db1c3f26b4d853
2019-05-03 01:22:07 -07:00
Yi Kong 6e14640082 Merge "Strip libgcc to only keep fallback symbols"
am: 940ef9bc89

Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
2019-05-03 01:17:03 -07:00
Evgenii Stepanov a3c3d65fdc Merge "Disable hwasan memory stats." into qt-dev
am: ead8b42a1d

Change-Id: I2ce1afff3c3ca8fdb0976943a905994053b4966a
2019-05-02 16:26:12 -07:00
Evgenii Stepanov d98ccb44f2 Disable hwasan memory stats.
Disable a debugging feature in hwasan that seems to be causing flaky selinux
denials in the boot test:

05-02 12:11:11.360  1663  1663 I auditd  : type=1400 audit(0.0:8): avc: denied { read } for comm="iptables-wrappe" path="/proc/1015/statm" dev="proc" ino=30968 scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netmgrd:s0 tclass=file permissive=0

I could not reproduce this locally, but this feature has no users and
I've verified that things keep working without it.

This does not affect any shipped product.

Bug: 131438232
Bug: 112438058
Bug: 131845076
Test: crosshatch_hwasan boot test
Change-Id: I08d46d19151e6d5221cdd56fd6864dae224fae25
2019-05-02 12:52:32 -07:00
Yi Kong acee27cd72 Strip libgcc to only keep fallback symbols
We use libgcc as fallback for symbols not present in libclang_rt
builtins, however we didn't know what exact symbols were being used,
some may not be intended to fallback.

Create libgcc_stripped, which only contains unwind symbols from libgcc.

Bug: 29275768
Test: bionic-unit-tests
Change-Id: I5b349fa6138e51663bf3b67109b880b4356da8e8
2019-04-30 10:07:00 -07:00
Logan Chien f7a6c944d4 Merge "Support opt-in ABI checks" am: 23803f9365
am: 5b70a03268

Change-Id: Id45f014546d9d85439350bf85d69e558149f82fc
2019-04-29 11:05:11 -07:00
Logan Chien 5b70a03268 Merge "Support opt-in ABI checks"
am: 23803f9365

Change-Id: I2ff8f34a79d8cd7ed6975ccf2cd5ee7a709c44ef
2019-04-29 10:59:30 -07:00
Logan Chien 23803f9365 Merge "Support opt-in ABI checks" 2019-04-29 17:40:06 +00:00