Commit Graph

1086 Commits

Author SHA1 Message Date
Dan Albert c1eb5c9ba2 Merge "Add frameworks/wilhelm to Android.bp."
am: 15f6099b80

Change-Id: I54182ff445e6ce9dc9724083e28753861961f343
2016-10-06 17:48:08 +00:00
Treehugger Robot 15f6099b80 Merge "Add frameworks/wilhelm to Android.bp." 2016-10-06 17:42:08 +00:00
Dan Willemsen 215d2aaa6c Merge "Mark Soong-exported make variables as readonly"
am: 6648ab0143

Change-Id: Id640c3aaf23ffd981466ce6519928e28436a225f
2016-10-06 00:18:01 +00:00
Treehugger Robot 6648ab0143 Merge "Mark Soong-exported make variables as readonly" 2016-10-06 00:13:27 +00:00
Colin Cross d2290252c8 Move frameworks/native/include from -isystem to -I
am: 315a6ffc99

Change-Id: Icae207517be29a55a9d7200970c8d4b1ae92beb9
2016-10-05 23:26:29 +00:00
Dan Willemsen de18f47250 Mark Soong-exported make variables as readonly
Using new .KATI_READONLY extension.

Test: build/tooks/kati_all_products.sh on AOSP master and internal
Change-Id: I71794c1268456c3403a351c1b242f1e78b060355
2016-10-05 15:21:41 -07:00
Colin Cross 315a6ffc99 Move frameworks/native/include from -isystem to -I
-isystem hides all warnings.  The warnings in frameworks/native/include
have been cleaned up, so move it from -isystem to -I.

Test: m -j checkbuild
Bug: 31752268
Change-Id: Ie3656348b5b2a1828dec790aa047635ac0fe6d86
2016-10-05 12:58:29 -07:00
Dan Willemsen e2934f369d Disable cc_benchmark for Darwin hosts
am: 0b24c74fcb

Change-Id: I378014ffe1b7b49764c6dab6e28dcfea6cbee681
2016-10-05 03:38:43 +00:00
Dan Albert 12ae79c935 Add frameworks/wilhelm to Android.bp.
Test: make native
Bug: http://b/30465923
Change-Id: I97d736deb5f1b56f0492ece4afb635539bc34610
2016-10-04 17:26:03 -07: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 8a60db561d Enable toc optimization for host builds
am: 89562dc308

Change-Id: Ibb2aa669ff6d835142212b8ff6ab12096bf7f37f
2016-10-04 21:02:27 +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 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