Commit graph

2462 commits

Author SHA1 Message Date
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
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
Treehugger Robot
75fcf98038 Merge "exports LOCAL_SOONG_VNDK_VERSION for VNDK libs" 2019-05-25 00:16:31 +00:00
Yi Kong
2adb7eec9a Merge "Enable the experimental LLVM new pass manager" 2019-05-24 17:33:26 +00:00
Dimitry Ivanov
acce05a58c Merge "Fix override for native_bridge modules" 2019-05-24 12:47:24 +00: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
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
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
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
90b6561d5d Merge "Teach soong not to duplicate the HWASAN runtime into each APEX." 2019-05-21 02:29:46 +00:00
Treehugger Robot
288a1e2957 Merge "Limit calls to strip.sh on darwin" 2019-05-18 01:57:37 +00: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
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
Treehugger Robot
651f40bbe1 Merge "Generate VNDK snapshot with Soong except configs" 2019-05-15 22:13:35 +00: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
d7e66d9e7c Merge "Remove libc_scudo library when building asan." 2019-05-14 00:12:33 +00:00
Treehugger Robot
95aabdad9c Merge "Add aaudio, amidi, camera2ndk and nativewindow NDK libraries." 2019-05-13 18:30:33 +00:00
Dimitry Ivanov
9c9fd4e73a Merge "Enable native bridge support by default for certain ndk modules" 2019-05-10 08:16:49 +00: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
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
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
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
6e14640082 Merge "Strip libgcc to only keep fallback symbols"
am: 940ef9bc89

Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c
2019-05-03 01:17:03 -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
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
Patrice Arruda
58f381b714 Merge "Soong: Add synopsis to kernel_headers module under cc package."
am: f3c5e4816c

Change-Id: I8512002dde76af8f29d2d355079f375545a58d18
2019-04-26 22:29:30 -07:00
Patrice Arruda
8c8563746c Soong: Add synopsis to ndk_prebuilt_* modules.
Added synopsis to the following modules under cc package:
   * ndk_prebuilt_object
   * ndk_prebuilt_static_stl
   * ndk_prebuilt_shared_stl

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: Icca7418268a0328b622014da8a077b26800075fd
2019-04-26 18:36:57 -07:00
Patrice Arruda
cb5142c2d1 Soong: Add synopsis to kernel_headers module under cc package.
Added kernel_headers synopsis.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis
      was added to the kernel_headers module.

Change-Id: I3d23fa2408c387883e62dea0742e72a96868ecb4
2019-04-26 15:19:21 -07:00
Logan Chien
41eabe63e8 Support opt-in ABI checks
This commit allows a module to opt in for ABI checks even when it is
not an LLNDK/VNDK module.

Bug: 131421213
Test: Add `header_abi_checker { enabled: true, }` to some module
Change-Id: Ie09d262e651cbb44d7d0eba652f55dc1e1e52962
2019-04-27 01:55:50 +08:00
Colin Cross
34f52a3894 Merge "Fix tests with cc_binary_host on mac"
am: 588c1ee5f8

Change-Id: Ib708699fa03549edc180e038890b1262ca7476dc
2019-04-22 21:22:50 -07:00
Colin Cross
9c6241f768 Fix tests with cc_binary_host on mac
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs
PATH in the test environment.  Copy it from the original environment.

Fixes: 129763458
Test: proto_test.go
Change-Id: I41c1acdceee7c35036148256adafb471871034df
2019-04-22 15:55:56 -07:00
Yi Kong
bafbdf4239 Merge "Switch to clang-r353983c"
am: db52ce88b0

Change-Id: I80437802cdb52b22bad0e2c67f57b596cc75451a
2019-04-19 16:30:25 -07:00
Yi Kong
09ecee7686 Switch to clang-r353983c
Test: TreeHugger
Bug: 129712936
Change-Id: I15f1db69de86ad8b9f2a0ae086fa2df87835948a
2019-04-19 16:23:18 +00:00
Pirama Arumuga Nainar
93b008e5b8 Merge "Revert "Revert "Enable lld for windows"""
am: cd9a1e2e73

