Commit graph

5518 commits

Author SHA1 Message Date
Colin Cross
735dc93f3f Export extract-srcjars.sh to Make
am: 1763da8eb9

Change-Id: I1c5860fb7e040bf4e9a60f66b479d8a41743a5fd
2017-11-17 21:38:14 +00:00
Colin Cross
bfb1ffdfee Remove partial javastream proto support
am: d243091381

Change-Id: Ic9909601d35596450c27b2df3d0860f193767229
2017-11-17 21:37:57 +00:00
Colin Cross
4a5899610d Add support for .srcjar files from genrules and srcs
am: af05017b75

Change-Id: I381c6d6be55ccb8fe3e5af661ce948d9525b3489
2017-11-17 21:37:45 +00:00
Colin Cross
e77d7dc920 Fix java AIDL properties to match C/C++
am: ebe1a51c81

Change-Id: I570e578626bc9876b778919c52179e38f806161c
2017-11-17 21:37:25 +00:00
Colin Cross
dbe0ca5a79 Fix proto flags in java
am: d5dbfb78a0

Change-Id: I656802ef2bd4894b5bda331476f43da05d75496d
2017-11-17 21:37:08 +00:00
Colin Cross
6dfde48ba1 Merge changes from topics "soong_logtags", "droiddoc_srcjars"
* changes:
  Fix genrules depending on Go tools
  Use logtags without merged file
  Export extract-srcjars.sh to Make
  Remove partial javastream proto support
  Add support for .srcjar files from genrules and srcs
  Fix java AIDL properties to match C/C++
  Fix proto flags in java
2017-11-17 21:32:27 +00:00
Colin Cross
93d0b33f46 Merge changes I0434b003,I1a1a01c5
am: fd9b570c5e

Change-Id: I9ce9c108f828946a992bf941063d0b6646b47f74
2017-11-17 21:11:32 +00:00
Treehugger Robot
fd9b570c5e Merge changes I0434b003,I1a1a01c5
* changes:
  Fix using aidl files from filegroups
  Add cc_library tests
2017-11-17 21:07:21 +00:00
Colin Cross
b1bd1aabca Use logtags without merged file
Assume logtags files will have hardcoded tag numbers and don't
build against the merged file.  Simplifies the build when
logtags files are split across Make and Soong.

Test: m checkbuild
Change-Id: I1e995ec458690fcadb1b86d64864f277aa9fe3af
2017-11-17 11:22:08 -08:00
Colin Cross
1763da8eb9 Export extract-srcjars.sh to Make
Export extract-srcjars.sh to Make so that it can be used to add
srcjar support to droiddoc rules.

Test: m checkbuild
Change-Id: I203ba6dad731ec9167eb8706bbfb345a484f024b
2017-11-17 11:22:08 -08:00
Colin Cross
d243091381 Remove partial javastream proto support
javastream proto is rarely used and tricky to support directly
in java because it depends on an extra host tool.  It can be
supported with a genrule, so just remove the partial built-in
support.

Test: m checkbuild
Change-Id: Iffe75e7040cb889ca17fdd85ef3e8e64fc3aa9e9
2017-11-17 11:22:08 -08:00
Colin Cross
af05017b75 Add support for .srcjar files from genrules and srcs
Allow srcs to contain .srcjar files, which will be extracted just
before javac.  Also allow genrules and generated sources to directly
return .srcjar files.

Test: m checkbuild
Change-Id: Ie4cf60ecb9d2ec63a4c2275221544203b1383597
2017-11-17 11:22:08 -08:00
Colin Cross
ebe1a51c81 Fix java AIDL properties to match C/C++
The C/C++ aidl properties use:
aidl: {
    local_include_dirs: [],
    include_dirs: [],
}

But the Android.bp file was expecting:
aidl_include_dirs: [],
export_aidl_include_dirs: [],

Update java AIDL support to match the C support, which is
also what the androidmk conversion tool is creating.

