Commit Graph

2371 Commits

Author SHA1 Message Date
Peter Collingbourne b34551b875 Pass -hwasan-allow-ifunc when building with hwasan.
am: 967511a4e8

Change-Id: Ia22447c870639cbb664e34783adfed79782d1c2b
2019-03-20 13:10:27 -07:00
Colin Cross 9bcee1f400 Replace ctx.ExpandSources with android.PathsForModuleSrc
am: 8a49795df1

Change-Id: I42fc5461cff28f58039787b434527500d4e88eb6
2019-03-20 12:44:10 -07:00
Colin Cross 734ad216fe Remove ModuleSrcPath
am: 07e51619a2

Change-Id: I3afb1d6e16cd8d9492edf00616a856864a350340
2019-03-20 12:44:00 -07:00
Peter Collingbourne 967511a4e8 Pass -hwasan-allow-ifunc when building with hwasan.
Now that the toolchain and bionic both support ifuncs in
static executables, we can turn this on. Reduces size of
walleye_hwasan-userdebug system.img by 11MB.

Change-Id: I2f19b22518153328eee3fdca79d0c851cc513c3a
2019-03-20 19:42:42 +00:00
Colin Cross 8a49795df1 Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them.  When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.

Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
2019-03-20 19:36:13 +00:00
Colin Cross 07e51619a2 Remove ModuleSrcPath
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file.  In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.

Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.

Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.

Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
2019-03-20 19:36:03 +00:00
Yi Kong afe467154f Merge "Add -faddrsig to ClangExtraCflags" into stage-aosp-master 2019-03-20 17:43:51 +00:00
Yi Kong 7e8b47b313 Add -faddrsig to ClangExtraCflags
Emit address-significance table which allows linker to perform safe ICF.
Clang does not emit the table by default on Android since NDK still uses
GNU binutils.

With the flag, binary size is decreased. For Marlin:
               -fno-addrsig  -faddrsig  diff
/system/bin    28012K        27108K     -3.33%
/system/lib    88220K        86964K     -1.44%
/system/lib64  151936K       148108K    -2.58%

Test: m checkbuild
Bug: 128940110
Change-Id: I99511f038a6d4b88b5c849a0f8943c24731ab6ea
Merged-In: I99511f038a6d4b88b5c849a0f8943c24731ab6ea
(cherry picked from commit a32b5e6a6b)
2019-03-20 10:40:44 -07:00
Peter Collingbourne 98e6f7e4a1 Merge "Remove workarounds for old compiler versions."
am: 1b781e52e2

Change-Id: I05f0960ef39eb9d0f3fd8592c7a3542cae9358ad
2019-03-20 10:40:27 -07:00
Peter Collingbourne 1b781e52e2 Merge "Remove workarounds for old compiler versions." 2019-03-20 16:33:23 +00:00
Yi Kong 2a51b3fe00 Turn on string-plus-int warning
All instances for the warning are fixed/suppressed, turn the warning
back on.

Test: m checkbuild
Bug: 128878287
Change-Id: Ifd5f9a64cb7ff1ce47f498ed38436056b493ee92
2019-03-20 00:58:46 -07:00
Yi Kong a32b5e6a6b Add -faddrsig to ClangExtraCflags
Emit address-significance table which allows linker to perform safe ICF.
Clang does not emit the table by default on Android since NDK still uses
GNU binutils.

With the flag, binary size is decreased. For Marlin:
               -fno-addrsig  -faddrsig  diff
/system/bin    28012K        27108K     -3.33%
/system/lib    88220K        86964K     -1.44%
/system/lib64  151936K       148108K    -2.58%

Test: m checkbuild
Bug: 128940110
Change-Id: I99511f038a6d4b88b5c849a0f8943c24731ab6ea
2019-03-20 03:21:10 +00:00
Yi Kong cc6ac6647f Merge "Switch clang to r353983"
am: bdb1ed828d

