Commit graph

711 commits

Author SHA1 Message Date
Jiyong Park
073a53d177 Merge "make libprotobuf-cpp-* libs VNDK" am: cd46573189 am: e56c17d779
am: 2fc3e30205

Change-Id: Ie5614a40dc29bfc98db3c107e9f5f02af3712afe
2017-04-21 07:57:01 +00:00
Treehugger Robot
cd46573189 Merge "make libprotobuf-cpp-* libs VNDK" 2017-04-21 07:46:20 +00:00
Dan Willemsen
4e9e5d526c Merge "Rewrite link type checking" am: e4d92ef568 am: d76aaed983
am: e834d5f059

Change-Id: I02342b80077a7e1e36e61d1f9384d3b104a982c1
2017-04-20 15:15:19 +00:00
Jiyong Park
c8f57d92ff make libprotobuf-cpp-* libs VNDK
libprotobuf-cpp-* libs are VNDK, However, since the '.vendor' prefix is
added before libprotobuf-cpp-* libs are added to my-*-libraries by
LOCAL_PROTOC_OPTIMIZE_TYPE, the clients are still linked against to the
platform version of the protobuf libs. As a result, link type error
occurs.

In order to avoid this, '.vendor' prefix is appended after
my-*-*libraries are all updated.

Test: normal build successfull
Test: add vendor_provided:true to libprotobuf-cpp-* and build successful
with BOARD_VNDK_VERSION=true

Change-Id: I1ed7978f03e0db56b4cbee86e286c0787f7a3afc
2017-04-20 15:41:51 +09:00
Dan Willemsen
b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00
Vishwath Mohan
f1760bde83 Merge "Make PIC/PIE levels compatible for LTO." am: 4be1d8823e am: dc8469e858
am: 648a3380e2

Change-Id: I0ddd3324811be38846da7076dceea77e43cc0fe7
2017-04-18 02:06:07 +00:00
Vishwath Mohan
c3b255622d Make PIC/PIE levels compatible for LTO.
The build system currently uses -fPIC for position independent
libraries, and -fpie for position independent executables. However,
these levels are incompatible and conflict when an executable includes
a static lib with the -fPIC flag - such as when building with
LTO. This CL changes the flag for executables to the compatible -fPIE
instead, which is equivalent for all architectures except PowerPC.

Bug: 30227045
Test: ENABLE_CFI=true m -j40 checkbuild # builds and boots
Change-Id: Ieb20bc2528300d88ff05e8787c5840ab6f03fb38
2017-04-17 16:16:33 -07:00
Dan Willemsen
bfdfb66954 Merge "Support split /system and /vendor modules from Soong" am: 4e789c2e57 am: 9fc091f756
am: 6ac7ce63e5

Change-Id: I66f86a4215010f0861ea77ee53a5db7fb3153c90
2017-04-12 00:21:59 +00:00
Dan Willemsen
9d2b3280e8 Support split /system and /vendor modules from Soong
Soong modules may be split into both /system and /vendor variants.
Ensure that Make libraries link against the correct version based on
whether LOCAL_USE_VNDK is set.

Bug: 36426473
Bug: 36079834
Test: build-aosp_arm64.ninja files are the same before/after
Test: attempt building with BOARD_VNDK_VERSION:=current
Change-Id: I229bc290373743406275f3ca16081eae04c27987
2017-04-10 15:54:50 -07:00
Dan Willemsen
864955d152 Merge "Add LLNDK support for the VNDK" am: 2d6e79d268 am: 67eb8bb766
am: 7bc488c0ec

Change-Id: I6717b28deac9e8fea5bcfe53885aeea90ca04732
2017-04-07 21:39:01 +00:00
Dan Willemsen
ffa3258f6c Add LLNDK support for the VNDK
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Change-Id: I0197f44c91218c73b9567a05320c91a2baaae39b
2017-04-07 21:21:24 +00:00
Dan Willemsen
2a8a39398b Add LOCAL_EXPORT_CFLAGS for Soong
This lets Soong pass -isystem or -I as necessary (or potentially, even
other cflags in the future).

This is not available for Android.mk use, nor exposed directly to
Android.bp users.

Test: m -j
Merged-In: Id37d4692d5fbddce467bd777903b20169f44dd6e
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 03:36:00 +00:00
Dan Willemsen
05909fae9f Add LOCAL_EXPORT_CFLAGS for Soong
This lets Soong pass -isystem or -I as necessary (or potentially, even
other cflags in the future).

This is not available for Android.mk use, nor exposed directly to
Android.bp users.

Test: m -j
Change-Id: Id37d4692d5fbddce467bd777903b20169f44dd6e
2017-04-05 01:04:18 +00:00
Dan Willemsen
51ad7f244e Merge "Ensure that BOARD_VNDK_VERSION is current" am: 4ef5040cc3 am: a71a8c0ae3
am: 5148a458a2

Change-Id: I6c953a8085f7f33a84b99c1ad5359a8bf8cb8921
2017-03-29 04:45:05 +00:00
Dan Willemsen
2c3289bf37 Ensure that BOARD_VNDK_VERSION is current
BOARD_VNDK_VERSION controls which version of the VNDK is used for the
build. We only support compiling against the current VNDK, and we don't
support installing old prebuilt VNDK libraries yet, so ensure this
variable is set to "current".

Once we support installing old prebuilt VNDK libraries, we'll also need
to disable building modules that use the VNDK.

Test: build-aosp_arm.ninja is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Test: Set BOARD_VNDK_VERSION := invalid
Change-Id: Ic26c9f44e356a0734f522b4538cb866d5b901d43
2017-03-27 22:55:21 -07:00
Sen Jiang
67b7aaab7d Merge "Remove DBus support." am: cf858d873b am: efcda5173d
am: 3d6b408aea

Change-Id: I183f58049ef63ce8f6bfbd67554199878b7a69cb
2017-03-03 21:02:37 +00:00
Sen Jiang
d1f397e8b4 Remove DBus support.
external/dbus and external/dbus-binding-generator was removed from
the manifest.

Bug: 31602715
Test: make checkbuild
Change-Id: Iea0277720acad8ac0fa630b8745f90fb3c3b5f00
2017-03-02 18:00:21 -08:00
Ryan Campbell
8beb26d5cb Merge "Use c and cpp objects for gcov." am: d579b8eb1f am: 425bbada28
am: 74ec2776e8

