Commit graph

9163 commits

Author SHA1 Message Date
Dan Willemsen
e1c6deab10 Finish refactoring tests to NATIVE_TESTS
Now that the source trees all use NATIVE_TESTS for intermediate files
and generated sources, make it a requirement.

Change-Id: Id5718fabe63f6e8dde7981a6f0f5bd89e0ec7ee5
2016-06-22 00:27:54 -07:00
Guang Zhu
a9bc78af69 move test artifact build rules into open source location
Bug: 29404304
Change-Id: I5553d275fe478fac0d6fe00a931a1c1f1e3bdd59
(cherry picked from commit 8322be7252)
2016-06-21 15:49:09 -07:00
Dan Willemsen
4f807026e2 Merge "Clean up vendor image handling" 2016-06-21 21:54:40 +00:00
Joe Onorato
b7fd3d212b Also turn down the logging for dex2oat on the boot image
Bug: 27499257
Change-Id: I190ce72b44e49451dab44902e2ca33dd5c2815ce
(cherry picked from commit 632db649fb)
2016-06-20 11:15:31 -07:00
Dan Willemsen
6c3e79b8e3 Clean up vendor image handling
Standardize symlinking /system/vendor -> /vendor for aosp_* devices,
since some /vendor binaries still use /system/vendor/... paths.

Support using a prebuilt vendor image and including it into all the
normal packaging steps.

Bug: 28987532
Change-Id: I27040e8a8d1df0777e16cd1e3c3a9f1b28695e96
2016-06-18 17:47:12 -07: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
Dan Willemsen
dd5a5d328b Add macros for printing pretty warnings/errors in rules
Change-Id: Ia58e6bc1328c84e5f4ba1f6a2fd2d650e94e127e
2016-06-15 20:22:19 -07:00
Treehugger Robot
a6f510c776 Merge "Fix kati --no_ignore_dirty usage" 2016-06-15 22:41:32 +00:00
Dan Willemsen
3773b45c3b Fix kati --no_ignore_dirty usage
Kati only supports a single use of --no_ignore_dirty, so we were
ignoring the SOONG_ANDROID_MK file, and only detecting changes to
SOONG_MAKEVARS_MK. Fix this by using a pattern that should apply to both
of those makefiles.

Change-Id: I46390f9887f95f1db0efe4e93339667f35ebc67c
2016-06-15 14:55:58 -07:00
Dan Willemsen
327fa9c411 Forbid libstdc++ on Linux and Darwin
The last user has been removed, forbid any modules from selecting this.

Change-Id: Idd9ef6ca4b6c6754935d59c4a09c7d213ae481c1
2016-06-15 13:41:45 -07:00
Dan Willemsen
7c2d228701 Use more prebuilt build-tools
For acp, we've been using an old prebuilt in prebuilts/sdk, but it's not
part of the SDK. Instead, we'll use a prebuilt in the build-tools
repository.

For ijar, we've been using the host libstdc++ to workaround the lack of
libc++ on some unbundled branches. Instead, use a prebuilt that can use
libc++.

For ziptime, we've been disabling it on unbundled branches, due to the
lack of libc++. Instead, use a prebuilt version of ziptime that can use
the prebuilt libc++.

Change-Id: If80f845ea06f76e3fe6765964e77c864eaf303d0
2016-06-14 13:50:38 -07:00
Jeff Hao
00b75bc41a Skip uses-library check for preopted apps.
Bug: 26880306

(cherry-picked from commit b00263f96a)

Change-Id: I22beccaf61ca30cf1487a25f80e1c3fd7bdf2c62
2016-06-13 18:14:27 -07:00
Yabin Cui
e6fae50455 Merge "Add option to link static lite protobuf library." 2016-06-14 00:16:34 +00:00
David Zeuthen
bca24302bb bvb: Update path to key since repo was moved.
We recently moved Brillo verified boot from system/bvb to external/bvb
so update the path accordingly.

TEST=Build with 'BOARD_BVB_ENABLE := true' succeeds.
BUG=29099910