Change-Id: I1852d1b722211a2bb2ba8425e4e91fe19ad66811
2019-03-18 21:29:33 -07:00
Yi Kong bdb1ed828d Merge "Switch clang to r353983" 2019-03-19 04:21:20 +00:00
Yi Kong 6925d2b300 Switch clang to r353983
Bug: 126457671
Bug: 123638879
Bug: 128878287
Test: go/clang-r353983-testing
Change-Id: I7f16e68f0f521ff55587084932d175b704e452c9
2019-03-19 04:20:52 +00:00
Jiyong Park 467fc4afa1 Merge "Install symlink to the runtime APEX only for device"
am: c743c37e92

Change-Id: I5e38fde29caa769286455729d24fe2cbf66c56ab
2019-03-18 15:40:52 -07:00
Treehugger Robot c743c37e92 Merge "Install symlink to the runtime APEX only for device" 2019-03-18 22:23:06 +00:00
Benjamin Gordon 5473e3fbdf Merge "Add stoney ridge x86 variant"
am: cd2e52870a

Change-Id: I8c08245cc45cc4ed91a016058fb043a299fa95cf
2019-03-15 15:33:53 -07:00
Jiyong Park c3e2c86caf Install symlink to the runtime APEX only for device
Host does not need the symlink. It also broke master-art-host targets.

Test: ALLOW_MISSING_DEPENDENCIES=true
DIST_DIR=~/temp
./art/tools/dist_linux_bionic.sh -j50 showcommands
com.android.runtime.host

Change-Id: Ie8e02553c5a1b6cd5afebd73a64268d2950fc18e
2019-03-16 02:13:46 +09:00
Benjamin Gordon 87e7f2f685 Add stoney ridge x86 variant
Bug: 124445930
Test: compile and deploy to grunt
Change-Id: Ie63217c7c68f5688bf070cbabf9ea5a1b82d3acc
2019-03-15 11:04:48 -06:00
Jiyong Park f0fceb2cbf Merge "Create symlink for bionic files"
am: 7487fb54fe

Change-Id: Ic87176738eeb92a2de8345a67d80ac224b1d3091
2019-03-15 02:15:49 -07:00
Treehugger Robot 7487fb54fe Merge "Create symlink for bionic files" 2019-03-15 09:02:18 +00:00
Stephen Hines 3c9be84a21 Merge "Add AVX/AVX2 supported archs in build system"
am: 5971f50a22

Change-Id: I674453855cd1527aca39c90eac706deec91a4006
2019-03-14 18:02:03 -07:00
Jiyong Park f11943527d Create symlink for bionic files
This change creates following symlinks for bionic files.

/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so
/system/lib/libm.so -> /apex/com.android.runtime/lib/bionic/libm.so
/system/lib/libdl.so -> /apex/com.android.runtime/lib/bionic/libdl.so
/system/bin/linker -> /apex/com.android.runtime/bin/linker
...

This allows us to not have mountpoints under /bionic.

Bug: 125549215
Test: m and inspect the symlinks in the system partition.
Change-Id: I3a58bf4f88c967862dbf06065a1af8fc4700dda3
2019-03-15 03:04:52 +09:00
Shalini Salomi Bodapati 4a0459dd03 Add AVX/AVX2 supported archs in build system
This patch adds new arch features avx2 and avx512 and
their supported archictectures for x86 and x86_64

Bug: 123376719
Test: m checkbuild

Change-Id: I3c079741815b39d7dbb4072e12ef7c9c2c15f5fe
Signed-off-by: Shalini Salomi Bodapati <shalini.salomi.bodapati@intel.com>
2019-03-13 03:48:45 +00:00
Colin Cross e5f6f175a8 Annotate paths and deprecate ExtractSource(s)Deps
am: 27b922f53e

Change-Id: I6b4bd574d9dabf006e16f67a5212c63a2a0c7550
2019-03-07 11:05:13 -08:00
Colin Cross 27b922f53e Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.

Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
2019-03-07 18:36:35 +00:00
Jooyung Han c7da1a6b81 cc_test: emit errors if there's duplicate in srcs
am: a61ff2cec3

Change-Id: Iace7509da2d9bf6cca8f5820ed4e7ac6b93f7316
2019-03-06 18:08:57 -08:00
Jooyung Han a61ff2cec3 cc_test: emit errors if there's duplicate in srcs
In general "srcs" property allows duplication in the list.
But when cc_test's "test_per_src" property is set "true",
there will be variants according to "srcs" list.
Therefore, it should fail if there is a duplicate entry
in srcs list.