Change-Id: Ib112923a601eebe26a95a5f8a714b2d862c2c6d6
2019-04-18 08:43:12 -07:00
Pirama Arumuga Nainar
cd9a1e2e73 Merge "Revert "Revert "Enable lld for windows""" 2019-04-18 15:26:42 +00:00
Jiyong Park
9e4d9a2ccd Merge "Fix: HideFromMake is not registered to llndk_* module types"
am: 587fb4de9a

Change-Id: If0bcd3d4a523a5867b28f787578dd192c8bfd68b
2019-04-17 07:58:32 -07:00
Jiyong Park
5e676fe9f0 Fix: HideFromMake is not registered to llndk_* module types
llndk_* module types are not initialized via cc.Module.Init(). As a
consequence, mutated properties like HideFromMake, etc. were not
registered and this caused problem when the mutated properties are set
by one of the mutators like the sanitizerMutator. Specifically, both
asan and non-asan variant of an llndk_header were both exported to Make
although HideFromMake was set to true for the non-asan variant.

Fixing this bug by explicitly registering BaseProperties struct which
contains the mutated properties.

Bug: 130652996
Test: Following works:
$ lunch aosp_cf_x86_pasan-userdebug
$ mkdir frameworks/native/test && mkdir frameworks/native/test/include
$ cat > frameworks/native/test/Android.bp
llndk_headers {
    name: "test_headers",
    export_include_dirs: ["include"],
}
^D
$ SANITIZE_TARGET='address' make

Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d
2019-04-17 13:17:47 +09:00
Pirama Arumuga Nainar
6d8c0a50bc Revert "Revert "Enable lld for windows""
This reverts commit 61166dc047.

One difference from the earlier change is that import libraries are now
using the '.lib' extension instead of '.a' to prevent clash with
AdbWinApi.a.

Bug: http://b/110800681

The following flags that the binutils linkers support are not
available in lld for Windows:
  -soname
  --no-undefined
  -rpath

Windows also uses "import libraries", which are stub libraries used only
for linking.  The binutils linkers accepted a DLL and treated them as an
import library.  But lld issues the following error:

  lld-link: error: ...DLL: bad file type. Did you specify a DLL instead
  of an import library?

To resolve this, pass '-out-implib=libFoo.lib' to lld when linking
libFoo.dll to get lld to generate an import library.  Add libFoo.lib as
an implicit output to the 'ld' build rule.

Rewrite the shared libraries when building a library/binary to use the
import library instead of the DLL.  As a side-effect, this also uses the
newly-created AdbWinApi.lib that's alongside
development/host/windows/prebuilt/usb/AdbWinApi.dll

Test: Run Windows tests (go/android-llvm-windows-testing) and check
absence of regressions.  Also check that the following commands pass:
      $ adb.exe devices
      $ fastboot.exe devices

Change-Id: I34e07d345e0207086ac8e8ea12525d8c322b20fd
2019-04-16 16:22:03 -07:00
Patrice Arruda
500f586c53 Merge "Soong: Add synopsis to ndk_* modules."
am: 8196356248

Change-Id: Ibc6feab13e7b3bc08983def893d15a770ab61451
2019-04-16 09:28:43 -07:00
Patrice Arruda
8196356248 Merge "Soong: Add synopsis to ndk_* modules." 2019-04-16 16:14:46 +00:00
Patrice Arruda
7ac9db2012 Merge "Soong: Add synopsis to several modules under the cc package."
am: 3cbdeddaf0

Change-Id: Ideab6818d25905e1484f4ce0b5253a98248ca562
2019-04-16 09:07:48 -07:00
Patrice Arruda
3cbdeddaf0 Merge "Soong: Add synopsis to several modules under the cc package." 2019-04-16 15:43:55 +00:00
Dan Willemsen
e71c0691ad Convert yacc to a single RuleBuilder rule
am: 4e0aa23dd3

Change-Id: I5d629683fa99cbbc0b6f97517a1cb9c5e8c6bb89
2019-04-15 17:24:18 -07:00
Dan Willemsen
4e0aa23dd3 Convert yacc to a single RuleBuilder rule
So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.

Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
2019-04-15 14:52:05 -07:00
Christopher Ferris
e0728ccb3a Merge "Do not re-export _Unwind_XXX symbols."
am: 41eed99dc7

Change-Id: I71ecd9be29895f799728d341e5407043e4af1812
2019-04-11 21:58:45 -07:00
Christopher Ferris
c3a1e22060 Do not re-export _Unwind_XXX symbols.
Bug: 130267141

