Commit graph

638 commits

Author SHA1 Message Date
Colin Cross
0bd335f9b0 Make -ldl -lrt -lpthread implicit for host builds
Instead of requiring every host module to specify -ldl -lrt -lpthread
and then break the mac build because -lrt doesn't exist, make them
implicit to match the behavior of modules built for the device.

Test: m -j checkbuild
Change-Id: I7b5b5289a41cd8f6e7dc2da59400955d867ee783
2017-09-08 16:43:55 -07:00
Jiyong Park
a0f2b2a286 Merge "cxx_stl_setup is not executed for modules from soong"
am: 9b18ed094c

Change-Id: I08bfd781403ed0b7dd68de2e1045f1fa194bc8f5
2017-08-18 07:16:54 +00:00
Treehugger Robot
9b18ed094c Merge "cxx_stl_setup is not executed for modules from soong" 2017-08-18 07:11:41 +00:00
Jiyong Park
425d489cb9 cxx_stl_setup is not executed for modules from soong
cxx_stl_setup is adding libunwind_llvm to the dependency even for
modules from soong. However, since this dependency was already handled
in soong, those modules don't need to go through it again.

Bug: 64815735
Test: BOARD_VNDK_VERSION=current mma -j (under /hardware/libhardware)

Change-Id: Id6e2547c752ec831aa56a14c0bf4db0a55d51243
2017-08-18 13:46:04 +09:00
Dan Albert
21751a0a67 Merge "Use the min sdk version from soong."
am: 22b45d401a

Change-Id: I3baca77b2774eb93168f6b888f08e8f0e56a1a10
2017-08-18 02:44:33 +00:00
Dan Albert
105e4fe0a6 Use the min sdk version from soong.
Test: make checkbuild
Bug: None
Change-Id: I0306803cebf98748503b7e217db0f0f5959bf4f7
2017-08-17 16:37:49 -07:00
Yifan Hong
6dc0978c5f Merge "Vendor modules in make also have __ANDROID_VNDK__ defined."
am: 9bd6605abe

Change-Id: I7b6fc17cdd244ba6c6a266e0a0951b3a573119c5
2017-08-02 03:45:15 +00:00
Treehugger Robot
9bd6605abe Merge "Vendor modules in make also have __ANDROID_VNDK__ defined." 2017-08-02 03:39:33 +00:00
Yifan Hong
d7aa8417de Vendor modules in make also have __ANDROID_VNDK__ defined.
Bug: 64277220
Test: BOARD_VNDK_VERSION m -j
Change-Id: Ia9811ea526d0878b539c8c3da9e82e6bf33fe8e8
Merged-In: Ia9811ea526d0878b539c8c3da9e82e6bf33fe8e8
2017-08-01 18:54:10 -07:00
Jiyong Park
8f793af35c Merge "Don't add .vendor suffix for vendor-only modules"
am: 28989a9a22

Change-Id: I8f123f26ec3eb0c1d6607a21dfa7996284a68119
2017-07-27 00:24:42 +00:00
Jiyong Park
a9c4c71756 Don't add .vendor suffix for vendor-only modules
Soong now adds .vendor suffix only for modules having both core and
vendor variants. Furthermore, names listed in LOCAL_SHARED_LIBRARIES
are correct (= have .vendor suffix when the dependent lib has variants).
Therefore, make does not need to force add .vendor suffix when parsing
modules from soong.

Bug: 37480243
Test: BOARD_VNDK_VERSION=current m -j <name> is successful, where <name>
is one of the vendor-only libraries in Soong. (i.e.
android.hardware.renderscript@1.0-impl)
Test: m -j does not break anything

Change-Id: Id8d0d01313c63496a10de4cd3ddb9f75180efef6
2017-07-27 08:54:43 +09:00
Jiyong Park
9e89245a2c Merge "Don't allow JNI headers for vendors"
am: b253e8e854

Change-Id: I6e3de31f388150301db9f0d0dd1bee3b7e39f413
2017-07-14 03:39:49 +00:00
Treehugger Robot
b253e8e854 Merge "Don't allow JNI headers for vendors" 2017-07-14 03:34:50 +00:00
Jiyong Park
b43a52d79d Don't allow JNI headers for vendors
This is already blocked in Soong. Do the same for make.

Bug: 63553556
Test: BOARD_VNDK_VERSION=current m -j libSampleAuthJNI cannot be built
Change-Id: I04a89b3f9de903a6b0384f13d5a80886344c14b4
2017-07-13 15:51:07 +09:00
Jiyong Park
240f1d5ffe Merge "fix: device_kernel_headers can't be found in the make world"
am: 1aa29599c6

Change-Id: Ic588932665fe23e7bc50ec6a751aad3449a52018
2017-07-12 20:54:23 +00:00
Jiyong Park
cb8e636ed0 fix: device_kernel_headers can't be found in the make world
Since device_kernel_headers is marked as 'vendor:true', it is exported
to the make world as device_kernel_headers.vendor. Use the correct name
with the .vendor suffix.