Bug: 113629474
Test: mma
Change-Id: I543624459c30dd296494a3a80e28ce5503a3ea2f
2019-03-07 01:57:57 +00:00
Peter Collingbourne bd19db0da6 Remove workarounds for old compiler versions.
LLVM r349610 was released, so these workarounds are no longer required.

Bug: 112907825
Change-Id: Ia6ba0034881f2ab657d8420df3047c21757c7d9b
2019-03-06 10:48:36 -08:00
Jooyung Han 4b75790b30 Merge "Add checks for double_loadable dependencies"
am: f14277fc3a

Change-Id: Ida062e0df66d5cc4c0a6f5f895eff102c0788c76
2019-03-05 19:43:56 -08:00
Jooyung Han a70f067899 Add checks for double_loadable dependencies
Vendor-available libs can be double-loaded if LLNDK libs depend
on them. Currently soong checks only 'direct' dependency bewteen
LLNDK and VNDK lib. With this change, soong checks if every dependencies
from LLNDK is also LLNDK or VNDK-SP or marked as 'double_loadable:true'.
This change causes many libs to be marked as 'double_loadable'.

Bug: 121280180
Test: m -j
Change-Id: Ibc1879b6fd465a3141520abe0150018c3051c0a7
2019-03-06 11:18:21 +09:00
Inseob Kim fb4d873dd2 Add blueprint:mutated to sysprop properties
am: b3f22ca48b

Change-Id: I10c895eef01153f724389de2794bd141c56b1c3c
2019-03-04 23:01:03 -08:00
Inseob Kim b3f22ca48b Add blueprint:mutated to sysprop properties
Because this flag is used internally by sysprop_library.

Bug: N/A
Test: m -j
Test: build cc_library with setting sysprop property and fail
Change-Id: I478889b8923f99407a067e5b9efee9322c3e5ae8
2019-03-05 03:45:41 +00:00
Colin Cross 5b6741d94d Replace *Escape with *EscapeList
am: 0b9f31fb08

Change-Id: I18edabe44493f077c1b63f354dfc28029a9641d5
2019-03-04 10:22:10 -08:00
Colin Cross 0b9f31fb08 Replace *Escape with *EscapeList
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings.  Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.

Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
2019-03-04 18:11:53 +00:00
bralee ea119a86a4 Merge "Build System: Collect native dependent information from cc.go."
am: cc5b384ea5

Change-Id: I348e7f4a26080f779e3a6c1a9fb1d0e9c2f21d82
2019-03-03 22:09:10 -08:00
bralee 3f49f4d469 Build System: Collect native dependent information from cc.go.
Bug: 126957990
Test: 1. m aidegen
      2. $ANDROID_HOST_OUT/bin/aidegen-dev frameworks/native -v
      3. open out/soong/module_bp_java_deps.json
         check *.a and *.so files are added.

Change-Id: I82ba49d023621908f0be12abf529553aee45fa5b
2019-03-04 06:58:15 +08:00
Julien Desprez 706f181876 Merge "Autogenerate some extra_options based on some build properties"
am: afbddd8ddd

Change-Id: Ic0daecc6b3151e8b917aee9dbbbbf0447ba92a93
2019-03-01 17:00:32 -08:00
Julien Desprez eb7398ea79 Autogenerate some extra_options based on some build properties
If an Android.bp specifies Isolated=true, make sure
it's tagged as not-shardable, since b/126376458 is not
resolved.

Test: make bionic-benchmarks-tests (with and without isolated=true)
Bug: 124024827
Change-Id: I2210c15b84f9b30e1cc23b426d463b34cf9ef94f
2019-03-01 11:42:17 -08:00
Jiyong Park e8c8a63a57 Merge "Fix: sysprop module can't be used with whole_static_libs"
am: 7aac193fa8

Change-Id: I0e174e52629c7cb0bf240d366d82fdfc65e66ab8
2019-02-25 22:40:27 -08:00
Jiyong Park 5d1598f746 Fix: sysprop module can't be used with whole_static_libs
When a sysprop module is listed in whole_static_libs, it is renamed to
"lib" + <module> to actually refer to the generated C++ library for the
sysprop module.

