Commit graph

8148 commits

Author SHA1 Message Date
Treehugger Robot
701a5d6faf Merge "Use --frontend_file for ninja instead of cat" 2018-07-18 07:29:31 +00:00
Dan Albert
1ee2a8b4d8 [automerger skipped] Merge "Stop versioning NDK stubs pre-M."
am: cdf399c40a  -s ours

Change-Id: I466bb6958f19c8d30b8fc0bed0c43c0cbab36b95
2018-07-17 21:59:19 -07:00
Treehugger Robot
cdf399c40a Merge "Stop versioning NDK stubs pre-M." 2018-07-18 01:13:49 +00:00
Dan Willemsen
027366751d Use --frontend_file for ninja instead of cat
Ninja now knows how to write directly to a file (or in our case, a named
pipe). This works around an issue we were seeing on Mac, where Go would
just hang after 50-2000 proto messages. It's also just a simpler
solution.

Bug: 111544015
Test: `m` with updated ninja on both Linux & Mac
Change-Id: Ic91920d83a6d2ea0b79e82b467e2423d78189f12
2018-07-17 17:54:31 -07:00
Sundong Ahn
241cd3747c Change classpath for droiddoc
When the module type is SdkLibraryDependency, the classpath has been
gotten from headerJar
Becuase droiddoc uses src files when it builds, we should change to use
ImplementationJars instead of headerJar.

Bug: 77577799
Test: make -j

Change-Id: I1a072be69d7edff5636ea80af700be7796c3b0fc
2018-07-17 23:52:49 +00:00
Dan Albert
e67144e302 Stop versioning NDK stubs pre-M.
Test: make ndk # readelf various stubs to check version info
Bug: https://github.com/android-ndk/ndk/issues/622
Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3
2018-07-17 23:26:00 +00:00
Dan Willemsen
01a870ea6a Merge "Turn overriding command warnings into errors by default" into stage-aosp-master 2018-07-17 20:04:02 +00:00
Olivier Gaillard
aaacff9d9a Add a Generate_get_transaction_name flag.
am: 0a4cfbc21a

Change-Id: I99ce1491cb01948c7b6cd09fdfbd53fafb8a42fb
2018-07-17 04:01:22 -07:00
Olivier Gaillard
0a4cfbc21a Add a Generate_get_transaction_name flag.
Add a flag to be able to generate the Binder#getTransactionName method

Test: manual
Bug: 111200705

Change-Id: I3e8106261df5c63cdc005d07c9d8efcc6732db70
2018-07-17 09:00:45 +00:00
Dan Willemsen
644e1a0329 Fix missing errors during lunch
am: c35b3813bb

Change-Id: Ib519f1ca419e322bbea3868e69fe0d3c5297348a
2018-07-16 23:00:34 -07:00
Dan Willemsen
9c58bf7008 Turn overriding command warnings into errors by default
All of the existing devices that have problems with this are setting
BUILD_BROKEN_DUP_RULES to true. Switch the behavior to default this to
an error.

Bug: 77611511
Test: check logs of all downstream build_test targets
Test: attempt to add an overriden command to hikey960 (uses default)
Change-Id: Ia83089f035925cf0c9883a1f593ae2da89fee568
2018-07-16 22:31:34 -07:00
Dan Willemsen
c35b3813bb Fix missing errors during lunch
Bug: 111499523
Test: lunch foo
Test: m nothing 2>/dev/null
Change-Id: Ife888d4b731bc0a0dd253ac0c8c97d6c37593d73
2018-07-16 19:59:10 -07:00
Dan Willemsen
80e43f1095 Add missing properties to android_test
am: f5531d2ed6

Change-Id: I3c6619a6c98e2431abbba0bfc5ef8e39eb97416d
2018-07-16 19:18:07 -07:00
Dan Willemsen
f5531d2ed6 Add missing properties to android_test
These are in the AndroidTest struct, and being exported by the AndroidMk
functions, but aren't in the list given to blueprint.