Bug: none
Test: BOARD_VNDK_VERSION=current m -j does not complain about
device_kernel_headers.

Change-Id: If3eaa3c5832820c914ef427668d70fa8d8d0bf97
2017-07-12 18:29:17 +09:00
Jiyong Park
be8d64294c Merge "Device-specific kernel headers are accessbile again"
am: 6f594fc662

Change-Id: Icffe772cc97a39fceb21e0a22a3776313bbefa1f
2017-07-08 03:18:56 +00:00
Jiyong Park
0c59dab590 Device-specific kernel headers are accessbile again
Device-specific kernel headers (TARGET_PROJECT_SYSTEM_INCLUDES) have
been added to the global include paths. However, since global include
paths are no longer provided when a lib is built for vendors, the
device-specific kernel headers becomes inaccessible. To solve this
problem, a pseudo header library 'device_kernel_headers' is defined
and it is added to all Android.mk defined lib/bins.

Also, in order to give this info to the soong world,
TARGET_PROJECT_SYSTEM_INCLUDES is exported as a new product config
DeviceKernelHeaders.

Bug: 62939405
Test: choosecombo to aosp_sailfish (or any other Pixel/Nexus targets)
BOARD_VNDK_VERSION=current m -j gralloc.msm8996 (or any other vendor
libs using vendor-specific kernel headers)

Change-Id: I3f0a2b893cc9352d6c13f3151e8834477d15c07b
2017-07-08 10:16:23 +09:00
Jiyong Park
e51b222801 Merge "Give TARGET_OUT_HEADERS to vendor modules"
am: c86c8502ac

Change-Id: I2d9ca861cbac74b6e14ee843717e41ddc855bd91
2017-07-07 22:30:08 +00:00
Jiyong Park
7f8be9f695 Give TARGET_OUT_HEADERS to vendor modules
Many vendor modules are using headers that are copied to
$(TARGET_OUT_HEADERS)/some/path via LOCAL_COPY_HEADERS. In order to let
them use the headers via #include <some/path/header.h>,
$(TARGET_OUT_HEADERS) is again added to the system include path.

Bug: 63340459
Test: BOARD_VNDK_VERSION=current m -j gives less 'cannot find header'
errors.

Change-Id: I472e74533b437653c76dc416f7f4527c0e90750d
2017-07-06 09:45:26 +09:00
Dimitry Ivanov
cd00be0767 Merge "Add libdl.so to the list of system shared libs"
am: b519d002f3

Change-Id: I2d3d5daf26b7a78d68c02cf961bf43a71f19b0bf
2017-06-29 22:17:04 +00:00
Dimitry Ivanov
cdf3927ec4 Add libdl.so to the list of system shared libs
Note that libdl is already (always) implicitly loaded
because libc.so has a dependency on it.

Also make sure that libc.so always preceding libdl.so
in dt_needed list.

Bug: http://b/62815515
Test: make
Change-Id: I94c9d676b7fa98438b452d24f6c3bbf93166c6a9
2017-06-27 16:05:13 -07:00
George Burgess IV
37f6f8181f Merge "make: add __clang_analyzer__ to clang-tidy" am: 57273013cf am: c352502062
am: 9b802e745d

Change-Id: I8432d19ee7d65e2aa4ffb99ada989a57d8bb15c8
2017-05-10 04:59:02 +00:00
Treehugger Robot
57273013cf Merge "make: add __clang_analyzer__ to clang-tidy" 2017-05-10 04:34:42 +00:00
George Burgess IV
5ab07d4f14 make: add __clang_analyzer__ to clang-tidy
We have code that acts slightly differently when the static analyzer is
running, so that it can produce more accurate diagnostics (e.g. less
false positives). It uses __clang_analyzer__ to detect the static
analyzer.

When the static analyzer is run via clang-tidy, __clang_analyzer__
doesn't get defined.

Bug: None
Test: WITH_TIDY=1 m. clang-tidy now acts as expected in code made for
the static analyzer

Change-Id: Ib2a815c0bd67553af465b64207bb480fb52cfaf8
2017-05-03 18:10:47 -07:00
Dan Willemsen
2e68205f3e Merge "Exempt UBSAN runtime library from soong_to_convert" am: 94751070e8 am: 0d694416d2
am: 97018accea

Change-Id: I7d14fcfbf6b42611cdce83517328f50ad157885a
2017-05-03 01:28:40 +00:00
Dan Willemsen
0bf506f44a Exempt UBSAN runtime library from soong_to_convert
Soong already uses it, just not as a prebuilt module.

Test: Compare soong_to_convert.txt before/after
Change-Id: I6ffa0d967635d52b7b4f8b2b0465cd50254f22b9
2017-04-25 16:26:43 -07:00
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