Test: m (sysprop_test amended)
Change-Id: I05eddb24433d444376787be567830929ef078159
2019-02-26 10:26:44 +09:00
Xin Li ced438cafc DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: Ie10bc45dbb1bbf96df17a89ecdf24b68da3ca6d5
2019-02-21 09:24:25 -08:00
Treehugger Robot 11545323d2 Merge "Allow linking against SystemConfiguration framework on Mac" 2019-02-20 21:06:11 +00:00
Dan Willemsen 97d017ecce Allow linking against SystemConfiguration framework on Mac
This is needed for Python

Test: m py2-cmd; py2-cmd -murllib
Change-Id: I156bd281cb341eba7bdd7e7a15b87e8e90ecee1d
2019-02-20 10:28:56 -08:00
Yu Shan ecc0efa02a Merge "Add 16bit and 32bit nanopb library." 2019-02-20 18:23:29 +00:00
Xin Li b81f48ee02 Merge "DO NOT MERGE - Merge PPRL.190205.001 into master" 2019-02-20 16:26:00 +00:00
Treehugger Robot 48db2b15fb Merge "Revert "Remove armv7-a without neon support"" 2019-02-20 12:56:37 +00:00
Treehugger Robot e67c20ce90 Merge "Override module's C flags when coverage is enabled" 2019-02-20 05:40:18 +00:00
Dan Albert 8818f49989 Revert "Remove armv7-a without neon support"
Unfortunately we still need to build the NDK sysroot as non-NEON
since that's still supported, though it's no longer the default.

This reverts commit f4e0601c7e.

Test: treehugger
Test: rebuilt NDK sysroot and imported into the NDK, ran NDK tests
Bug: None
2019-02-19 13:53:01 -08:00
Yu Shan 76dd005e68 Add 16bit and 32bit nanopb library.
When compiling nanopb static library, we need to add 16bit or 32bit
flag if we need to use 16bit or 32bit size, default is 8bit.

Change-Id: Ib74478996cb2487accc1e46a32fba8170214c47f
Test: None
Bug: b/122292884
2019-02-19 12:05:02 -08:00
Pirama Arumuga Nainar c7679de4ab Override module's C flags when coverage is enabled
Bug: http://b/116873221

Disable -Wframe-larger-than because building without optimization can
make frame larger.  Building dng_sdk with coverage results in a bigger
stack frame than the limit in C flags.

Get optimization level back to -O0 if module has a non-default
optimization level.  Not doing so causes link failures with
libneuralnetworks.so.

Test: Build with coverage.
Change-Id: I36b2979bb6a73023458c8de3241e975845bd36eb
2019-02-19 10:00:27 -08:00
yangbill 4f41bc2bed [SOONG] Not auto-generate test config if test_suite is cts
Current soong use source code's under cts as the rule for judgement.
Should change to use test_suites define instead.

Bug: 124313692
Test: m hello_world_test, make sure test config be auog-enerated.
      Modified platform_testing/tests/example/native/Android.bp
      m hello_world_test, make sure test config not be auto-generatetd.

Change-Id: I1bc5216f73329d2a82d9ff29ccbede436dd2976c
2019-02-19 22:25:50 +08:00
Pirama Arumuga Nainar dd739bbdf2 Merge "Enable coverage for vendor-related libraries" 2019-02-19 05:19:41 +00:00
Logan Chien 8a851cfce8 Merge "Print --llndk to create_reference_dumps command" 2019-02-19 03:48:12 +00:00
Logan Chien 6227fed029 Print --llndk to create_reference_dumps command
This commands adds `--llndk` to `create_reference_dump.py` command if
the module with incompatible ABI changes is an LLNDK or a NDK lib. This
prevents people from uploading a CL that simply removes ABI dumps (the
result even when the uploader runs the command).

Bug: 124620774
Test: Make an incompatible ABI changes in libaaudio and see the flag.
Change-Id: I9f07f879193bd4d73f5924baff298d28d6fe1506
2019-02-18 13:35:36 +08:00
Colin Cross 40e3373d41 Add more paths helper methods
Add PathsForOutput to convert multiple strings into WritablePaths.