Change-Id: Ibc591b89c7c674dd9afaa98acff994eec2faa2fd
2017-03-01 03:14:53 +00:00
Ryan Campbell
5a6ea36cb8 Use c and cpp objects for gcov.
Instead of using all_objects and translating .o to .gcno, use
cpp_objects, gen_cpp_objects, c_objects, gen_c_objects, objc_objects,
and objcpp_objects. Fixes bug with .s files breaking coverage builds.

Bug: 35843991
Test: lunch sailfish-userdebug && make -j60 NATIVE_COVERAGE=true
COVERAGE_PATHS="vendor/google_devices/marlin/proprietary/mm-camera/mm-camera2"
Change-Id: Ib2f8eef889f075ec82f79d8c3ae0fe31962b653d
2017-02-28 16:29:06 -08:00
Ryan Campbell
dbe80a6445 Merge "Support path exclusion for native coverage." am: e317a2d19e am: 26a4ce0b65
am: ab93845a78

Change-Id: I94106f8b4f9f40dd3cac9fafa5f2d23931975acd
2017-02-28 02:15:26 +00:00
Treehugger Robot
e317a2d19e Merge "Support path exclusion for native coverage." 2017-02-28 02:06:57 +00:00
Ryan Campbell
b55ff74713 Support path exclusion for native coverage.
Specify list of paths to exclude from coverage instrumentation.

Test: make NATIVE_COVERAGE=true COVERAGE_PATHS=hardware/interfaces
COVERAGE_EXCLUDE_PATHS=hardware/interfaces/graphics
Bug: 35769817

Change-Id: I3747fdddb381101b9ebf51909b9686e820148aad
2017-02-27 09:09:16 -08:00
Josh Gao
5794e3baac Merge "Statically link libwinpthread into windows binaries." am: 61d68b6152 am: aa19e7a2bb
am: f1ed0fb048

Change-Id: Ia1cb660fb8fee069884d4c42ded3a9ec1b002684
2017-02-24 21:14:27 +00:00
Josh Gao
4d9268e704 Statically link libwinpthread into windows binaries.
Statically link libwinpthread.a, so that we don't have to ship a
libwinpthread dll with all of our windows exectuables.

Bug: http://b/31665213
Test: wine adb.exe
Test: wine fastboot.exe
Change-Id: I96414e980d8894f8f6a58c1c7bbd9dc5e0f5169c
2017-02-23 17:56:44 -08:00
Dan Willemsen
dc750c31ca Merge "Add Header Library support to Make" am: 4f794fdd50 am: ea2687fab6
am: 4a78c9e50f

Change-Id: I711c810cef8487c2d8e7b53deb9ccaad89592b1d
2017-02-18 06:22:20 +00:00
Dan Willemsen
8dae49c5e1 Add Header Library support to Make
We currently use static libraries without any source files to represent
header libraries, but Soong actually has cc_library_headers. So to
export those in a separate namespace from static libraries, implement
them in Make as well.

This also adds a nice pretty-warning / pretty-error macro that can be
used to print out standard warning messages pointing to the real source
file having the problem.

Test: Use a header library exported by Soong in a Make module
Change-Id: I3486539e247524cb82a20620745fc7be03014e14
2017-02-15 16:04:49 -08:00
Dan Albert
8791fe60d0 Merge "Add c_std and cpp_std properties." am: 220ca4d04b am: 66496c4b96 am: 492a5ff3eb
am: 3bb28719cf

Change-Id: Ifbe68f1cca96b8205f52ac30277a0a454f9c8b8b
2017-02-06 19:29:16 +00:00
Dan Albert
76bfcd4ab2 Add c_std and cpp_std properties.
Test: Checked showcommands ouput for each setting.
Bug: None
Change-Id: Ibc25f3977eaaecfd1fb99a27c9e15acae0ec4106
2017-02-03 16:43:06 -08:00
Evgenii Stepanov
a620b36458 Merge "Run $(AR) with LLVMgold.so plugin for CFI targets." am: 96c81711c1 am: e729e804fe am: 629002835a
am: d79d664dc9

Change-Id: Ia2d4f0a4748f3e7964d384e58c386c8678f810c4
2017-01-24 21:00:40 +00:00
Evgenii Stepanov
e1b96f3ae5 Run $(AR) with LLVMgold.so plugin for CFI targets.
Bug: 34623182
Test: add LOCAL_SANITIZE:=cfi to some static libraries under libstagefright
Change-Id: I4f0d8cbd794e0ce4737c59a4617e93c7a5defec1
2017-01-23 17:02:22 -08:00
Jean-Luc Brouillet
8471aa9d46 Merge "Move rs/scriptc to rs/script_api/include." am: a3ab4cc9c9 am: d9bfeff242 am: 235123a821
am: 128cebe6fe

Change-Id: I701bc6cb7cadb16d770b77e4a161994de278e142
2017-01-11 02:27:31 +00:00
Jean-Luc Brouillet
eba449391e Move rs/scriptc to rs/script_api/include.
Test: Compiled ImageProcessing_jb

Change-Id: Icf05a603671499665d2f31a8989fa69585a6f834
2017-01-08 17:57:48 -08:00
Dan Willemsen
3e9bcf40af Merge "Identify non-local EXPORT_C_INCLUDE_DIRS in soong_to_convert" am: d3cc4950f8 am: bfedf05812 am: 4d08538747
am: fbab4c206f

Change-Id: Ifec04ee64f5b8227337e2d4c7001831dba71a7e9
2016-12-15 01:00:41 +00:00
Dan Willemsen
0be6907b2b Identify non-local EXPORT_C_INCLUDE_DIRS in soong_to_convert
Soong only supports exporting include directories under the current
directory. So bring non-local directories up as a potential problem in
soong_to_convert.txt

Test: m -j $OUT/soong_to_convert.txt, inspect
Change-Id: I7a15b92e10a1d8b8d3496c6f0529a0d0824f301e
2016-12-13 18:29:59 -08:00
Dan Willemsen
7cbe3bd688 Merge "Remove aidl, proto, objc from soong_problems" am: bbc072f716 am: 55b1651181 am: 35ab684f8e
am: 5b8f1db905

Change-Id: I1ba30e935af457bb4015b1aec9605a2c517bd05f
2016-12-06 02:45:26 +00:00
Dan Willemsen
a1c3183455 Remove aidl, proto, objc from soong_problems
We support these in Soong now, so stop marking them in soong_to_convert.

Test: Compare soong_to_convert.txt
Change-Id: I89befdfd8c4eaa04ab626d8be090765a1b879d8b
2016-12-05 16:38:14 -08:00
Dan Willemsen
2c412e9c92 Prohibit host modules from using LOCAL_COPY_HEADERS am: 6e51ef61a7 am: dc556b4bc0 am: 6e0c0da5dc
am: 7dd10c1085