Test: All system shared libraries do not contain global _Unwind_XXX symbols.
Change-Id: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
Merged-In: I79673753bb8197041bfe8ffb016d9f5fdf4cada5
(cherry picked from commit cf78867417)
2019-04-11 17:54:48 -07:00
Logan Chien
09b2c81f09 Merge "Add --llndk for NDK libs as well"
am: b10243dc4e

Change-Id: I4756fb19c5ac88c1897f19f5217326c337a45c86
2019-04-11 09:51:48 -07:00
Logan Chien
62f1f9488e Add --llndk for NDK libs as well
This commit add `--llndk` to the command line option for
`create_reference_dumps.py` as well.

Bug: 124620774
Bug: 130324828
Test: lunch aosp_arm64-userdebug && make
Change-Id: I117864209b8cf8c934fd3aa1086b7691c1c449e3
2019-04-11 05:40:57 +00:00
Patrice Arruda
6ea42118f2 Soong: Add synopsis to ndk_* modules.
Added synopsis to the following modules under cc package:
    * ndk_headers
    * ndk_library
    * versioned_ndk_headers
    * preprocessed_ndk_headers

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2146919528cf039ed9327b3358de5b1bdb28275a
2019-04-09 18:50:44 -07:00
George Burgess IV
ea2835bb72 Merge "Remove our clang-tidy wrapper"
am: 45a5a287af

Change-Id: Ie120d7f322039f6b382769fb68fd1785b3902096
2019-04-05 17:17:25 -07:00
George Burgess IV
c4624c0189 Remove our clang-tidy wrapper
Looks like the reason for it existing has been fixed. It should probably
just be removed.

Bug: None
Test: WITH_TIDY=1 m

Change-Id: I770b2fec4ac44f265ff31731c9c0bd4da14d5b0f
2019-04-04 17:58:00 -07:00
Patrice Arruda
efd2678e8c Merge "Soong: Add synopsis to vndk_prebuilt_shared module under cc package."
am: fc453c79f2

Change-Id: Ieffcdfeb0fe47af75b0344e0bb2428545ec120fe
2019-04-04 12:01:10 -07:00
Treehugger Robot
fc453c79f2 Merge "Soong: Add synopsis to vndk_prebuilt_shared module under cc package." 2019-04-04 18:51:11 +00:00
Vic Yang
fba522bd64 Merge "Blacklist more libraries from no-vendor-variant VNDK"
am: f3f1467051

Change-Id: Iba0a4248bfc4e72e470849e3878ca26d9d0906b0
2019-04-04 01:50:54 -07:00
Treehugger Robot
f3f1467051 Merge "Blacklist more libraries from no-vendor-variant VNDK" 2019-04-04 08:33:02 +00:00
Colin Cross
a1c57b4664 Fix package path of android/soong/android pctx
am: cc0ce80ed5

Change-Id: Ia266af299fe1a0c8b2f9467c845ceb61cb8236bc
2019-04-03 21:21:10 -07:00
Colin Cross
cc0ce80ed5 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-04 03:59:34 +00:00
Christopher Ferris
2000f21705 Make libc_scudo always go first.
am: 134f8f6f00

Change-Id: Ib7b568406b3822ece9cf0825957d7a8b8ff6aa01
2019-04-03 16:09:15 -07:00
Christopher Ferris
134f8f6f00 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-03 14:54:12 -07:00
Patrice Arruda
ea3fcdffc2 Soong: Add synopsis to several modules under the cc package.
Added synopsis to the following modules under cc package:
    * llndk_headers
    * llndk_library
    * vendor_public_library
    * toolchain_library

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I0f6e3b01b478d46afeacbe6fc8e05f96d6217c7d
2019-04-03 14:43:03 -07:00
Patrice Arruda
ad0315089c Soong: Add synopsis to vndk_prebuilt_shared module under cc package.
Added vndk_prebuilt_shared synopsis.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis
      was added to the vndk_prebuilt_shared module.

Change-Id: Id40246de65985b8b3b357744083c1d32c872e2ff
2019-04-03 09:07:51 -07:00
Josh Gao
87fd9dec38 Revert "Enable lld for windows"
am: 61166dc047