Add OutputPath.InSameDir to build a new OutputPath pointing to a
file in the same directory as an existing OutputPath.

Add WritablePathForTesting and WritablePathsForTesting that mirror
PathForTesting and PathsForTesting but return WritablePaths.

Add PathContextForTesting to return a minimal PathContext
implementation.

Test: paths_test.go
Change-Id: I9708eb164b273514a96dae0a260ef9a963fb9bcf
2019-02-16 17:08:07 -08:00
Pirama Arumuga Nainar 2f289aca6e Enable coverage for vendor-related libraries
Bug: http://b/116873221

Enable coverage for libraries that use VNDK and those that have vendor
variants.  This previously caused a redefinition error in the
Android-<product>.mk but was indirectly fixed when
https://android-review.googlesource.com/c/platform/build/soong/+/906394
disabled coverage for LLNDK stub libraries.

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=frameworks nothing
Change-Id: Iccbc1c15c68562449ffffe7bbcc3d22419d84bfe
2019-02-15 15:24:47 -08:00
Yi Kong da69c65b88 Merge "Annotate No_libcrt with arch_variant"
am: 4e3c60128f

Change-Id: Ia170a78cb583297f5a7eeb24656b914c5bc50fab
2019-02-15 12:46:14 -08:00
Yi Kong 4e3c60128f Merge "Annotate No_libcrt with arch_variant" 2019-02-15 20:39:25 +00:00
Pirama Arumuga Nainar 48a609233b Merge "Do not enable coverage for platform/llndk stub libraries"
am: ff1b5c7b90

Change-Id: If62904ecb83ad3a3f0419ebb758b9f3d2b045143
2019-02-15 11:11:53 -08:00
Yi Kong 410d834752 Annotate No_libcrt with arch_variant
libcrt is crashing libc on x86/x86_64 for unknown reason. This enables
us to disable libcrt for these architectures for libc for now.

Test: m checkbuild
Bug: 29275768
Change-Id: I5a717286b3d9cc1ba8cdcd33bafb9c225de4aff8
2019-02-15 10:07:18 -08:00
Pirama Arumuga Nainar 8113835940 Do not enable coverage for platform/llndk stub libraries
Bug: http://b/116873221

These are used only for linking, and secondly, don't link with libc or
other system libraries.

Test: Build system/core/libnativeloader with coverage
Change-Id: I37eae572a5eaa00f0e8c72bc1453e967b5bcb577
2019-02-14 15:39:31 -08:00
Jiyong Park 548f147804 Remove prefer_sanitize.* properties
am: f97782b18c

Change-Id: I89cf55ff2cea384e1cf25c59f538dc185088a0cc
2019-02-13 21:42:27 -08:00
Jiyong Park f97782b18c Remove prefer_sanitize.* properties
The properties are no longer required as an APEX module is mutated with
required sanitizers which are gathered by scanning the sanitizers that
are enabled for its direct dependencies.

Bug: 124128094
Test: m on marlin
The extractor libs are found under /system/apex/com.android.media

Merged-In: I55961d400dcbac067a5c0dcecb90e399d4991a70
Change-Id: I55961d400dcbac067a5c0dcecb90e399d4991a70
(cherry picked from commit abda0eb76b)
2019-02-14 12:30:49 +09:00
Pirama Arumuga Nainar fd183f3742 Extend coverage mutator to allow variants with coverage on and off
am: 1acd4475f2

Change-Id: I3b3dcf65f68bae50f3476e70d690a9ff63c2fb2d
2019-02-13 16:26:03 -08:00
Pirama Arumuga Nainar 1acd4475f2 Extend coverage mutator to allow variants with coverage on and off
Bug: http://b/116873221

This allows us to enable coverage for a module (typically static
libraries) even if a dependent module cannot build with coverage.  In
this case, the dependent module can just pick the variant with coverage
off.

- Create the following variants from the coverage mutator:
  - "" (empty): Don't build  with coverage and always pick the
                non-coverage variants for dependents.  This variant is
                created for modules with 'native_coverage: false'.
  - "cov":      If this module's path is covered by the COVERAGE_PATHS
                option, build this module with coverage.  If not, build
                this module without coverage.  In either case, pick
                coverage variants ("cov") for dependencies if available.