Change-Id: I9d7b9721ae471c5f2a57b2ff49006b701fdfb49b
2016-11-29 20:59:13 +00:00
Dan Willemsen
a45af9e63c Add basic VNDK support in Make am: bab0fa6928 am: 323efd3035 am: 2e300cdb70
am: f987fa38a2

Change-Id: I4e43bb2127e646532d67a9d7350b01c84f51734c
2016-11-29 20:59:06 +00:00
Dan Willemsen
6e51ef61a7 Prohibit host modules from using LOCAL_COPY_HEADERS
There are no users left, so remove all of this.

Test: lunch aosp_arm-eng; m -j native
Test: build/tools/kati_all_products.sh on aosp and internal master
Change-Id: I32f5c8b470a43dd203d7e20c192167630e4e6888
2016-11-28 13:46:17 -08:00
Dan Willemsen
bab0fa6928 Add basic VNDK support in Make
Add BOARD_VNDK_VERSION and LOCAL_USE_VNDK to specify the version of the
VNDK that will be used globally, and whether to use the VNDK on a module
basis.

If the board is using the VNDK:

* LOCAL_COPY_HEADERS may only be used by modules defining LOCAL_USE_VNDK
* LOCAL_USE_VNDK modules will compile against the NDK headers and stub
  libraries, but continue to use the platform libc++.
* LOCAL_USE_VNDK modules will not have the global includes like
  system/core/include, but it will use device-specific kernel headers.

This change does not attempt to enforce any linking constraints, that
will come in a later patch.

Test: out/build-aosp_arm.ninja is identical before/after
Change-Id: Icce65d4974f085093d500b5b2516983788fe2905
2016-11-28 13:46:17 -08:00
Dan Albert
4bf74cdcb2 Merge "Support LOCAL_SDK_VERSION := current for NDK." am: c7d2fe614e am: 6cac9ba834 am: 1cb992bc8e
am: a7019e2493

Change-Id: I4573c205d92f659d4a72a64fe87f957605a57f70
2016-11-18 19:20:08 +00:00
Treehugger Robot
c7d2fe614e Merge "Support LOCAL_SDK_VERSION := current for NDK." 2016-11-18 19:04:40 +00:00
Dan Willemsen
2c0c8d89ac Merge "Use new -ninja flag to aidl-cpp" am: 7d4c926ed7 am: 676610e090 am: bcb8dfe2b2
am: 31488c301b

Change-Id: I779d280bf82171e2e4579ec2cdb0784eda596d79
2016-11-13 20:22:18 +00:00
Dan Willemsen
fb84281342 Use new -ninja flag to aidl-cpp
This make aidl-cpp write out a dep file that ninja parses correctly.

Test: Manually inspect ninja depfile
Change-Id: I4890a91eb29a6388e17b1ffac23a3dc0ffe6c212
2016-11-13 09:44:25 -08:00
Dan Willemsen
20a9e9f18e Merge "Remove transform-d-to-p" am: da85fecaf1 am: 39826d3cc7 am: 1551f77f83
am: db4c584a67

Change-Id: I85bdc0c4a30681078565be159b7d6b83737d6787
2016-11-11 22:02:57 +00:00
Dan Willemsen
461d844a40 Remove transform-d-to-p
Ninja doesn't need the phony make targets, in fact, the parser doesn't
handle them correctly and ends up duplicating the dependencies. This
shrinks a `m native` deps file from 54M -> 35M on AOSP.

Test: Compare out/build-aosp_angler.ninja before/after
Test: wrote a tool to dump the .ninja_deps, added dedup feature, files
      identical after dedup.
Change-Id: Iec7a9a0739e8678c1f4db79c68e423a39b9aad4b
2016-11-10 21:55:01 -08:00
Dan Albert
988107d35c Support LOCAL_SDK_VERSION := current for NDK.
Test: Added a module using this and checked the link command line.
Bug: None
Change-Id: I3a55e4638340d8835c09ebc6a1440bece962d36e
2016-11-08 15:37:43 -08:00
Dan Willemsen
74550c8b72 Merge "Improve dotdot workaround when src begins with '/'" am: 7918e5121a am: 05b0da9441 am: 371c403fa8
am: f7df136f07

Change-Id: I7d906092c8619cf79a9a07a85ff0e4729cb1851d
2016-10-31 23:51:01 +00:00
Dan Willemsen
c57894c204 Improve dotdot workaround when src begins with '/'
There are some source files in our tree that use some text processing to
find source files, and end up with source file names that look like:

  /../../dir/file.c

This isn't fixed by our dotdot workarounds because the filename doesn't
start with '../', so strip the initial '/' from any source files, since
they are all relative to $(LOCAL_PATH) anyways.

Bug: 32514380
Test: Build internal source with this problem
Test: Compare build-aosp_angler.ninja before/after
Change-Id: If869419c3d3ba35d55f6e19d9332515695e47d24
2016-10-28 16:30:48 -07:00
Colin Cross
342c220531 Merge "Don't pass -Wl,--no-undefined to host targets" am: fe3e1818e5 am: 44d966cf6a
am: 4db457e030

Change-Id: I54550bb97594d2b9949026beb0c4dd2088563c06
2016-10-21 23:15:06 +00:00
Colin Cross
a82fa12c54 Don't pass -Wl,--no-undefined to host targets
Host builds were compiling without -Wl,--no-undefined because of an ASAN
issue.  Pass -Wl,--no-undefined for host builds unless sanitzers are
enabled.  Also fix LOCAL_ALLOW_UNDEFINED_SYMBOLS on darwin, where
disallowing undefined symbols is the default.

Test: m -j host
Test: m -j SANITIZE_HOST=address host
Bug: 32305815
Change-Id: I0344c321610c55eb8b2092b01e50e4a93a0e85df
2016-10-20 16:25:18 -07:00
Colin Cross
fb824ab27e Merge "Use default -std values exported from soong" am: dcd73b5043 am: b03ba67ebc
am: 9fa9e2a4cd

Change-Id: I7209379c041ad4ffd3f53e4404f4e6d49b9567dd
2016-10-20 22:07:34 +00:00
Colin Cross
e56e356c46 Use default -std values exported from soong
Test: builds
Change-Id: Ic7b7d226131a2a0ea1f099f8a0fc895448384081
2016-10-20 14:09:24 -07:00
Ryan Campbell
7a923a4dc1 Merge "Define coverage paths using comma-separated list." am: 8a4b4e8432 am: 96bc733ae9
am: 78055c2bfe