Change-Id: Ib2088c56f593472c41efcf69ef0ae309db95cd9a
2019-04-02 20:45:04 -07:00
Josh Gao
61166dc047 Revert "Enable lld for windows"
This reverts commit 3c21c0b1d9.

Reason for revert: appears to break AdbWinUsb.dll usage by fastboot (and adb?)

Bug: http://b/129420419
Bug: http://b/110800681
Change-Id: I36d6d87f2e830e08e257ab42d470e49cdbb95819
2019-04-03 00:59:14 +00:00
Vic Yang
db1cb10a50 Blacklist more libraries from no-vendor-variant VNDK
These VNDK libraries did not have both core and vendor variants built
for the cuttlefish target when I initially build the list, and thus
they were missed.  Add them back.

Bug: 119423884
Test: Build walleye with no-vendor-variant VNDK enabled.
Change-Id: If446256251eb2e185b0cdba95ce5c1e4f1fb8820
2019-04-02 13:10:23 -07:00
Colin Cross
a9ff20226e Skip failing test on mac
am: 9a4f3f7ea8

Change-Id: Ic9475bef508ba636528d17db5e17d739a734232b
2019-04-02 10:25:40 -07:00
Colin Cross
9a4f3f7ea8 Skip failing test on mac
Tests with cc_binary_host fail on mac, disable for now.

Bug: 129763458
Test: TestProto
Change-Id: Icea24ac6ffba4c5c047296cb3997a5efa95e16ee
2019-04-02 10:02:04 -07:00
Colin Cross
91c063cfdc Add support for protoc plugins
am: fe17f6f0e8

Change-Id: I7dabf4b788925fce8b477eb3c7f9e90a5f986945
2019-04-02 09:55:06 -07:00
Colin Cross
61918685aa Move proto compilation to RuleBuilder
am: 19878da6a0

Change-Id: I44eed0735702ea6fbef57753d8eec078ad3a131e
2019-04-02 09:54:59 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Patrice Arruda
57522e4123 Merge "Soong: Add synopsis to cc_prebuilt_* modules."
am: 6e1c3faed5

Change-Id: I57ffbbe82c03113fffbc2fa766f8a4517d684cb7
2019-04-02 08:16:04 -07:00
Patrice Arruda
3554a98e4f Soong: Add synopsis to cc_prebuilt_* modules.
Added synopsis to the following modules under cc package:
    * cc_prebuilt_binary
    * cc_prebuilt_library_shared
    * cc_prebuilt_library_static

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I2ec284eb600f28d5c7f00254f441a3cc5fb684cc
2019-04-01 17:25:41 +00:00
Colin Cross
0a31c21da0 Merge "Restat clang linker outputs"
am: 51e265c5dd

Change-Id: I7f95695550cc51a5043cecab62f7907dffe1ef82
2019-03-31 11:55:47 -07:00
Colin Cross
36ae135434 Restat clang linker outputs
clang -Wl,--out-implib doesn't update its output file if it hasn't
changed, always restat the outputs.

Fixes: 129553377
Test: m checkbuild && m checkbuild
Change-Id: I2cb19e1b8280fd69c8a9b2143f55760ec05630f8
2019-03-30 00:03:24 +00:00
Pirama Arumuga Nainar
865ad54f90 Include libprofile-extras to all coverage variants
am: 65c95ff1fb

Change-Id: I74057c0921eaa76c8016d0bb8f81abaf0eb50ed8
2019-03-29 09:17:15 -07:00
Pirama Arumuga Nainar
312b5f4407 Refactor coverage support
am: ee30d5e132

Change-Id: I859c7e6c535f1d99d26fa8148bc24a930933cd39
2019-03-29 09:17:04 -07:00
Pirama Arumuga Nainar
65c95ff1fb Include libprofile-extras to all coverage variants
Bug: http://b/128524141

Include libprofile-extras (defined in system/extras/toolchain-extras) to
all modules that need a coverage variant.  Also add
'-uinit_profile_extras' when linking with coverage.  This causes the
setup code in libprofile-extras to be linked into binaries/libraries
with coverage enabled.

We add the static library to the non-coverage variants as well but is a
no-op for them (since the '-u...' flag is not added for them).