Test: m checkbuild
Change-Id: I3df763d0b203b1b6556798a21b0553e7d35ad7d5
2017-11-17 11:22:08 -08:00
Colin Cross
d5dbfb78a0 Fix proto flags in java
Compute the common proto flags and pass them to the protoc invocation
when generating java files.

Test: m checkbuild
Change-Id: I0d4c23ad001d01eab03b404545383f009214106d
2017-11-17 11:22:08 -08:00
Colin Cross
35143d0466 Fix genrules depending on Go tools
genrules lost the ability to depend on Go tools after
I05e945f38915d49cd3c0ab72a86576949bc7eff2 which converted
VisitDirectDeps from blueprint Modules to android Modules.
Add VisitDirectDepsBlueprint to visit all modules including
blueprint Modules, and use it in genrule.  Also add a check
for disabled modules that was being handled by
VisitDirectDeps.

Test: m checkbuild
Change-Id: I65724283166c63596d071e598c08fed87ef32896
2017-11-17 11:22:08 -08:00
Colin Cross
f18e11074d Fix using aidl files from filegroups
Compute sources including from filegroup and genrule dependencies
before determining if any sources will cause flags to be added.

Test: gen_test.go
Change-Id: I0434b003bbda07a58bb2ce1a0a72997918c8fae2
2017-11-17 11:22:08 -08:00
Colin Cross
ad59e75a56 Add cc_library tests
Add tests around reusing objects between static and shared
libraries.

Test: library_test.go
Change-Id: I1a1a01c5ea9f9edfbcaa5b29c39c281630e04f70
2017-11-17 11:22:04 -08:00
Tobias Thierer
61324f379a Support EXPERIMENTAL_USE_OPENJDK9=false.
am: a7cdd156a6

Change-Id: I7c8932d3cd984b75995b7c09dd5e2ba70ad5c743
2017-11-17 15:19:33 +00:00
Tobias Thierer
a7cdd156a6 Support EXPERIMENTAL_USE_OPENJDK9=false.
This fourth possible value currently has the same semantics
as a default/unset EXPERIMENTAL_USE_OPENJDK9, but allows
people to explicitly switch back to the old semantics when
the default changes.