Change-Id: If414c9d2868242e03abf20b2d21e317ffccca677
2016-10-20 01:29:03 +00:00
Ryan Campbell
20f301f4bb Define coverage paths using comma-separated list.
Change COVERAGE_PATHS to access a comma-separated list of paths
instead of a space-separated list to make for easier escaping in
configuration files.

Test: tested using local bullhead build with coverage on lights and nfc
Change-Id: Iec014c8b4fbefcbcc5d865e6acba92bf6364ee3a
2016-10-18 10:25:15 -07:00
Ryan Campbell
47684fdad6 Merge "Fix bug preventing multi-module native coverage." am: 3372ce615a am: 74ef8e0a88
am: 9a0b234763

Change-Id: Ia145ecc5e64abc138baca462c5ca953eb9b19e2b
2016-10-18 01:02:33 +00:00
Ryan Campbell
4a3be3db47 Fix bug preventing multi-module native coverage.
Fix a whitespace bug causing coverage to be enabled on all modules
whenever more than one module is specified. This is caused by
comparing whitespace to the empty string, which are not equal. Fix
by stripping the output to check for path matches.

Test: tested using local build with coverage enabled on NFC, lights
Change-Id: I61a775cfd135f94ea1e1ee9fdbed3c64c5bb1a2e
2016-10-17 15:43:21 -07:00
Chih-hung Hsieh
a9d484ac3a Merge "Add -Werror to compile warning free projects." am: 355e96774b am: 05388b7618 am: 9f82feb9e6
am: a70f8fc5d5

Change-Id: Ia43c8ed7cadbbc90e3199101d1f56a96ad10b5f2
2016-10-13 01:12:47 +00:00
Chih-Hung Hsieh
bab0488828 Add -Werror to compile warning free projects.
* Add -Werror if LOCAL_PATH is in the WARNING_DISALLOWED project list,
  or not in the WARNING_ALLOWED project list.

Test: Build for major targets.
Change-Id: I12235ee1ca1c1837530693699e705e1955275565
2016-10-11 15:38:39 -07:00
Colin Cross
1132b04aba Merge "Enable toc optimization for host builds" am: 5d8c73e373 am: 4276c12d20 am: e4e04c2f92
am: 46e7aa81e0

Change-Id: Id50148e31237e6b9fdf2f795aa2d41233fe2adaf
2016-10-04 21:10:15 +00:00
Colin Cross
d2ff157159 Enable toc optimization for host builds
The toc optimization had been disabled for host builds to ensure that
the timestamp of the final binary changed whenever its implementation
changed, in order to support rerunning host tools that were modified
during incremental builds.  However, only the final install rule must be
re-run to update the timestamp, and not the link rule.

Update the shared library install dependencies to use normal
dependencies instead of order-only dependencies for host modules, and
then enable the the toc optimization for host modules.  If the
implementation of a library changes it will be reinstalled, and
libraries or binaries that depend on it will also be reinstalled.

Bug: 26015464
Test: m -j; touch art/disassembler/disassembler_x86.cc; m -j, verify
      out/host/linux-x86/bin/oatdump is updated
Change-Id: I0a14decc1994eb55ad269d841943aef66e320c63
2016-10-03 17:53:44 -07:00
Dan Willemsen
3fbe1f7327 Merge "Optimize rebuilds by reducing $(shell) usage" am: f009531772 am: 466f4f2b9e am: c1aff754c4
am: 09bd2ae7d8

Change-Id: I3250258380faa279e6533e0eed3d7f12b916a4d3
2016-10-03 21:31:40 +00:00
Dan Willemsen
b011810c25 Optimize rebuilds by reducing $(shell) usage
$(shell) isn't particularly fast in Kati, and they have to be executed
both when reading the makefiles and determining whether the ninja file
needs to be regenerated.

Right now, the regen time is mostly hidden because we run them in
parallel. We've also configured it to ignore any commands that contain
"echo", "date", or the output directory. That happens to remove most
commands that contain side effects, so running them in parallel is fine.

But the side effects contain some important things, like the clean up
necessary when switching products. So I'm removing those filters, and
then we'll need to run the shell commands in sequence, since there will
be side-effects. That makes regen take longer though, so use pure-Make
implementations instead of $(shell) where possible.

This set of changes reduces aosp/master aosp_arm64-eng build $(shell)
usage and time by 2/3:

*kati*: func shell time: 3.135095 / 709
*kati*: func shell time: 1.067331 / 236

Bug: 30947985
Test: Manual test lines for math functions
Test: Compare build-aosp_arm64.ninja before/after
Change-Id: I4fc9d6318957992921972994f277c17918e7e1eb
2016-09-30 21:14:13 -07:00
Dan Willemsen
a5fa6ca7fa Merge "Add LOCAL_EXPORT_C_INCLUDE_DEPS" am: 1c0b5eaf83 am: b1fdb9745f am: b42e166273
am: a7d2992ba3

Change-Id: I4011f484aa2295a7cd42d161370bb4374ed91c58
2016-09-30 01:52:46 +00:00
Dan Willemsen
ba6a164da7 Add LOCAL_EXPORT_C_INCLUDE_DEPS
This shouldn't be necessary for most makefiles, since we add
$(LOCAL_GENERATED_SOURCES) to this already included, but for prebuilts
that aren't actually prebuilts (Soong modules), we need to pass
dependencies so that the generated headers are built before being used.

Bug: 31742855
Test: Use, inspect build-*.ninja
Change-Id: I8d9f675af639d3f40780d48a016fc079a82531c2
2016-09-29 12:08:29 -07:00
Dan Willemsen
2d254448ce Merge "Remove WITH_SYNTAX_CHECK" am: c114bd9dbf am: d640e062e8 am: 28d50c498b
am: a4c82e7b3a

Change-Id: I7f15e1ff7949a0061a387b84000811611e3aa266
2016-09-28 02:00:53 +00:00
Dan Willemsen
e68100e8bb Remove WITH_SYNTAX_CHECK
It's no longer used. The majority of the platform is on clang anyways.

Test: m -j
Change-Id: I4fb4375eaad2469e169d34c47ae3fe2a0540aeec
2016-09-26 17:37:19 -07:00
Keun Soo Yim
949c422dd3 Merge "support vts compile mode flag" 2016-09-22 03:08:43 +00:00
Dan Willemsen
98b277b930 Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de am: 8459bbca6f
am: 83aba3a7ab