Adding this dependency creates several circular dependencies since
coverage variants were being created for other module types that never
had any compilation or linking done during the build.  This change stops
creating coverage variants for toolchain_library, cc_prebuilt_library_*,
cc_library_headers module types (by adding a function to the linker
interface to specify whether native coverage is enabled).

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Test: blueline_coverage target in internal branch (using forrest)
Change-Id: I5db876eb953639a55ba007248dd24e497f987730
2019-03-29 08:56:42 -07:00
Pirama Arumuga Nainar
ee30d5e132 Refactor coverage support
Bug: http://b/128524141

The goal is to add a static library (libprofile-extras) to modules that
require coverage.  Since the coverageMutator is a post-deps mutator, the
results of the coverageMutator are not available when the dependencies
get constructed in deps().  This change moves the detection from the
coverageMutator to begin().

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=*
Test: blueline_coverage target in internal branch (using forrest)

Change-Id: I4e7c8b31ed5060642c6218ea33c532a0f6619967
2019-03-29 08:56:42 -07:00
Patrice Arruda
3a537940a7 Merge "Soong: Add synopsis to cc_library_* modules"
am: bcf9408e44

Change-Id: Ifb84210b4c15c1b3aef011677e4938cbbd200f9b
2019-03-29 08:32:03 -07:00
Patrice Arruda
bcf9408e44 Merge "Soong: Add synopsis to cc_library_* modules" 2019-03-29 15:21:21 +00:00
Yi Kong
16bb6c063d Merge "Move -Wno-inconsistent-missing-override to ClangExtraCflags"
am: 2e03bb7296

Change-Id: I293a0167fcbdb240b31a9a53d9cc29c8acc20cf5
2019-03-28 15:49:14 -07:00
Yi Kong
2e03bb7296 Merge "Move -Wno-inconsistent-missing-override to ClangExtraCflags" 2019-03-28 22:37:47 +00:00
Patrice Arruda
83c89e0f4e Soong: Add synopsis to cc_library_* modules
Added synopsis to the following modules under cc package:
   * cc_library_static
   * cc_library_shared
   * cc_library
   * cc_library_host_static
   * cc_library_host_shared
   * cc_library_headers

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
added to each of the module.

Change-Id: I4d9bb622dc75aad9ea1b9f331c80ed56ddbc9a15
2019-03-28 10:36:26 -07:00
Inseob Kim
93079643a1 Merge "Remove libbase dependency of sysprop_library"
am: 9e50e6955f

Change-Id: I32144aef537c89ff0a623cb4e3ceaf8acff12b4d
2019-03-27 20:11:29 -07:00
Treehugger Robot
9e50e6955f Merge "Remove libbase dependency of sysprop_library" 2019-03-28 03:01:27 +00:00
Yi Kong
4d048d5972 Move -Wno-inconsistent-missing-override to ClangExtraCflags
So that projects can override the flag through cflag (CPPFlags are
appended after CFlags).

Test: m checkbuild
Change-Id: Ib72f4ed4731f41982a0eb8a90c782c09810aa8c9
2019-03-27 18:26:22 -07:00
Yi Kong
2692cfac0d Merge "Turn on new pass manager for PGO projects"
am: edd7fdd891

Change-Id: Ic7eec8832d1397f741a579121ad8ad73bbf75189
2019-03-27 15:55:47 -07:00
Patrice Arruda
3f056b869d Merge "Soong: Add synopsis to cc_object module."
am: 5c45f684dd

Change-Id: Ic48e0d6800d3e0a00f45d72a6c5994fa3414281c
2019-03-27 15:55:17 -07:00
Yi Kong
edd7fdd891 Merge "Turn on new pass manager for PGO projects" 2019-03-27 22:44:31 +00:00
Patrice Arruda
5c45f684dd Merge "Soong: Add synopsis to cc_object module." 2019-03-27 22:38:28 +00:00
Yi Kong
09836cfa49 Merge "Switch to clang-r353983b"
am: ac7f27eab0

Change-Id: I1925ea786ce8d122cb3bffebae9824f5f4e7efaf
2019-03-27 08:55:16 -07:00
Yi Kong
ac7f27eab0 Merge "Switch to clang-r353983b" 2019-03-27 15:52:05 +00:00
Nikita Ioffe
cc92d0203f Merge "Add support for clang-tidy -warnings-as-errors in Android.bp files"
am: ca57e57837