Test: add test_suites to an android_test, check Android-*.mk
Change-Id: I1e46638755cbb579f28ed14638baad43fde5cb96
2018-07-16 17:23:35 -07:00
Colin Cross
0907f39afd Merge changes I5b8522aa,I541aea75
am: cdec7e7ee1

Change-Id: Ib68f185498f593f0812f481b2c82753cd5956fa5
2018-07-16 17:20:20 -07:00
Colin Cross
20075eb84b Merge changes from topic "merge_zips_strip"
am: 6d6faa1a1f

Change-Id: I5f8d1c2aaff59a2af9156d71532fbe9da7181a4b
2018-07-16 17:19:09 -07:00
Colin Cross
4dd74530f4 Add tests for merge_zips
am: 2486065c43

Change-Id: Id0fcbd882cc37ef478a95a5bd5317264947523f5
2018-07-16 17:18:59 -07:00
Colin Cross
cdec7e7ee1 Merge changes I5b8522aa,I541aea75
* changes:
  Fix lint errors caught by go test
  Fix .kotlin_builtins glob
2018-07-17 00:14:33 +00:00
Treehugger Robot
6d6faa1a1f Merge changes from topic "merge_zips_strip"
* changes:
  Make merge_zips -stripFile use blueprint style globs
  Add tests for merge_zips
2018-07-17 00:09:58 +00:00
Colin Cross
fe5a3b7fac Fix lint errors caught by go test
Test: m checkbuild
Change-Id: I5b8522aa9da22fc595e4f26c23e7836de59bdfa2
2018-07-16 15:24:43 -07:00
Colin Cross
4c03f68763 Make merge_zips -stripFile use blueprint style globs
merge_zips -stripFile was only considering the name of the file and
ignoring the path.  Make it more useful by supporting blueprint style
globs.  The previous behavior can be recreated by prefixing with **/.

Bug: 111389216
Test: m checkbuild
Change-Id: I25760fe3f1f77704dd9da9d107d9a38a415d681f
2018-07-16 15:24:43 -07:00
Colin Cross
29788aad61 Fix .kotlin_builtins glob
The files in kotlin jars seem to be called .kotlin_builtins, not
.kotlin_builtin.

Test: m checkbuild
Change-Id: I541aea758bbef6bb23632836cceb8339b82ffdff
2018-07-16 15:24:43 -07:00
Colin Cross
2486065c43 Add tests for merge_zips
Test: merge_zip_test.go
Change-Id: I8fc577946b40cad193864aa2ebda1bef3a0e050e
2018-07-16 15:24:22 -07:00
Dan Willemsen
418bb9da03 Strip escape characters when TERM=dumb
am: 77fe361175

Change-Id: I3c2844dc57c48abb0688b76072861b6880af3cbb
2018-07-16 13:16:42 -07:00
Dan Willemsen
77fe361175 Strip escape characters when TERM=dumb
Bug: 111447427
Test: m nothing
Test: TERM=dumb m nothing
Test: m nothing | tee log
Change-Id: I041ec8a60e633393a145996d9ba7b5dae2880b06
2018-07-16 10:56:10 -07:00
Nan Zhang
9b54e8be60 Merge "Add more options in droiddoc.go"
am: dd41d7d631

Change-Id: Ie14cfee1b62743eec9356937208da2ec6801b191
2018-07-13 17:06:04 -07:00
Treehugger Robot
dd41d7d631 Merge "Add more options in droiddoc.go" 2018-07-13 22:41:43 +00:00
Dan Willemsen
e56941128c Merge "Move all status output to stdout"
am: b08468d2ab

Change-Id: Ie458b27d8e8146da0bcd5bcc9134205aad31e0a5
2018-07-13 09:08:30 -07:00
Treehugger Robot
b08468d2ab Merge "Move all status output to stdout" 2018-07-13 16:01:36 +00:00
Colin Cross
b2efa2f6a7 Merge "Add exclude_files and exclude_dirs properties to java_import"
am: d71f86a79c

