Commit Graph

1231 Commits

Author SHA1 Message Date
Dan Willemsen
f6428f6afe Disable cc_benchmark for Darwin hosts am: 0b24c74fcb
am: e2934f369d

Change-Id: Id313301de1ea6af65dc173708a844d7ad200ca55
2016-10-05 03:41:13 +00:00
Dan Willemsen
e2934f369d Disable cc_benchmark for Darwin hosts
am: 0b24c74fcb

Change-Id: I378014ffe1b7b49764c6dab6e28dcfea6cbee681
2016-10-05 03:38:43 +00:00
Dan Willemsen
0b24c74fcb Disable cc_benchmark for Darwin hosts
The google-benchmark library is disabled on Darwin, so we cannot create
host benchmarks. Instead of having every user specify this, put the
logic in Soong. Then if we decide to support it later, it's an easier
switch.

Test: build.ninja identical before/after on Linux
Test: Ignores failing cc_benchmark_host on Darwin
Change-Id: I61f3a571fd160d8e479a512992bc68601f1c9b28
2016-10-04 15:20:16 -07:00
Colin Cross
dbd0800adf Enable toc optimization for host builds am: 89562dc308
am: 8a60db561d

Change-Id: Id2af0f43b0b78b5ef65a6eb30e98ff9df6679a49
2016-10-04 21:04:27 +00:00
Colin Cross
8a60db561d Enable toc optimization for host builds
am: 89562dc308

Change-Id: Ibb2aa669ff6d835142212b8ff6ab12096bf7f37f
2016-10-04 21:02:27 +00:00
Colin Cross
573fcfbf7a Fix toc path am: 4d67642cbd
am: 2c45e1be9b

Change-Id: I2cd7d726b49069e16442a25962e0345410223f0a
2016-10-04 18:27:42 +00:00
Colin Cross
2c45e1be9b Fix toc path
am: 4d67642cbd

Change-Id: If895f8c2b9a9dff50235dadafc8c536b51033ef0
2016-10-04 18:21:42 +00:00
Colin Cross
89562dc308 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.

Also move toc generation to happen on the packed, stripped library,
which is what will be used for linking, to ensure that it is available
at link time when depending only on the toc file.

Bug: 26015464
Test: m -j; touch system/tools/hidl/Annotation.cpp; m -j, verify
      out/soong/host/linux-x86/bin/hidl-gen is updated
Change-Id: I8953261d2209376f3dccbf0b1a93f7af4e45c4d0
2016-10-04 10:12:04 -07:00
Colin Cross
4d67642cbd Fix toc path
toc path was including the build directory twice, which breaks builds
with absolute paths to the build directory.

Test: m -j
Bug: 26014946
Change-Id: Ibc0856d1b22a44ec0c297f5dd84a932fde9f20af
2016-10-04 09:36:43 -07:00
Colin Cross
0db018c2cc Add support for toc optimization in soong am: 26c34ede29
am: 1e9c6a06a4

Change-Id: Ie99243f8da6f255157a32f3ad08013622b7d2ff7
2016-10-03 21:46:03 +00:00
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
d088e4cfbc Merge "Ninja and shell escape command line flags" am: 12013c8fe6
am: f3da303b51

Change-Id: I5cc72ed9af81a7ea40a421d3871d97eae335e550
2016-09-30 04:24:25 +00: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
7f7b05ada1 Handle dependencies with export_generated_headers am: 847dcc7d2a
am: beb9903058

Change-Id: Ia9ed4677020aa76de79c51c945d80db165b5ca76
2016-09-30 01:46:32 +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
13e53fd9c1 Trigger binary installation in Soong from Make am: 03ce63eaa6
am: f9a8e25486

Change-Id: I0b1d36df06a6576ee53519cfd4620cf0619abb12
2016-09-29 22:47:52 +00: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
75d27fae46 Merge changes from topic 'genrule-multi-out' am: 81ef084a00
am: 2a44260f73

Change-Id: Iaa4144966f308bd74c5c3b98d39529d39c5030bc
2016-09-29 05:47:08 +00:00
Dan Willemsen
fde0bb4aba Remove shared lib name checks am: 27279ece28
am: 40570b9fc4

Change-Id: I0669f867e416d76acf6c46b1cd451f63314aacc6
2016-09-29 05:47:07 +00:00
Dan Willemsen
9aa20fa06f Add export_generated_headers am: b3454ab24d
am: db22db3473

Change-Id: Ibedd6b8a934e51d4d16ed3579b99f91a5d86a63e
2016-09-29 05:47:06 +00:00
Dan Willemsen
3ca1d9ccbb Support multiple outputs for genrule am: 9c8681f4f9
am: 6966d7071f

Change-Id: Iab1dc0b7e789eac9f1e5a7c7e8e45a7d52d337d1
2016-09-29 05:47:06 +00:00
Dan Willemsen
c7a673f16d Parse genrule's cmd property am: 3f4539b035
am: 392499e757

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

Change-Id: If6cc08dfcde698af955d2ca2d76f6e0992546d99
2016-09-29 05:47:04 +00: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
96a4c2f955 Switch to using clang-3289846. am: fdab996f64
am: 21beaa0a69

Change-Id: Ic4540c215014ee39a237dc737b6b7626c6eafedc
2016-09-29 03:07:58 +00: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
41cfda6c6e Update readme am: 024c32e987
am: 6704ff1b5f

Change-Id: If16227356b008108eddd3a6800f2dff5a93f1db6
2016-09-27 00:32:37 +00: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
418e21528f Merge "Revert "Revert "Move system/core/include from -isystem to -I""" am: 0a249ce498
am: 572b83188c

Change-Id: I1e3a0ff45ca0b61662d1d682b44935a1d5785a9f
2016-09-26 01:14:29 +00: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