Change-Id: I0cca5c1e262c8a8d92858ed5c927e4775c2e3a6e
2016-09-20 03:29:59 +00:00
Dan Willemsen
665cda08f0 Merge "Fix link_type checking" 2016-09-19 21:54:09 +00:00
Dan Albert
222f6b4361 Use libcompiler-rt_extras with NDK builds. am: c28e4bcb1c am: d042352816 am: d7c48e9f9d
am: d11f78fbd5

Change-Id: I63661c6eb5ab5172732bbb60367483cec3eecf8b
2016-09-16 06:56:35 +00:00
Dan Albert
9ef0a8bb26 Always link libdl with libc++ for the NDK. am: 2936a1e84b am: ec6223ec3c am: 7fde1f9c6e
am: 3f0f58a60b

Change-Id: Ic924ff213b2a9c3e847ea721f836b05bbac3bc3e
2016-09-16 06:56:26 +00:00
Dan Willemsen
121e284b46 Fix link_type checking
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
2016-09-15 14:40:39 -07:00
Dan Albert
c28e4bcb1c Use libcompiler-rt_extras with NDK builds.
We want to build things in CTS (things built against the NDK) with
integer overflow checks. Some projects in the tree also make explicit
calls to the overflow checked builtins, and those projects need to be
built with the NDK (external/dng_sdk is the specific example that
brought this up).

Test: make checkbuild tests
Bug: None
Change-Id: Iab27dd0d931f723140de242049fa72f3b1ce0fb8
2016-09-14 16:08:48 -07:00
Dan Albert
2936a1e84b Always link libdl with libc++ for the NDK.
libc++ requires libdl whether it's statically linked or not.

Test: make checkbuild tests
Bug: None
Change-Id: I8abdcfaef779b358196716ab1193cebe278317ac
2016-09-14 16:08:04 -07:00
Ryan Campbell
af2091b217 Merge "Implement path-based enabling of code coverage." am: 1e1ecd5d07 am: 6b92bb4ebb am: 577eab3323
am: 5a63fe6856

Change-Id: I264e7ee9d8139c79fb882f40f1cb6854d2e24a8b
2016-09-14 03:05:55 +00:00
Dan Willemsen
a7919bd18c Merge "Fix building static linux binaries" am: 8bb71cef9f am: 5cf6a4578d am: a4f8d8b2a3
am: 93a0afc749

Change-Id: I374e33412c727a0df4522156db7cd47268e4c1e3
2016-09-14 03:05:52 +00:00
Ryan Campbell
1e1ecd5d07 Merge "Implement path-based enabling of code coverage." 2016-09-13 19:48:34 +00:00
Dan Willemsen
c9aa6fca41 Fix building static linux binaries
BUILD_HOST_static has been broken because I was stripping
-Wl,--start-group/-Wl,--end-group into a separate set of ldflags instead
of keeping them wrapped around some of the ldlibs. So don't pass some of
the build system flags through the ldlibs checker.

Bug: 30898128
Change-Id: I332b42679695cdc5da3cb0036290b6a3544699c0
2016-09-13 17:48:07 +00:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00
Dan Willemsen
8eb4d8589d Merge "Fix libgcov.a dependency" am: f9d5fb97cb am: 4b9f214a7b am: 64deaba889
am: 2277a46756

Change-Id: I57dc91cf9b928b4f1b6661474b653e453e2f9041
2016-09-12 19:42:17 +00:00
Dan Willemsen
7db70a3b0a Fix libgcov.a dependency
Now that Soong is generating libgcov.a, we need a dependency here.

Change-Id: Ie8d97339fd584eed178cc57b9333d38754ab1135
2016-09-12 18:09:20 +00:00
Keun Soo Yim
3c0ffa319c support vts compile mode flag
Change-Id: I05c347851cfc41c617b055209d81318a1a60918e
2016-09-08 20:36:34 -07:00
Chih-hung Hsieh
6afe656b6d Merge "Define DEFAULT_TIDY_HEADER_DIRS." am: 9d66e2c2ef am: 84be3dc50a am: 59ac695071
am: e28fd9f2e4

Change-Id: I40f077e04438e2b3c54887d82a782af460304aa3
2016-09-08 20:42:34 +00:00
Chih-Hung Hsieh
0a33f65cc8 Define DEFAULT_TIDY_HEADER_DIRS.
Let clang-tidy report warnings in header files in the
system and current directories but not the external
and vendor directories.

Test: build with WITH_TIDY=1
Change-Id: I1723b8eb95948961fb7164a19989e0a926e5bf8a
2016-09-06 20:06:28 -07:00
Dan Willemsen
cfa84e90bd Merge "Identify modules ready to be converted to Soong" am: c6bada8acd am: 6596082d00 am: 52438f9fcf
am: b2bf9125f2

Change-Id: Ib249a1cdd546cf3bafed7002ac9e05080f55715d
2016-08-26 23:28:07 +00:00
Dan Willemsen
fc92fb2b9b Identify modules ready to be converted to Soong
The output will be in the `m dist` results as soong_to_convert.txt, or
can be built using:

  $ m $OUT/soong_to_convert.txt

The output is a list of modules that are probably ready to convert to
Soong:

  # Blocked on Module (potential problems)
           283 libEGL (srcs_dotarm)
           246 libicuuc (dotdot_incs dotdot_srcs)
           221 libspeexresampler
           215 libcamera_metadata
               ...
             0 zram-perf (dotdot_incs)

The number at the beginning of the line shows how many native modules
depend on that module.

All of their dependencies have been satisfied, and any potential
problems that Make can detect are listed in parenthesis after the
module:

  dotdot_srcs: LOCAL_SRC_FILES contains paths outside $(LOCAL_PATH)
  dotdot_incs: LOCAL_C_INCLUDES contains paths include '..'
  srcs_dotarm: LOCAL_SRC_FILES contains source files like <...>.c.arm
  aidl: LOCAL_SRC_FILES contains .aidl sources
  dbus: LOCAL_SRC_FILES contains .dbus-xml sources
  objc: LOCAL_SRC_FILES contains Objective-C sources
  proto: LOCAL_SRC_FILES contains .proto sources
  rs: LOCAL_SRC_FILES contains renderscript sources
  vts: LOCAL_SRC_FILES contains .vts sources

Not all problems can be discovered, but this is a starting point.

Change-Id: I45674fe93fd267d4d1fb0bc3bc9aa025e20c5ac6
2016-08-26 13:33:31 -07:00
TreeHugger Robot
a2071052e8 Merge "aux: allow non-clang toolchains for AUX builds" 2016-08-19 17:43:50 +00:00
Alexey Polyudov
65d7a34b85 aux: allow non-clang toolchains for AUX builds
Change-Id: I38fcc0ad66cadd1f6008169fb1c1baea77734695
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-19 09:06:36 -07:00
Chih-Hung Hsieh
34c8c0ac33 Merge "Remove spaces in tidy check list."
am: e7bca12466