Change-Id: I66f3b90e23d6b2afc09f81af571ede7b573325e9
2016-06-13 11:26:26 -04:00
Yohann Roussel
0a26fc0ace Merge "Do not force turn off of Jack warning" 2016-06-13 14:33:48 +00:00
Vikas Marwaha
e5c1af2dd0 Merge "Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the new read only product property ro.product.first_api_level." 2016-06-09 02:30:57 +00:00
Yohann Roussel
bf17172521 Do not force turn off of Jack warning
When ANDROID_JACK_EXTRA_ARGS is defined there is no reason to still turn
off those warnings.

Change-Id: Ic7ac02c72ed3b7b0eaca9394c9fc7d92d5dfa871
2016-06-08 17:00:09 +02: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
e72fc63901 Merge "Add NATIVE_TESTS class, move host native tests" 2016-06-06 23:59:23 +00:00
Dan Willemsen
6e22c756fc Drop CLANG and CLANG_CXX in the environment
We'll explicitly pass these variables to the static analyzer builds in
binary.mk

Bug: 29071982
Change-Id: Ifc7633d36f5785fe16b63f54b885396c2cab542a
2016-06-06 13:13:50 -07:00
Dan Willemsen
4b33f51043 Merge "Error on external includes" 2016-06-04 01:03:20 +00:00
Vikas Marwaha
404ccc83c4 Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the
new read only product property ro.product.first_api_level.

PRODUCT_SHIPPING_API_LEVEL declares which API level a device first
shipped with. We use this variable to set a read-only property that
can be used in CTS/GTS tests.

Change-Id: If54202075d3b92ed380655cde8b3fc50c5ba73b3
2016-06-03 23:02:27 +00:00
Treehugger Robot
6a7cf55a7d Merge "Default to enable tidy warnings in header files." 2016-06-02 23:18:00 +00:00
Treehugger Robot
daf55776be Merge "Add support for TARGET_RECOVERY_BRICK." 2016-06-02 22:44:56 +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
Tao Bao
a062c7e62d Add support for TARGET_RECOVERY_BRICK.
TARGET_RECOVERY_BRICK specifies the file that lists all the partitions
to be bricked under recovery. The file, if present, will be copied to
'$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'.

Bug: 27253717
Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580
(cherry picked from commit 3051f4f11a)
2016-06-02 14:46:53 -07:00
Treehugger Robot
476b5b1616 Merge "Add LOCAL_LOGTAGS_FILES that prebuilts can use" 2016-06-01 23:28:10 +00:00
Jeffrey Vander Stoep
4bc8280a98 Merge "disable unpriv perf by default in user{,debug} builds" 2016-06-01 23:18:46 +00:00
Dan Willemsen
b0a08b874c Add LOCAL_LOGTAGS_FILES that prebuilts can use
Soong modules can define logtags files that need to be combined into
/system/etc/event-log-tags, so add a new LOCAL_LOGTAGS_FILES variable
that can be used to specify *.logtags file outside of LOCAL_SRC_FILES.

Bug: 28989759
Change-Id: I53c5d396dfb7c6006806758f351eb5cdde90fe74
2016-06-01 15:31:44 -07:00
Colin Cross
27032630c0 Merge "Update default NINJA_STATUS to show finished edges" 2016-06-01 04:52:59 +00:00
Colin Cross
520442f053 Merge "Update Android.mk finder to work with Android.bp files" 2016-06-01 04:52:47 +00:00
Dan Willemsen
60d9c673d7 Add Soong tools to PATH
Change-Id: I8f8649106df4ba7cefbfa37a724ebe0635d90b76
2016-05-31 18:32:35 -07:00
Daniel Micay
f2ac912b19 disable unpriv perf by default in user{,debug} builds
Bug: 29054680

Change-Id: If04bc63fc366006cde842a50b7c764f89d7449a6
2016-05-31 17:43:48 -04:00
Dan Willemsen
b40d9ece5f Allow arm prebuilts for x86_arm builds
But only for static and shared libraries -- we disable building other
types of modules for arm, so don't support the prebuilts for them
either.

This is needed so that we can build these libraries under Soong, and
expose them to Make using BUILD_PREBUILT.

Bug: 27526885
Change-Id: I4f6ec922aed37591b6257b7022b81fb65d05b0fe
2016-05-31 14:01:34 -07:00
Colin Cross
b9dd243b1c Update default NINJA_STATUS to show finished edges
Update default NINJA_STATUS that includes percentage to match
6c2c2eecbf