Change-Id: If2c5d32f747ab3319bd50c3301e12a26858aeaba
2018-07-12 22:53:43 -07:00
Treehugger Robot
d71f86a79c Merge "Add exclude_files and exclude_dirs properties to java_import" 2018-07-13 05:40:07 +00:00
Dan Willemsen
f78a73444e Move all status output to stdout
I've noticed a few instances of interleaved status messages in between
lines in a terminal/Writer.Print call on our build servers. Since
there's a lock protecting everything we write, I've got to assume this
is a stdout vs stderr problem. Ninja had always been outputing to
stdout, except for error messages, which are now marked with FAILED:
like failed actions.

Test: m blueprint_tools
Test: m missing
Change-Id: Idf8320d40694abf212c902c63a9703e4440ffb7a
2018-07-12 21:59:49 -07:00
Dan Willemsen
dee406aad9 Fix race condition and logging
am: 9611199b94

Change-Id: Iad9f11142709c3529b2c0f567243f542fb9e6a7a
2018-07-12 21:12:00 -07:00
Dan Willemsen
4fb8a04bf7 Merge "Add a unified status reporting UI"
am: ecc71f8a49

Change-Id: I14711c1d49df5254a6efcf57993b5485fc5313a8
2018-07-12 21:06:24 -07:00
Dan Willemsen
9611199b94 Fix race condition and logging
The extra `defer os.Remove(fifo)` was sometimes racing with the next
instance of ninja, removing the file in between when it was re-created
and used. Since we're always removing the file before creating it, it's
safe to just remove that.

The error message for this failure wasn't all that good either, so move
so use the status Print/Error calls inside the goroutine instead of the
logging ones.

Test: `build/soong/build_test.bash -only-soong` repeatedly
Change-Id: Icfeb6b68802093bd3a07d3e46046ef7d1a89d4a1
2018-07-12 18:37:38 -07:00
Jiyong Park
7f413148ed Merge "Don't create non-primary arch variant for recovery-only module"
am: 9ea9fc3dee

Change-Id: Ibe1274c36c9233ee396d323544c6aa599f635ae5
2018-07-12 17:14:44 -07:00
Colin Cross
37f6d79c7e Add exclude_files and exclude_dirs properties to java_import
Prebuilt jars sometime contain files that we don't want.  In Make
we would delete everything in META-INF when importing jars, but
that caused problems when there were necessary files in there,
so we added LOCAL_DONT_DELETE_JAR_META_INF.

Soong does the opposite, keeping everything by default.  Add
properties to allow explicitly stripping unwanted files instead.

Bug: 111389216
Test: m checkbuild
Change-Id: I6d07f519ebc7d0e1bf0af93416bb569e3c2b1500
2018-07-12 16:59:59 -07:00
Treehugger Robot
ecc71f8a49 Merge "Add a unified status reporting UI" 2018-07-12 23:14:44 +00:00
Treehugger Robot
9ea9fc3dee Merge "Don't create non-primary arch variant for recovery-only module" 2018-07-12 22:58:52 +00:00
Dan Willemsen
b82471ad6d Add a unified status reporting UI
This adds a new status package that merges the running of "actions"
(ninja calls them edges) of multiple tools into one view of the current
state, and gives that to a number of different outputs.

For inputs:

Kati's output parser has been rewritten (and moved) to map onto the
StartAction/FinishAction API. A byproduct of this is that the build
servers should be able to extract errors from Kati better, since they
look like the errors that Ninja used to write.

Ninja is no longer directly connected to the terminal, but its output is
read via the protobuf frontend API, so it's just another tool whose
output becomes merged together.

multiproduct_kati loses its custom status routines, and uses the common
one instead.

For outputs:

The primary output is the ui/terminal.Status type, which along with
ui/terminal.Writer now controls everything about the terminal output.
Today, this doesn't really change any behaviors, but having all terminal
output going through here allows a more complicated (multi-line / full
window) status display in the future.