Change-Id: I852d42992bc1ddb0a17dd1dcf03cf25f1d114552
2016-08-17 17:48:52 +00:00
Chih-Hung Hsieh
ba646253ce Remove spaces in tidy check list.
This will allow spaces in LOCAL_TIDY_CHECKS.

Bug: http://b/27779618
Change-Id: I6f9b133220e49b2581a06d2fd9083a1d6b7badca
Test: build with WITH_TIDY=1.
2016-08-16 16:27:30 -07:00
Dan Albert
ae49ab2f0f Merge "Add support for NDK r13."
am: 287093a98c

Change-Id: I8e10422cdd20d3ee0402acabbdbe60a41ba59901
2016-08-11 16:52:52 +00:00
Dan Albert
0960770e0d Add support for NDK r13.
Test: make checkbuild
Change-Id: I4521c768c67771cee9df9e59ed45344c40c48a38
2016-08-10 16:05:19 -07:00
Dan Albert
aede8d4912 Merge "Define __ANDROID_API__ when building for the NDK."
am: 30fe7576d0

Change-Id: I4aa349b7293db5e9e7214cdb10a682164214de60
2016-08-06 01:18:58 +00:00
Treehugger Robot
30fe7576d0 Merge "Define __ANDROID_API__ when building for the NDK." 2016-08-06 00:52:33 +00:00
Dan Albert
754790d0a4 Define __ANDROID_API__ when building for the NDK.
Traditionally this has come from android/api-level.h, but with the
libc headers unified it must be set by the build system since we don't
have per-API level copies of that header now.

Test: make checkbuild with other libc ndk_library patches
Change-Id: Idf6cbba131f065b048b1b412e992c55e3d17e701
2016-08-05 16:34:40 -07:00
Dan Albert
db4c597d5f Merge "More NDK generated libs support."
am: bd9fb4ba01

Change-Id: I46e77781702a68bea56691245e04387fc2845b56
2016-08-05 22:35:11 +00:00
Chih-Hung Hsieh
f329021c0f Merge "Make it an error when LOCAL_CLANG is false."
am: 9204b776bb

Change-Id: I7e2e674eb6f79ec7180f801dd12378842b239512
2016-08-05 22:35:10 +00:00
Treehugger Robot
bd9fb4ba01 Merge "More NDK generated libs support." 2016-08-05 22:32:13 +00:00
Chih-Hung Hsieh
2ee4c1abbf Make it an error when LOCAL_CLANG is false.
Only projects in LOCAL_CLANG_EXCEPTION_PROJECTS can set LOCAL_CLANG to false.
Add external/gentoo/integration to this white list.

Bug: 30575506
Change-Id: Icd508686bc2eb8b9d400200166df80115af20da1
Test: build and find new warning in build.log
2016-08-05 11:21:20 -07:00
Dan Albert
c1ca19007f More NDK generated libs support.
Any NDK shared libraries not in LOCAL_SYSTEM_SHARED_LIBRARIES weren't
being pulled from the generated libs before since we were only
filtering my_system_shared_libraries and even if we had filtered
my_shared_libraries they would have been rewritten to my_ldlibs.

* Filter my_shared_libraries for NDK generated libs as well.
* Stop rewriting NDK LOCAL_SHARED_LIBRARIES to my_ldlibs. Instead,
  rewrite in the opposite direction just like we do for the platform.
* Move shared libs/ldlibs rewriting to before we filter NDK
  libraries out of shared libs/system shared libs.

Test: make checkbuild
Bug: http://b/27533932
Change-Id: If1860d9638de77089a46884f406766edaf362216
2016-08-04 15:22:11 -07:00
Chih-Hung Hsieh
f43279a359 Merge "Issue warning on projects with LOCAL_CLANG set to false."
am: e71cdfbdee

Change-Id: Icb5708eb58f3c8e54b60538377b6afba5eb04de5
2016-08-03 16:50:52 +00:00
Chih-hung Hsieh
e71cdfbdee Merge "Issue warning on projects with LOCAL_CLANG set to false." 2016-08-03 16:42:27 +00:00
Chih-Hung Hsieh
d9cd1fafb5 Issue warning on projects with LOCAL_CLANG set to false.
* LOCAL_CLANG_EXCEPTION_PROJECTS is the list of project prefixes.
* New warning message is detected by warn.py as high severity.

Bug: 30575506
Change-Id: I87a38b2ba6bab1d2e5e7a9d5ec9557f0e609727c
Test: build and find new warning in build.log
2016-08-02 16:10:49 -07:00
Alexey Polyudov
755391d77e Merge "introduce AUX build class of targets"
am: 556526bf95

Change-Id: I52b4b3a561ceb9c1fbe71ce75a4ef4aa252a9665
2016-08-02 22:50:21 +00:00
Alexey Polyudov
74e4a83d47 Merge "Make linking with libcompiler_rt conditional"
am: 340c0c5701

Change-Id: Ide7cf834a0d981671f517366f7308c58d2a79163
2016-08-02 22:17:24 +00:00
Alexey Polyudov
ae817d47dd Merge "Do not assume CLANG is used when custom toolchain is provided"
am: 7a16eb05cc

Change-Id: Ib77cdcc52aae822235577c02ea1045e6b6de4096
2016-08-02 22:17:23 +00:00
Alexey Polyudov
1eba5a69eb Merge "Add LOCAL_NO_PIC to disable position-independent code"
am: ce5900a6e0

Change-Id: I471cff0f6c3479f9d34ee82b69c0be742304f70a
2016-08-02 22:17:21 +00:00
Alexey Polyudov
ccdc311b33 introduce AUX build class of targets
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable

Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-02 08:06:28 -07:00
Alexey Polyudov
ee27d813b9 Make linking with libcompiler_rt conditional
introduce LOCAL_NO_LIBCOMPILER_RT
embedded targets do not necessarily want to have it

Bug: 29635686
Change-Id: Ieb04f7ea7237ae01a067dedfa2fb13571e9a789c
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-01 17:38:53 -07:00
Alexey Polyudov
7d6b3f1595 Do not assume CLANG is used when custom toolchain is provided
When overriding toolchain with LOCAL_CC, LOCAL_CXX
build system shall not assume that this custom toolchain
is CLANG.