Change-Id: I8545d90aeb6eeea40a455b413796f428be9724c9
2019-03-27 03:26:03 -07:00
Nikita Ioffe
ca57e57837 Merge "Add support for clang-tidy -warnings-as-errors in Android.bp files" 2019-03-27 10:18:15 +00:00
Inseob Kim
1f959769f3 Remove libbase dependency of sysprop_library
libbase dependency is not really needed, but it has been causing build
failure while linking with static variant of sysprop_library. This cuts
the dependency and only depend on libbase_headers and liblog.

Bug: 129301987
Test: 1) flash and boot walleye
Test: 2) try to build various properties with sysprop_library.
Test: 3) sysprop_test
Change-Id: I027e01c754b782818f52103184301267d4cdd576
2019-03-27 17:27:05 +09:00
Yi Kong
5d7aeeac24 Switch to clang-r353983b
Test: TreeHugger
Bug: 122993569
Bug: 128427449
Bug: 128937182
Bug: 128973188
Change-Id: I300efbbad47973d265f636645b83dad0c4d6630a
2019-03-27 02:09:40 +00:00
Nikita Ioffe
32c4986268 Add support for clang-tidy -warnings-as-errors in Android.bp files
Test: manually change Android.bp and checked clang-tidy invocation cmd
Change-Id: I51a64b3f7da82428b896f46f739c93d76a050aaf
2019-03-26 20:47:08 +00:00
Patrice Arruda
baff0ce5e4 Soong: Add synopsis to cc_object module.
Added synopsis to the cc_object module.

Bug: b/128337482
Test: Generated the documentation and verified that the synopsis was
properly added.

Change-Id: Icba4522a3aafa1b8b8a0b780d111f8b48cbdd270
2019-03-26 13:41:28 -07:00
Patrice Arruda
97d123fc9f Merge "Soong: Add synopsis to several modules under cc package."
am: 0aad00631a

Change-Id: I23d31ee45bdf4067bc1a2d111d69f44e7a15e65a
2019-03-25 20:53:23 -07:00
Treehugger Robot
0aad00631a Merge "Soong: Add synopsis to several modules under cc package." 2019-03-26 03:39:13 +00:00
Yi Kong
7fc090bd63 Merge "Support LLD ThinLTO cache/threshold option"
am: ff58c0e248

Change-Id: I8f874371ed10da26a3ae7ad739fb4e26b9c96719
2019-03-25 17:15:41 -07:00
Yi Kong
ff58c0e248 Merge "Support LLD ThinLTO cache/threshold option" 2019-03-26 00:02:36 +00:00
Sasha Smundak
1939abdb9f Treat stl: "system" the same way as default.
am: fc22e4eeba

Change-Id: I1fee3988c762cdd31d7d8cc9a24c4240eaa5b4fb
2019-03-25 11:09:09 -07:00
Patrice Arruda
c249c718ab Soong: Add synopsis to several modules under cc package.
Added synopsis to the following modules under cc package:
    * cc_binary
    * cc_binary_host
    * cc_defaults
    * cc_genrule
    * cc_test
    * cc_test_host

Bug: b/128337482
Test: Generated the documentation and verified that the
synopsis was added to each of the module.

Change-Id: I23b7eda449c340783d7cc592df5d2bd399255bf9
2019-03-25 14:21:29 +00:00
Sasha Smundak
fc22e4eeba Treat stl: "system" the same way as default.
Test: verify that adding `stl: "system"` does not change the module
build.

Change-Id: I55fbde223e4a4695df7524213e1bf3671da84e8e
2019-03-24 14:17:56 -07:00
yelinhsieh
7408bd6dc1 Merge "ATest: GTest auto gen config support run_test_as in Android.bp ."
am: 789b84b12f

Change-Id: I87f3520d5bda43abde35246cd6a300f7292d7061
2019-03-23 07:53:22 -07:00
yelinhsieh
9fc6040efe ATest: GTest auto gen config support run_test_as in Android.bp .
Feature request from developer, support setting uid in Android.bp.

This relands I5604af5f20c45728d19f4c01396a20a74997f8a8 on top of
I2210c15b84f9b30e1cc23b426d463b34cf9ef94f.

Bug: 113359343

