Commit Graph

1072 Commits

Author SHA1 Message Date
Colin Cross
1e9c6a06a4 Add support for toc optimization in soong
am: 26c34ede29

Change-Id: I2af5ef5564b311905c9ae14c2e56529e26e2c5d5
2016-10-03 21:44:33 +00:00
Colin Cross
26c34ede29 Add support for toc optimization in soong
Skip relinking against shared libraries whose interface hasn't changed.

Test: mmma -j frameworks/native/libs/gui
Test: touch frameworks/native/libs/gui/BufferItem.cpp
Test: mmma -j frameworks/native/libs/gui, see nothing relinks past libgui
Bug: 26014946
Change-Id: I4d4b8da6a35c682341ae51869f5c72b51e192053
2016-09-30 21:05:59 -07:00
Colin Cross
f3da303b51 Merge "Ninja and shell escape command line flags"
am: 12013c8fe6

Change-Id: I104dc23636f4caf2942dbf47d8f8ba560bcdb406
2016-09-30 04:21:17 +00:00
Treehugger Robot
12013c8fe6 Merge "Ninja and shell escape command line flags" 2016-09-30 04:17:59 +00:00
Dan Willemsen
beb9903058 Handle dependencies with export_generated_headers
am: 847dcc7d2a

Change-Id: I968eb6c870b9ed157c4f76bebd59fc7f9245b7c5
2016-09-30 01:44:01 +00:00
Dan Willemsen
847dcc7d2a Handle dependencies with export_generated_headers
This sets up the proper dependencies within Soong by adding the imported
dependencies into GeneratedHeaders, and re-exporting them as necessary.
It also exports them to Make using the new LOCAL_EXPORT_C_INCLUDE_DEPS.