Test: make showcommands core-oj (in environments with
      EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295

Change-Id: I25accf14344a05349a6e97572d7c2c1f6a7f2063
2017-11-17 13:14:11 +00:00
Jeff Gaston
9da1cb4708 Implement diff_build_graphs.sh
am: ef633e0959

Change-Id: Ib55be2e3f2bbfd4f5207f8e3c69ed33c397f9c36
2017-11-17 03:25:28 +00:00
Jeff Gaston
8f11041096 multiproduct_kati support for a custom list of products
am: b61e3f79ec

Change-Id: I2b1095c0756ea18f4949bf1ff17e25bc8858e4df
2017-11-16 21:12:33 +00:00
Jeff Gaston
ef633e0959 Implement diff_build_graphs.sh
It runs multiproduct_kati against the pre-changed and post-changed
code and confirms that the ninja files remain unchanged

Test: ./diff_build_graphs.sh 'build/blueprint:work^' 'build/blueprint:work'
Bug: 67478260

Change-Id: Ib43f54428b7c5abbe7706f464ee16dc8d0ef6f76
2017-11-15 16:07:14 -08:00
Jeff Gaston
b61e3f79ec multiproduct_kati support for a custom list of products
Test: multiproduct_kati --products="aosp_arm,aosp_arm64"
Bug: 67478260
Change-Id: Icf7b8b0c30a2dc8e093ab109172675ff74f43adc
2017-11-15 15:31:38 -08:00
Colin Cross
c7155993ee Set -fomit-frame-pointer for all devices
am: 20823f95e6

Change-Id: I01bbd0dd9b777c2f48ffd5c036f2ef511c2c07a6
2017-11-15 21:48:15 +00:00
Colin Cross
20823f95e6 Set -fomit-frame-pointer for all devices
-fomit-frame-pointer was only being set for arm and mips.  Since
we always use unwind tables and not frame pointers to unwind, and
since ART generated code does not use frame pointers, just turn
off frame pointers everywhere to gain an extra register.

Bug: 68951394
Test: m checkbuild
Change-Id: I9237d486a0c0215cdafd96d66712082df0eba785
2017-11-15 18:52:42 +00:00
Colin Cross
f053a45ad9 Merge changes Iae2bda98,I68e64888,I75af16e7
am: d03553cf13

Change-Id: I775a10c73ab21f6afb102e7a0a1d8ef42d061137
2017-11-15 01:44:15 +00:00
Treehugger Robot
d03553cf13 Merge changes Iae2bda98,I68e64888,I75af16e7
* changes:
  Remove gcc-specific optimizations
  Move some flags to affect all devices
  Move -fvisibility-inlines-hidden to global device cppflags
2017-11-15 01:34:46 +00:00
Jiyong Park
bd913486bf Merge "Make cc.NewLLndkStubLibrary as public"
am: 31c3239038

Change-Id: I360c2eaa52ad750e0948a0f16aa82c963d54f6bb
2017-11-15 01:29:46 +00:00
Colin Cross
7b38d380bd Merge changes I5059a1e3,I5a06a893
am: fff8ad2f35

Change-Id: If2bde9159092b2b2dfcb1cc03885781555875db0
2017-11-15 01:29:17 +00:00
Dan Willemsen
ebe75b0228 Merge "Update default configuration"
am: 90377447c8

Change-Id: I6a064a213953d4279f185af19f2efa7fed4bfb98
2017-11-15 01:28:57 +00:00
Treehugger Robot
31c3239038 Merge "Make cc.NewLLndkStubLibrary as public" 2017-11-15 00:56:46 +00:00
Colin Cross
fff8ad2f35 Merge changes I5059a1e3,I5a06a893
* changes:
  Add --write_if_changed argument to soong_zip
  Add searchable android.DirectorySortedPaths
2017-11-14 23:44:25 +00:00
Treehugger Robot
90377447c8 Merge "Update default configuration" 2017-11-14 22:27:48 +00:00
Xin Li
359ff31875 Merge commit '1b7d80ae5c2edda4f50f9299a5daf93d43b20d5f' into HEAD
Change-Id: I9bee9e27bfbef55d89b2c92f4a8bd85f7edfdd18
2017-11-14 11:38:41 -08:00
Colin Cross
b37620f870 Remove gcc-specific optimizations
These flags were added for gcc, but are always stripped out when
compiling for clang.  Since gcc is barely used, removed them.

Bug: 68855788
Bug: 68947919
Test: m checkbuild
Change-Id: Iae2bda9808dd9499848ce145ccdf71c4c490b80e
2017-11-14 17:43:33 +00:00
Colin Cross
ea3141d06d Move some flags to affect all devices
Move -fdata-sections and -fno-short-enums to global device flags.
-fdata-sections was not previously set on x86[_64], -fno-short-enums
was not previously set on mips[64].

Bug: 68855788
Test: m checkbuild
Change-Id: I68e64888d5414fc022366eb2b6c5cd92c28a5542
2017-11-14 17:43:24 +00:00
Jiyong Park
64ca4b722a Make cc.NewLLndkStubLibrary as public
We need to extend llndk_library to automatically set symbol_file for the
llndk version of libclang_rt.asan* libraries.

Bug: 67011251
Test: build

Change-Id: Ib6964817759f9228456e4fb2a27fce3bc09423a9
2017-11-14 20:53:13 +09:00
Colin Cross
d7837c555a Merge "Revert "Test for dangling rules in make checkbuild""
am: c7d1254119

Change-Id: Ib9d84f0ebad31b2cdb14117c4d985f94bb53325a
2017-11-13 23:47:12 +00:00
Colin Cross
c7d1254119 Merge "Revert "Test for dangling rules in make checkbuild"" 2017-11-13 23:41:24 +00:00
Colin Cross
fb941913a3 Revert "Test for dangling rules in make checkbuild"
This reverts commit 7709a05770.

Reason for revert: Broke mac checkbuilds

Change-Id: If71ec9198ca8943d90ce9d5e3a277faf239e38a5
2017-11-13 23:38:57 +00:00
Colin Cross
26f14509d1 Move -fvisibility-inlines-hidden to global device cppflags
It was previously set on arm[64] and mips[64], this will cause it
to be set for x86[_64] too.

Bug: 68855788
Test: m checkbuild
Change-Id: I75af16e7d259963ad633cc664929144332bb435d
2017-11-13 15:18:19 -08:00
Colin Cross
f83c150269 Add --write_if_changed argument to soong_zip
Simplify making restat rules by adding a --write_if_changed argument
to soong_zip that generates the output file into memory and then
compares it to the version on disk before writing it out.

Test: builds
Change-Id: I5059a1e3a11e79b0ca538b3b829bc7479c126ce6
2017-11-13 15:11:08 -08:00
Colin Cross
5e6cfbead9 Add searchable android.DirectorySortedPaths
Add an android.DirectorySortedPaths that stores paths sorted such
that all paths in a directory including subdirectories are in a
contiguous subslice.  This will allow efficient O(log(N)) finding
of all paths in a directory using a binary search on the directory
prefix.

Test: TestDirectorySortedPaths in paths_test.go
Change-Id: I5a06a89351ae06e88c06526be54a6b79075361b7
2017-11-13 15:11:08 -08:00
Colin Cross
99bde85caa Merge "Test for dangling rules in make checkbuild"
am: df93350ccd

Change-Id: Ia375a2520cdd20a672262a9ac05fd063bf5de875
2017-11-13 22:52:43 +00:00
Dan Willemsen
cbf9e827a7 Update default configuration
This isn't often used, but the values were quite old. So update them to
something closer to aosp_arm64 from today.

Bug: 68803744
Test: m clean; m --skip-make libc
Change-Id: Id5c60b62e7c7a91635dea9669fc604d63d299778
2017-11-13 14:46:44 -08:00
Treehugger Robot
df93350ccd Merge "Test for dangling rules in make checkbuild" 2017-11-13 22:43:30 +00:00
Colin Cross
7709a05770 Test for dangling rules in make checkbuild
Get a list of leaf nodes in the dependency graph
from ninja, and make sure none of them are in the
output directory.  This ensures that there are no
rules that depend on a file in the output directory
that doesn't have rule to generate it.  The check
will catch a common set of build failures where
a rule to generate a file is deleted (either by
deleting a module in an Android.mk file, or by
modifying the build system incorrectly).  These
failures are often not caught by a local incremental
build because the previously built files are still
present in the output directory.

Bug: 36843214
Bug: 68062417
Test: manual
Change-Id: I4933187e8b72f2ef0c32d18ffea756e2c6fa417c
2017-11-13 12:47:42 -08:00
Nan Zhang
0791bbf4ca Merge "Change remaining properties to *string, *bool in Soong."
am: bafc47aea6

Change-Id: Iac23c846f87e6f7f607c9fa812da2cb6491019f3
2017-11-13 19:10:22 +00:00
Treehugger Robot
bafc47aea6 Merge "Change remaining properties to *string, *bool in Soong." 2017-11-13 19:04:56 +00:00
Dan Willemsen
4c6416c021 Merge "Send soong output to std.log in multiproduct_kati"
am: 08bb51cdc5

Change-Id: Ieee3e2c9b9245bb80c7c46aecb1241822d8f733f
2017-11-12 01:39:38 +00:00