Test: source build/envsetup.sh ; lunch
    vim platform_testing/tests/example/native/Android.bp
    add
    test_options: {
        run_test_as: "1234",
    },
    in cc_test
    make hello_world_test
    cat out/target/product/xxxx/testcases/hello_world_test/hello_world_test.config
    Will see  <option name="run-test-as" value="1234" />
    below <test class="com.android.tradefed.testtype.GTest" >

Change-Id: I0b167c44c00ff0eab51443fc93dd8fa2abbe54cf
2019-03-23 04:42:48 +00:00
Yi Kong
630b960fb5 Support LLD ThinLTO cache/threshold option
LLD has different option syntax for specifying ThinLTO cache. Change it
to LLD syntax and drop the support for GOLD, since there aren't many
projects that are linked with it.

Test: USE_THINLTO_CACHE=true m
Change-Id: I5c6c5281a05793414a6387d52ae48d9b43822ee9
2019-03-22 21:32:45 -07:00
Peter Collingbourne
15f0586f86 Merge "Pass -fsanitize-hwaddress-abi=platform when building with hwasan."
am: df59655fa3

Change-Id: Ib441f3fde7714feb4671d039a9b8ed4d9994ddfe
2019-03-21 19:32:16 -07:00
Yi Kong
69c1ed91d8 Turn on new pass manager for PGO projects
With new pass manager, dex2oat benchmark showed 1.61% performance
improvement though binary size saw an increase of 3.37%.

For Googlers, detailed benchmark results are in go/android-pgo-npm.

Test: m checkbuild
Bug: 118894695
Change-Id: I1687886acac7f61e67265a9c73997fb241ad31e6
2019-03-21 23:43:42 +00:00
Peter Collingbourne
e726ba56ac Pass -fsanitize-hwaddress-abi=platform when building with hwasan.
Reduces size of walleye_hwasan-userdebug system.img by another 4.5MB.

Bug: 122363025
Change-Id: I6d15c237dc5f330ad574a73147b2b2c712fe125e
2019-03-21 16:22:00 -07:00
Vic Yang
409b1d2375 Add support for no-vendor-variant VNDK
am: efd249e62a

Change-Id: I14b2a2ea2e613949f4f4394e58784ad1f54a8d3f
2019-03-20 21:40:07 -07:00
Vic Yang
efd249e62a Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed.  Since not all VNDK libraries will be
ready for this, we keep a list of library names in cc/vndk.go to
indicate which libraries must have their vendor variants always
installed regardless of whether no-vendor-variant VNDK is enabled.

Also add --remove-build-id option to the strip script to facilitate
the check of functional identity of the two variants.

Bug: 119423884
Test: Add a dummy VNDK library and build with
      TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding
      build/make change.

Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
2019-03-21 04:29:24 +00:00
Yi Kong
abc025924a Merge "Turn on string-plus-int warning"
am: 5a3f31b284

Change-Id: I6e0e6a5a5d57a257edd3a62e89bf173b935abb4b
2019-03-20 14:47:14 -07:00
Yi Kong
5a3f31b284 Merge "Turn on string-plus-int warning" 2019-03-20 21:33:46 +00:00
Pirama Arumuga Nainar
74eef36e44 Enable lld for windows
am: 3c21c0b1d9

Change-Id: Ib45b147ca91af7d43b65576ed5b416f8b1b31aff
2019-03-20 14:22:49 -07:00
Pirama Arumuga Nainar
3c21c0b1d9 Enable lld for windows
Bug: http://b/110800681

The following flags that the binutils linkers support are not available
in lld for Windows:
  -soname
  --no-undefined
  -rpath

Windows also uses "import libraries", which are stub libraries used only
for linking.  The binutils linkers accepted a DLL and treated them as an
import library.  But lld issues the following error:

  lld-link: error: ...DLL: bad file type. Did you specify a DLL instead
  of an import library?

To resolve this, pass '-out-implib=libFoo.a' to lld when linking
libFoo.dll.  Add libFoo.a as an implicit output to the 'ld' build rule.

Rewrite the shared libraries for a library/binary to use the import
library instead of the DLL.  As a side-effect, this also (correctly)
uses the AdbWinApi.a that's alongside
development/host/windows/prebuilt/usb/AdbWinApi.dll

Test: Run Windows tests (go/android-llvm-windows-testing) and check
absence of regressions.

Change-Id: I15a178589aa6882caa6e7e38650cc6ef48109764
2019-03-20 21:07:47 +00:00
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