The tracer acts as an output of the status package, tracing all the
action start / finish events. This replaces reading the .ninja_log file,
so it now properly handles multiple output files from a single action.

A new rotated log file (out/error.log, or out/dist/logs/error.log) just
contains a description of all of the errors that happened during the
current build.

Another new compressed and rotated log file (out/verbose.log.gz, or
out/dist/logs/verbose.log.gz) contains the full verbose (showcommands)
log of every execution run by the build. Since this is now written on
every build, the showcommands argument is now ignored -- if you want to
get the commands run, look at the log file after the build.

Test: m
Test: <built-in tests>
Test: NINJA_ARGS="-t list" m
Test: check the build.trace.gz
Test: check the new log files
Change-Id: If1d8994890d43ef68f65aa10ddd8e6e06dc7013a
2018-07-12 14:15:31 -07:00
Colin Cross
fdd47236fc Merge "Unset envsetup.sh variables inside build"
am: 22739c3621

Change-Id: I4cebf6563f6699594e2f5afadb4b2a5a1b931731
2018-07-12 13:06:19 -07:00
Colin Cross
22739c3621 Merge "Unset envsetup.sh variables inside build" 2018-07-12 19:38:20 +00:00
Jiyong Park
37b252096a Don't create non-primary arch variant for recovery-only module
To save space, only the primary arch variant is installed to the
recovery partition. This has been done in the imageMutator by not
creating recovery variant for the non-primary arch.

However, this caused a problem for recover-only module, i.e., recovery:
true. Such module ends up creating no variant for the non-primary arch.
Since every other modules are at least in one image variant, any
dependency fro such module with no image variant can't be satisfied.

In order to solve the problem, archMutator is modified to create only
the primary arch for recovery-only modules.

Bug: 111321972
Test: m -j (TestRecovery added)
Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
2018-07-12 10:49:30 +09:00
Sundong Ahn
e609876f41 Merge "Change link type rule"
am: 9fab1220b9

Change-Id: If81c3ae25bb75d4ad7954daf0cf54ce398d1cf2f
2018-07-11 18:14:08 -07:00
Steven Moreland
341c08f323 Merge "Export: phonyFactory -> PhonyFactory"
am: 4a719a0ef0

Change-Id: I9a104e2ba3e4499c647b22de1670ab9c42ebdd08
2018-07-11 18:13:38 -07:00
Treehugger Robot
9fab1220b9 Merge "Change link type rule" 2018-07-12 01:05:11 +00:00
Treehugger Robot
4a719a0ef0 Merge "Export: phonyFactory -> PhonyFactory" 2018-07-12 00:17:29 +00:00
Sundong Ahn
57368eb515 Change link type rule
If linkType of a module is javaPlatform, the module will link to
<lib>.impl instead of <lib>.stubs.system.

Bug: 77577799
Test: make -j
Change-Id: I2a9a0ec7c76c0fc304935f16c4c371aea39bffd6
2018-07-11 23:56:17 +00:00
Nan Zhang
e2ba5d4c51 Add more options in droiddoc.go
These new options are required for online/offline-docs. These options
are only for Doclava, not Metalava.

Bug: b/70351683
Test: m -j offline-sdk-docs
Change-Id: Ie229821409d5640adfa6d7d05450e5f4c215b9b4
2018-07-11 15:35:24 -07:00
Steven Moreland
00e1e61bfb Export: phonyFactory -> PhonyFactory
When adding aidl_interface, the intention is to
have module name 'foo' create modules 'foo-cpp'
and 'foo-java' for consistency. I'm using a phony
module to reserve 'foo' as a name for future use
and also for sanity.

Bug: 111117220
Test: create a phony module using the factory and use it to build
Change-Id: Ib3214acb9b4bf48aa60a1a3c20b5d12129d1c3a6
2018-07-11 15:24:31 -07:00