Bug: 29635686
Change-Id: I9712d098216740c4ff20bd2a4749f489af85b50e
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-01 17:37:56 -07:00
Alexey Polyudov
cbb038c8e8 Add LOCAL_NO_PIC to disable position-independent code
on some toolchains and architectures building non-PIC
code renders more efficient assembly

Bug: 29635686
Change-Id: I6274f40d24e1bb43f03b45c60b5487abed02b7fc
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2016-08-01 17:37:09 -07:00
Colin Cross
b3399931a5 Merge \"Don\'t depend on a phony target\"
am: 90cd97fd11

Change-Id: I185be0ffd30561125bcbc39c19429ae44e964bb8
2016-07-30 02:06:41 +00:00
Colin Cross
723b37e910 Don't depend on a phony target
Phony targets are always dirty, depend on the ndk.timestamp file instead
of the ndk phony rule.

Change-Id: I8a90e61a1a79861af59f66f3bc0fdeecd0819992
2016-07-29 15:09:40 -07:00
Dan Albert
01efd46bca Merge changes from topic \'soong-sysroots\'
am: 65de8e446c

Change-Id: I8c8951364c5ddd6f99a27111acdb72097ab5db42
2016-07-28 16:06:24 +00:00
Dan Albert
02bf138d64 Use the just built NDK headers and libs.
The list of libraries is currently empty. Will add migrated libraries
in a follow up patch.

Test: Still builds.
Bug: http://b/27533932
Change-Id: Ibd9750620ca2ae86fe888a8a993bd26493bc1c8a
2016-07-28 00:06:19 -07:00
Colin Cross
768291a37c Merge \"Split -isystem headers into separate variables\"
am: 921be36569

Change-Id: Icd539e53caa9ad55e900b394c6005bb3606dce70
2016-07-21 17:58:10 +00:00
Colin Cross
23ba612aad Split -isystem headers into separate variables
Split the variables that contain header directories into ones that
should be prefixed with -isystem and ones that should be prefixed with
-I in preparation for moving some headers from -isystem to -I.

Add $(wildcard) around SRC_HEADERS to match the soong behavior, and move
users of SRC_HEADERS from config.mk to binary.mk so that the exported
soong value is present.

Test: no changes to build.ninja compile rules
Change-Id: Iadecbbf4351a01e53cb57e721d31f4f836bb82d9
2016-07-20 23:09:29 -07:00
Colin Cross
17904fabbf Merge \"Factor out common include directories into helper\"
am: 95fa32b577

Change-Id: I720d7c02de3d11b4a5a3328946433aa7274f1bb6
2016-07-20 21:24:29 +00:00
Colin Cross
e25fd79337 Factor out common include directories into helper
Refactor includes in transform-*-to-o to simplify future changes to the
default include paths.

Test: whitespace-only changes to the compile rules in build.ninja
Change-Id: I766af1f22a4838d933691b6df37530db3ba4e21d
2016-07-19 15:09:50 -07:00
Dan Willemsen
95d3b735b6 Merge \"Turn ndk link check warning into error\"
am: 32ebe53d01

Change-Id: I89ff2a720b27a288b9f64412dd213d7019ffca66
2016-07-12 21:19:46 +00:00
Dan Willemsen
ac1fe5c8b2 Turn ndk link check warning into error
All instances of this have been removed from the downstream trees. The
APK->JNI_SHARED_LIBRARY and Java->Java checks remain as warnings.

Change-Id: I3eaee284500deee0f26a4f9cdd96497e99ec533e
2016-07-12 13:10:31 -07:00
Dan Willemsen
90f03ecfee Merge \"Turn unused source files from warning to error\"
am: 73609480b3

Change-Id: Iddedac74a78968eb438bddae1e22633ba8c13375
2016-06-28 19:48:32 +00:00
Dan Willemsen
9efeb1ea4f Turn unused source files from warning to error
All instances have disappeared from the build server, so switch this to
error before more turn up.

Change-Id: Iac07526a6e77ebf33733033249f2a108aae3fa7d
2016-06-28 10:22:08 -07:00
Dan Willemsen
5da565a85a Merge changes Ib6ffcc38,Ia58e6bc1
am: 3068a85962

Change-Id: I20aec66ac749a5db3f65e368e14a5caca12afff8
2016-06-16 15:50:46 +00:00
Dan Willemsen
b097fbed0a Check that NDK-built modules only link to NDK-built modules
Modules built against the NDK should only link against modules also
built against the NDK (or link to the NDK prebuilts). This patch
attempts to catch these cases, and prints a large warning when this is
violated. Once the tree is cleaned up, this will change to an error.

Change-Id: Ib6ffcc38d9161abdbe45a58af26ba429fb6f1876
2016-06-15 20:22:19 -07:00
Yabin Cui
494c2b5ebc Merge \\"Add option to link static lite protobuf library.\\" am: e6fae50455
am: bebdc16a68

Change-Id: I60b9fb9437fe15079c62c3d47401341b54ebc7bc
2016-06-14 01:24:05 +00:00
Yabin Cui
e6fae50455 Merge "Add option to link static lite protobuf library." 2016-06-14 00:16:34 +00:00
Dan Willemsen
74da7c9272 Merge \\"Rewrite LDLIBS and SHARED_LIBRARIES\\" am: a8d13592ac
am: d8210177af

Change-Id: If466674f33ba7d98a0f8da249bc0dc57efdcf621
2016-06-08 21:17:05 +00:00
Dan Willemsen
6731b495ca Rewrite LDLIBS and SHARED_LIBRARIES
LOCAL_LDLIBS was the only correct way to use NDK libraries, but few used
it correctly. It also often got confused with LOCAL_LDFLAGS, so move the
flags to the correct variable.

For binaries that weren't using the NDK (empty LOCAL_SDK_VERSION), it
was never valid to use LOCAL_LDLIBS, as dependencies would not be
properly set up, and could lead to random build failures. So convert any
-l linker flags to using LOCAL_SHARED_LIBRARIES automatically.

For binaries built using the NDK (LOCAL_SDK_VERSION set), they were
required to use LOCAL_LDLIBS for prebuilt NDK libraries, otherwise they
would get headers and dependencies to the platform versions. Any
non-prebuilt LOCAL_LDLIBS would miss dependencies. So move the NDK
prebuilt libraries to LDLIBS from SHARED_LIBRARIES, and move everything
else to SHARED_LIBRARIES.

So now, for device modules, LOCAL_SHARED_LIBRARIES should always be
used, and we'll do the right thing. LOCAL_LDLIBS should only be used for
host libraries from the system.