- Do not enable coverage:
  - for NDK stub libraries
  - if sdk_version < 23 since libc doesn't export 'stderr' which is
    needed by the coverage/profile runtime library.
  - for VNDK libraries

Test: In AOSP: m COVERAGE_PATHS=system/security NATIVE_COVERAGE=true nothing

Change-Id: I4d08790d35cdeaf12fb3c4f999d69a870e65836a
2019-02-14 00:05:42 +00:00
Inseob Kim 92053b977e Create sysprop_library soong module
am: c0907f191a

Change-Id: I5ec9366b92ab8ca07ed41c93b8e2324a301a2bed
2019-02-13 15:57:16 -08:00
Inseob Kim c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00
Yi Kong 908b3fa509 Merge "Use no_libcrt property instead of hard coding projects to exclude"
am: 02e4b568dc

Change-Id: I7e143026e60cb2263ce2a37b5bd856ea133ac128
2019-02-13 14:59:10 -08:00
Yi Kong 19408a3aaa Use no_libcrt property instead of hard coding projects to exclude
Test: m checkbuild
Change-Id: Id4d3605a5cd45dd43b752a9d270df0a20024dbd0
2019-02-12 09:41:18 -08:00
Jiyong Park d563bc7b92 Merge "Static variant of a stubs lib is correctly tracked"
am: eebdf43337

Change-Id: I431341b18a2601b25fa459c0fb108ce9ae36b860
2019-02-08 21:08:03 -08:00
Treehugger Robot eebdf43337 Merge "Static variant of a stubs lib is correctly tracked" 2019-02-09 04:56:07 +00:00
Jiyong Park 11e6e5c76c Merge "Handle the case when a symbol is annotated with "# apex vndk""
am: 3415780021