Bug: 31742855
Test: Inspection, build hardware/interfaces (pending)
Change-Id: I6a10ceec377a97966baa9d4876b90fcda391dd01
2016-09-30 01:37:38 +00:00
Colin Cross
4b963f8d6a Ninja and shell escape command line flags
Strings like cflags in Android.bp files are parsed by blueprint,
written to build.ninja files, parsed by ninja, and then passed to
/bin/sh -c.  This had resulted in a combination of blueprint
(\"), ninja ($$), and shell (\$) escaping being necessary.

Update Soong to automatically handle ninja and shell escaping in
cflags and ldflags.

Bug: 31221587
Test: m -j
Change-Id: Ibe087b2788b355b73c3225b5928870619a0a53bc
2016-09-29 15:57:59 -07:00
Dan Willemsen
f9a8e25486 Trigger binary installation in Soong from Make
am: 03ce63eaa6

Change-Id: I8276ab905b807a7f264a5978609c94add27bec1a
2016-09-29 22:44:36 +00:00
Dan Willemsen
03ce63eaa6 Trigger binary installation in Soong from Make
We prepended Soong's binary installation path to PATH, but now
rebuilding binaries that are in Soong and exported to Make produces
inconsistent results. From an empty out directory:

Run `m -j hidl-gen`, PATH will get a hidl-gen binary in out/host/...
Run `m -j android.hardware.tests.foo@1.0`, PATH will get a new hidl-gen
binary in out/soong/host/...
Make a change to hidl-gen, then run `m -j hidl-gen`. The hidl-gen first
in PATH is still the one without the changes.

Bug: 31742855
Test: m -j hidl-gen showcommands
Change-Id: If01a76d10d786dac6f16f31d1142634af4964228
2016-09-29 13:56:02 -07:00
Dan Willemsen
2a44260f73 Merge changes from topic 'genrule-multi-out'
am: 81ef084a00

Change-Id: Id449809a0258c075de33923517a4b2b32670ec7e
2016-09-29 05:42:37 +00:00
Dan Willemsen
40570b9fc4 Remove shared lib name checks
am: 27279ece28

Change-Id: I2c81c7ca8989a1a8d40d87d5da8f6de97c906bc4
2016-09-29 05:42:37 +00:00
Dan Willemsen
db22db3473 Add export_generated_headers
am: b3454ab24d

Change-Id: I3c893df045a5bfcd5e4bac87a0314f197fe3bd8b
2016-09-29 05:42:36 +00:00
Dan Willemsen
6966d7071f Support multiple outputs for genrule
am: 9c8681f4f9

Change-Id: If0306db6c56748faf86164a3df8a72d7ea4d656b
2016-09-29 05:42:35 +00:00
Dan Willemsen
392499e757 Parse genrule's cmd property
am: 3f4539b035

Change-Id: I3abea62996d38febc44d9afc0719705de0a54469
2016-09-29 05:42:35 +00:00
Dan Willemsen
2658e9b516 Expose HostToolPath on the cc module to fix genrule.tool
am: 4aa75ca244

Change-Id: I1664e5f50df8a22bf91eba1f91af0c8ca41bae79
2016-09-29 05:42:34 +00:00
Treehugger Robot
81ef084a00 Merge changes from topic 'genrule-multi-out'
* changes:
  Remove shared lib name checks
  Add export_generated_headers
  Support multiple outputs for genrule
  Parse genrule's cmd property
  Expose HostToolPath on the cc module to fix genrule.tool
2016-09-29 05:33:04 +00:00
Dan Willemsen
27279ece28 Remove shared lib name checks
Now that we're no longer using -l, we don't need to strip off the "lib"
prefix and ".so" suffix. Therefore we don't need to make sure the prefix
and suffix exists.

Bug: 31742855
Test: Attempt to link android.hardware.* (hardware/interfaces/*)
Change-Id: I38555014cdc0e430f94359e173bb09e35d45c44e
2016-09-28 20:58:38 -07:00
Stephen Hines
21beaa0a69 Switch to using clang-3289846.
am: fdab996f64

Change-Id: I8f5d48cfcf16e375396395c241b74a77bcc9aed7
2016-09-29 03:03:57 +00:00
Dan Willemsen
b3454ab24d Add export_generated_headers
Similar to export_shared_library_headers, this will export headers
imported from a gensrcs or genrule.

Bug: 31742855
Test: Add export_generated_headers, ensure it's in out/soong/Android-*.mk
Change-Id: Ieadefd007ece8b249f011a258a9c5b27f5d3f594
2016-09-28 18:31:04 -07:00
Dan Willemsen
9c8681f4f9 Support multiple outputs for genrule
The underlying code to expose outputs to other modules has suppported
this already for gensrcs (which runs the command multiple times to
create multiple outputs). This allows a genrule to run a command once,
and output multiple files.

Bug: 31742855
Test: Add multi-output genrule; Inspect build.ninja
Change-Id: I72054cc39c0d0e3e44feebba72005e5af1a1709a
2016-09-28 18:31:04 -07:00
Dan Willemsen
3f4539b035 Parse genrule's cmd property
Instead of just passing this to ninja, use os.Expand to parse the
variable substitutions. While we're here, define a new "genDir" variable
that is the root of this module's generated directory.

Bug: 31742855
Test: Ensure invalid variables cause error
Test: Inspect commands in build.ninja
Change-Id: Iff6d0499ab57367669e73df52ab7c647358da13b
2016-09-28 17:38:57 -07:00
Dan Willemsen
4aa75ca244 Expose HostToolPath on the cc module to fix genrule.tool
Bug: 31742855
Test: Use `tool` in a genrule, ensure it runs properly.
Change-Id: Ib9ff35125edd66cdba8ede4f28aa6b753de0689b
2016-09-28 17:38:02 -07:00
Stephen Hines
fdab996f64 Switch to using clang-3289846.
Bug: http://b/30252254
Test: Built/boot platform using latest prebuilts.
Change-Id: I47c5e8255f84b6f41d1d3e1f3c986e8699ac573a
2016-09-28 08:52:48 -07:00
Colin Cross
6704ff1b5f Update readme
am: 024c32e987

Change-Id: I8f845403fe8b38ed1514e190a289524f8770ffe1
2016-09-27 00:30:07 +00:00
Colin Cross
024c32e987 Update readme
Use go/Android.bp link, add a little more on androidmk conversions.

Test: none
Change-Id: Ibe2be4ad54b6d9a8954d7efbb40d04dc54c8dbf2
2016-09-26 15:44:29 -07:00
Colin Cross
572b83188c Merge "Revert "Revert "Move system/core/include from -isystem to -I"""
am: 0a249ce498

Change-Id: I2152602aced4232258c027c4b5b513aad53dc8b3
2016-09-26 01:11:59 +00:00
Colin Cross
0a249ce498 Merge "Revert "Revert "Move system/core/include from -isystem to -I""" 2016-09-26 01:07:09 +00:00
Colin Cross
81b4ca6817 Revert "Revert "Move system/core/include from -isystem to -I""
This reverts commit 763a26cef5.

Bug: 31492149
Change-Id: I322f5e31da306951ac13131f5113730e945dedd5
2016-09-23 19:20:54 +00:00
Colin Cross
cd2f6df8ab Merge "Revert "Move system/core/include from -isystem to -I""
am: d85c0740e1

Change-Id: I39f35da8fe9e260971a08101e81d08250f565609
2016-09-23 15:58:50 +00:00
Colin Cross
d85c0740e1 Merge "Revert "Move system/core/include from -isystem to -I"" 2016-09-23 15:50:55 +00:00
Colin Cross
763a26cef5 Revert "Move system/core/include from -isystem to -I"
This reverts commit e4bba1e835.

Bug: 31492149
Change-Id: If46d240274f1a59ac36579157c575b54f2ffd58f
2016-09-23 15:50:14 +00:00
Colin Cross
b795aacfef Merge "Move system/core/include from -isystem to -I"
am: fe040c48e6

Change-Id: Ieb2d3c357da9dbe7b318c44dbc819c42e72e4311
2016-09-23 14:51:16 +00:00
Colin Cross
fe040c48e6 Merge "Move system/core/include from -isystem to -I" 2016-09-23 14:47:52 +00:00
Dan Willemsen
eb65b50509 Add debuggable product variable with cflags
am: fcebcd5c37

Change-Id: Ic493640c4ef1168e0c7f5f56a58fe0b605e6f5ce
2016-09-23 00:21:41 +00:00
Colin Cross
e4bba1e835 Move system/core/include from -isystem to -I
-isystem hides all warnings.  The warnings in system/core/include have
been cleaned up, so move it from -isystem to -I.

Test: lunch aosp_angler-eng && m -j
Test: lunch aosp_bullhead-eng && m -j
Test: lunch aosp_flounder-eng && m -j
Test: lunch aosp_fugu-eng && m -j
Test: lunch aosp_shamu-eng && m -j
Bug: 31492149
Change-Id: I29967428c2c45f753dabe21b65913fb08fdcabc4
2016-09-22 15:29:50 -07:00
Dan Willemsen
fcebcd5c37 Add debuggable product variable with cflags
Allows changing cflags based on the build variant being `eng` or
`userdebug`. This is used by some modules to turn on asserts for these
builds, and used by adb to allow root on non-user builds.

Test: Use this flag in an Android.bp, check the ninja file.
Change-Id: I27a5081378e94920482b4a742d65c46065047573
2016-09-22 15:22:15 -07:00
Kenny Root
b32fbac0ae Add pthread to Windows allowed ldlibs
am: b912349c03

Change-Id: I63489bdffaec1e1c368891f741ac5371a1605044
2016-09-21 00:02:23 +00:00
Kenny Root
b912349c03 Add pthread to Windows allowed ldlibs
The MinGW update now includes pthread.

Test: update BoringSSL to use pthreads on Windows and compile
Change-Id: Id85d9fd3e03a310e07e0093ca80cefaf10fe8930
2016-09-20 14:49:33 -07:00
Colin Cross
fed7b92b7e Fix checkbuild for modules with last variant disabled
am: 9b1d13db73

Change-Id: I19c368bdce8e7822c21a6a3ede4ee7f9891d7c9a
2016-09-20 16:57:14 +00:00
Colin Cross
1bb040ff67 Support mixed ASAN and non-ASAN host builds
am: b0f28957ae

Change-Id: I68e7600f0c7775550f17ac2e6131177afe0728f0
2016-09-20 16:57:13 +00:00
Colin Cross
9b1d13db73 Fix checkbuild for modules with last variant disabled
The soong checkbuild target is created by the last varaint of each
module.  Don't return early if the variant is disabled, which would
prevent creating the checkbuild target.

Test: m -j checkbuild
Change-Id: Ib260bae7fb4be7255f5c1b34dfbd50225f308005
2016-09-19 16:50:35 -07:00
Colin Cross
b0f28957ae Support mixed ASAN and non-ASAN host builds
Host builds may build binaries that must have ASAN disabled.  Convert
host ASAN to use variants.  Since there is only one install location for
shared libraries, don't install the non-ASAN variant at all for now.

Test: mmma -j art SANITIZE_HOST=address
Change-Id: Iacefecac93df44823316624b4c540c24f643fb80
2016-09-19 16:50:35 -07:00
Colin Cross
b8332205f8 Make ndk.timestamp optional
am: f09c8437f9

Change-Id: I9c389c18ad585a043aa75d1e7ec58fb699bf03fe
2016-09-16 21:50:23 +00:00
Colin Cross
f09c8437f9 Make ndk.timestamp optional
Singleton rules need to manually specify Optional: true, or they will be
built for any ninja invocation that has no targets specified.

Test: m -j on tradefed build
Change-Id: Ifc060b25bc32e664c48731eb8a0d963b73574591
2016-09-16 12:53:59 -07:00
Dan Albert
5965ec1ab0 Merge changes from topics 'ndk-libc++-libdl', 'ndk-compiler-rt_extras'
am: 702b561ee5

Change-Id: Ia53d479916ac5aea2a466eedd12661351ab7dfc9
2016-09-16 06:48:13 +00:00
Dan Albert
302f23977f Always link libdl with libc++ for the NDK.
am: 3895d5b246

Change-Id: Idd23c265a7a3c0f8efd48cf83d52870a5025aa6d
2016-09-16 06:45:34 +00:00
Dan Albert
5e3f38db17 Use libcompiler-rt_extras with NDK builds.
am: 83705c88d7

Change-Id: I65627012c592dc2c424d10a87450f232b8e6f339
2016-09-16 06:45:33 +00:00
Treehugger Robot
702b561ee5 Merge changes from topics 'ndk-libc++-libdl', 'ndk-compiler-rt_extras'
* changes:
  Always link libdl with libc++ for the NDK.
  Use libcompiler-rt_extras with NDK builds.
2016-09-16 06:40:32 +00:00
Colin Cross
79cb52c7ec Merge "Improve test support for art tests"
am: 0e19618906

Change-Id: I010c4f1f9cd61ed1957640ecdd8ea07e6959bf49
2016-09-15 21:52:26 +00:00
Colin Cross
0e19618906 Merge "Improve test support for art tests" 2016-09-15 21:47:07 +00:00