Change-Id: Ide34c7afdcfb6507a378d45a42471729e489a9e0
2016-06-07 21:59:55 -07:00
Yabin Cui
72a1156efb Add option to link static lite protobuf library.
Bug: 28114205

Change-Id: Id2b7e42017a53138c60b92de8d196ca92bc38053
2016-06-07 21:24:06 -07:00
Dan Willemsen
32b36a8819 Merge "Add NATIVE_TESTS class, move host native tests" am: e72fc63901
am: 10461b78f0

* commit '10461b78f0955d9dba8d32045d1e35ff0f9a5c8c':
  Add NATIVE_TESTS class, move host native tests

Change-Id: Ia11b54676d3b33e58c177a5a375f29233657524e
2016-06-07 00:09:39 +00:00
Dan Willemsen
e72fc63901 Merge "Add NATIVE_TESTS class, move host native tests" 2016-06-06 23:59:23 +00:00
Dan Willemsen
b25374cfe1 Merge "Error on external includes" am: 4b33f51043
am: d983b78a6f

* commit 'd983b78a6fac17bbfb26d61f28510476f8edb99a':
  Error on external includes

Change-Id: I82ba6748ea08cb861e3cf4f0fbade2f277433413
2016-06-04 01:13:07 +00:00
Dan Willemsen
4b33f51043 Merge "Error on external includes" 2016-06-04 01:03:20 +00:00
Chih-Hung Hsieh
fbde37d8b9 Merge "Default to enable tidy warnings in header files." am: 6a7cf55a7d
am: b764f7d0d6

* commit 'b764f7d0d662f7fd9d797ca796a85972596023d6':
  Default to enable tidy warnings in header files.

Change-Id: Ied47b955b1e0d11a1711c1d76c7ef90e6394ef5a
2016-06-02 23:29:55 +00:00
Chih-Hung Hsieh
870f087867 Default to enable tidy warnings in header files.
Change-Id: I3831f03facbbd6d17117d82f9ccac49bc2645237
2016-06-02 15:20:05 -07:00
Dan Willemsen
062e30b422 Error on external includes
To make the build hermetic, all include files should be located within
the source tree (or generated as output).

There was an Android.mk that was adding /usr/include to its include
path.

Change-Id: I4c40b908314239c8239c7835d592e409248a3150
2016-05-24 16:40:11 -07:00
Dan Willemsen
7fe992c0cc Add NATIVE_TESTS class, move host native tests
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.

So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].

Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.

Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.

Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d
2016-05-24 12:43:16 -07:00
Dan Willemsen
e48baffb5e Merge "Move to a single clang unknown flags list" am: 06935290ac
am: 315621eee0

* commit '315621eee0a1199b175ab4d251ea617fdb018fd5':
  Move to a single clang unknown flags list

Change-Id: I209bf8b868da7b11d55fc6cf701976ff914a2160
2016-05-23 17:43:38 +00:00
Dan Willemsen
02268f01df Move to a single clang unknown flags list
Soong is using a single list of unknown clang flags for all
architectures, instead of the per-architecture list here. Collapse this
down to a single list as well so that it can be verified against the
Soong list, and eventually replaced by the Soong version.

Change-Id: If43cd892105da5155907c05965a74b835920a369
2016-05-19 15:33:54 -07:00
Dan Willemsen
c7f377721a Merge "Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS" am: ac7a7bb0ba
am: 611211acd4

* commit '611211acd40bc02773d27568d4774d8061149c52':
  Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS

Change-Id: I6744e92b392c02dfcbe2154d13823a5a0a3b7693
2016-05-18 20:55:07 +00:00
Dan Willemsen
8308f506ce Remove (TARGET|HOST)_NO_UNDEFINED_LDFLAGS
We never use it for host modules, and all the target configurations use
the same linker argument. This matches Soong.

Change-Id: Ibcba9a4ce340c7a12306d1fee620a04027c0e292
2016-05-18 12:50:53 -07:00
Dan Willemsen
958dc6098e Merge "Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV" am: a794f4db22
am: 19fdc4428f

* commit '19fdc4428f9036b059a1174a3236eef03180e826':
  Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV

Change-Id: I143bf88ad5031764644dfb2c8b279513c809b50b
2016-05-17 03:05:32 +00:00
Dan Willemsen
db16dd2384 Remove TARGET_LIBGCC/LIBATOMIC/LIBGCOV
Instead, use the libgcc/libatomic/libgcov from the static libraries dir,
which is provided by Soong. Copy the libraries using the Soong script if
Soong is disabled - this can be removed once USE_SOONG is removed.

Change-Id: Iad2ad20ad5c3cfc48bf1e46e594a482609098d7a
2016-05-16 17:26:54 -07:00
Ying Wang
dbe53e4bde resolve merge conflicts of e6b72b3 to nyc-dev-plus-aosp
Change-Id: Ic60ea2050c6e724e9bcbb5277087f1377315e9b3
2016-05-06 13:37:05 -07:00
Ying Wang
05f9f35836 Harden dependency on generated sources.
Previously if a library has custom generated headers in
LOCAL_GENERATED_SOURCES and export its include path with
LOCAL_EXPORT_C_INCLUDE_DIRS, there is almost no way for the users of the
library to set up dependency of their object files on the generated
headers.
This change makes the generated sources dependency of the library's
export_includes, which is guaranteed generated before client code gets
compiled.

Also we added proto-generated cpp files to my_generated_sources so that
we can deal solely with $(my_generated_sources). Because many
Android.mks assume the generted .pb.hs are in $(generated_sources_dir)
instead of $(intermediates), we have to generate the source files in
$(generated_sources_dir) and make a copy in $(intermediates).

Bug: 28622149
Change-Id: I73b21443fa706f3735faf16356ed8c08fbfecca6
2016-05-06 10:20:17 -07:00
Chih-hung Hsieh
cf20458163 Merge "Add tidy.mk to set up global default checks." am: 214c7fa
am: 6014381

* commit '60143818969a97ee6827b9de3b56670b0ff774df':
  Add tidy.mk to set up global default checks.

Change-Id: I4f678930148ee6a0a3bccce899275af07cc4a738
2016-04-26 01:51:11 +00:00
Keun Soo Yim
46a259651f resolve merge conflicts of 72b82dc to nyc-dev-plus-aosp
Change-Id: I6e62226774584154ad1a802594e386fe7942504b
2016-04-25 15:27:21 -07:00
Keun Soo Yim
3d4847525f build rule change for VTS (vendor test suite)'s metadata files
Change-Id: I76b81529a97b672e08632703d2f6a2777ee8811e
2016-04-25 13:06:57 -07:00