Change-Id: I2567afe4afab0f9a71d87f3cafffb21f35fdf0a0
2019-02-08 10:57:34 -08:00
Treehugger Robot 3415780021 Merge "Handle the case when a symbol is annotated with "# apex vndk"" 2019-02-08 18:46:44 +00:00
Jiyong Park 1431765f8d Handle the case when a symbol is annotated with "# apex vndk"
This change fixes a bug that a symbol is omitted for apex (or vndk) when
it is annotated with "# vndk apex" (or "# apex vndk).

Bug: 123349183
Test: python3 test_gen_stub_libs.py

Change-Id: I344d6e70732bae8877cb16bbe881edb79fe90670
2019-02-08 20:36:26 +09:00
Colin Cross e5bc0d6253 Make MakeVarsContext a PathContext
am: 65494b962b

Change-Id: I1a2eab146c5f5327591c44faf224b562aac86610
2019-02-07 17:45:24 -08:00
Colin Cross 65494b962b Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export
the subset of it that is used through MakeVarsContext.SingletonContext,
plus what is necessary for PathContext, directly through
MakeVarsContext.

Test: m checkbuild
Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
2019-02-07 22:31:04 +00:00
Aurimas Liutikas aa6f7adb24 Merge "Update NDK library list"
am: 7cf14099b7

Change-Id: I2963a3359f1e20f67990ba0473340ad70bbcecbe
2019-02-07 12:57:13 -08:00
Jiyong Park e4bb986106 Static variant of a stubs lib is correctly tracked
cc.Module.staticVariant is used to track the corresponding static
variant of a shared variant. This change fixes a problem that the
staticVariant field is not correctly set when the lib is with stubs:
{...}. This was happening because the staticVariant was set by adding
dependency from shared variant to static variant to reuse object files.
However, for a lib with stubs, the dependency was not created because it
does not make sense to share object files for stubs lib where source
code is auto-generated.

Fixing the issue by adding dependency to the static variant with a
different dependency tag whose only purpose is to set staticVariant
field.

Bug: 122885634
Test: m (cc_test amended)
Change-Id: I7f97cbb4c4a28bf9a93839d3b91ee140835aa6af
2019-02-08 00:47:46 +09:00
Dan Willemsen 63833a3882 Return early after NDK->non-NDK library link error
am: 155d17c1da

Change-Id: I8d11bf8c71a3df036e5545f6d796ce970813e123
2019-02-06 22:58:33 -08:00
Dan Willemsen 62b9cf952c Update NDK library list
Apparently this isn't autogenerated based on the list of ndk_library
modules?

Fixes: 124019854
Test: try to use libsync from a cc_library with sdk_version: "current"
Change-Id: I5016e1b7d77ed9255bf4b185c168efe8d0b73d12
2019-02-06 18:41:27 -08:00
Dan Willemsen 155d17c1da Return early after NDK->non-NDK library link error
Otherwise the code after this assumes that the "to" library is an NDK
library and panics when it isn't.

Bug: 124019854
Test: trigger error, no longer see panic
Change-Id: I88d10e8d882285e24b4f42d0cf85c2d658348617
2019-02-06 18:30:02 -08:00
Jiyong Park 8893e6af05 Don't emit symbol for stubs libraries
am: 47e4fcb6d3

Change-Id: I1a3eb5401c79881469d290c5bc959ef96be725a3
2019-02-06 05:51:18 -08:00
Jiyong Park 47e4fcb6d3 Don't emit symbol for stubs libraries
The stubs libraries are buildtime-only artifacts. Since they are not
used at runtime, no need to emit symbol files for them

Test: m
Change-Id: I54410e9289b4bf61e23581386b56ade8fba18dfa
2019-02-06 22:40:29 +09:00
Colin Cross 9053375b93 Merge changes Ifcb338e6,Ie509ed80,I270fed60,Id825cb75,I92a963bd
am: cc2d11961c

Change-Id: Iede0d74591eb60148ddd7c187b403ece2fc8dde5
2019-02-05 21:19:03 -08:00
Colin Cross 571cccfcbc Prepare for a type-safe OnceKey
Add an opaque OnceKey type and use it for all calls to Once in
build/soong.  A future patch will convert the arguments to
Once* to OnceKey once users outside build/soong have been updated.

Test: onceper_test.go
Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
2019-02-06 01:52:41 +00:00
Dan Willemsen 959223fdb1 Merge "Stop exporting the windows toolchain to Make"
am: a55b12bec2

Change-Id: I1ffb84b75a0916124ae161a0863994c90d97d522
2019-02-05 13:11:11 -08:00
Dan Willemsen a55b12bec2 Merge "Stop exporting the windows toolchain to Make" 2019-02-05 20:45:27 +00:00
Kostya Kortchinsky ff2fe20afc Merge "Add option to disable Scudo globally [Soong]"
am: 66b1193d55

Change-Id: I38866e353d0a66eea0b73f13b43d593946775d39
2019-02-05 06:55:29 -08:00
Kostya Kortchinsky 66b1193d55 Merge "Add option to disable Scudo globally [Soong]" 2019-02-05 14:45:39 +00:00
Jiyong Park 2121073534 APEX respects relative_install_path
am: b7c24df220

Change-Id: I78a018e6116ddb88025b98d66f442ce36776a4c0
2019-02-05 04:14:58 -08: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
Stephen Hines 1d24874e86 Merge "Use llvm-{strip,objcopy} by default"
am: 363cab0bea

Change-Id: I313eb1919e524d31cd470791fee0ef2ea29ad86f
2019-02-04 19:19:38 -08:00
Stephen Hines 363cab0bea Merge "Use llvm-{strip,objcopy} by default" 2019-02-05 03:13:14 +00: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 2f27762373 Merge changes I545a832a,I85a51b04
am: 54956abf1f

Change-Id: Ieb7d59d1593807cb1b02b820dfed08a25bf441b6
2019-02-04 09:51:57 -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
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 03f7c2110c Use bootstrap linker for asan build
am: a2aca28750

Change-Id: I6b45d6863a72be558fda41faf4ac1d315f1066e1
2019-02-03 07:37:16 -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
Evgenii Stepanov a60c43aa23 [hwasan] Remove deprecated compiler flag (NFC)
am: 93c3f5368d

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit 84757ea7ea.

Reason for revert: veridex asan failure is fixed.

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

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

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

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

Reason for revert: Broke aosp_x86_64

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: I93384b066fc2a6aafd89e46ad7c20b80f2e7010d
2019-01-14 14:04:15 -08:00