Change-Id: I5694308abe26b71999d944c40962d59d50a73077
2016-05-31 12:38:04 -07:00
Colin Cross
4cbf8eb9f5 Update Android.mk finder to work with Android.bp files
The Android.mk finder should stop traversing when it finds an Android.bp
file, and any Android.soong.mk file at the same path should be included.

Update filter-soong-makefiles to accept a mixed list of Android.bp files
and Android.mk files, convert Android.bp files to Android.soong.mk files
if they exist, and ignore Android.mk files that have an Android.bp file.

Update first-makefiles-under to use the new --dir syntax for
findleaves.py and search for both Android.bp and Android.mk files.

Update all-makefiles-under and all-named-subdir-makefiles to search for
both Android.bp and Android.mk files.

Change-Id: Iddc51bf84593d5de3add02f2b2c065da08962af4
2016-05-30 13:42:19 -07:00
Treehugger Robot
8ed91b6624 Merge "Fix mm and mmm in Android.bp directories" 2016-05-27 00:23:24 +00:00
Colin Cross
8642525726 Fix mm and mmm in Android.bp directories
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file.  Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.

Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
2016-05-26 15:56:21 -07:00
Dan Willemsen
2eb45d9ab2 Merge "Remove unnecessary variables" 2016-05-26 21:49:01 +00:00
Dan Willemsen
056609ccfe Remove unnecessary variables
These are all either recently unused due to the removal of CFLAGS/etc,
or have been exported by Soong and are no longer necessary.

Change-Id: I5930d43fda21acc8202b3d8ea010fbefb6ae4cf1
2016-05-25 21:23:20 -07:00
Colin Cross
a61d672529 Remove USE_SOONG=false option
Soong is always required to build now.

Change-Id: I4e310e98e912b370ebf980bf609f04212a7e9a50
2016-05-25 12:55:43 -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
Colin Cross
7b31dd1094 Merge "Error on USE_CLANG_PLATFORM_BUILD=" 2016-05-23 22:05:27 +00:00
Treehugger Robot
c11ae6c569 Merge "Add LOCAL_CTS_GTEST_LIST_EXECUTABLE" 2016-05-23 21:18:58 +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
Colin Cross
b267cbabba Error on USE_CLANG_PLATFORM_BUILD=
A blank USE_CLANG_PLATFORM_BUILD= on the command line for make causes
confusion between make and kati.  make ignores writes to variables set
on the command line, so envsetup.mk cannot set it to true,
USE_CLANG_PLATFORM_BUILD is still empty in soong.mk, and soong.variables
gets DeviceUsesClang: false.  kati gets USE_CLANG_PLATFORM_BUILD= in its
environment instead of on its command line, so envsetup.mk when parsed
by kati sets USE_CLANG_PLATFORM_BUILD=true.

Error out early if USE_CLANG_PLATFORM_BUILD is not true or false after
attempting to set it to true if it is empty.

Change-Id: I0e2731315711db9a6ac6ea2bf49c88bccacd35f7
2016-05-19 13:39:37 -07:00
Dan Willemsen
174feb906f Remove (C|CPP|CONLY|LD)FLAGS checked by Soong
At the beginning of every build, Soong has exported its version of these
variables, and has been ensuring that when sorted, the result is the
same. So these variables all have the same flags of the Soong ones, but
may be in different orders. We don't believe any of the remaining order
differences matter. As we remove the Make definitions, the exported
Soong variables will take over.

This only removes lines that change one of these variables:

  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_CROSS_GLOBAL_LDFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]HOST_GLOBAL_LDFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CONLYFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_CPPFLAGS
  [2ND_][CLANG_]TARGET_GLOBAL_LDFLAGS

Many other variables are unnecessary now too, but those will be removed
in another change. For those we can ensure the build.ninja file does not
change, but we expect it to change here due to the ordering differences.

Change-Id: I0bd0778706d02ee27b2784dd8dc6b2c71d37bd3a
2016-05-18 18:10:04 -07:00
Dan Willemsen
3fe3248c36 Windows: Stop adding to GLOBAL_LD_DIRS
Soong does not have the idea of global linking directories, so move the
windows prebuilt library directory to GLOBAL_LDFLAGS instead.

Change-Id: Ie101146f4682cd85924463aa5acaa46869938e6c
2016-05-18 16:50:46 -07:00