Commit graph

6206 commits

Author SHA1 Message Date
Jeff Gaston
577287d084 Merge "Remove unused property" am: 491ace3c0a
am: 3181870d1f

Change-Id: I80c062106d0ab7cc233ded84cc084e5999b1f739
2018-03-01 16:35:14 +00:00
Jeff Gaston
3181870d1f Merge "Remove unused property"
am: 491ace3c0a

Change-Id: Iea675b40d041034f2fd9f90642cf43b21bc0f2e1
2018-03-01 16:27:40 +00:00
Jeff Gaston
491ace3c0a Merge "Remove unused property" 2018-03-01 16:14:03 +00:00
Colin Cross
1e2e55182c Merge "Fix finding next symbol when multiple symbols have the same address" am: 8d43b7cf81
am: fd316aa69c

Change-Id: I017036c19ae53d12575b0951ed54dc97c7c0d891
2018-03-01 05:52:52 +00:00
Colin Cross
fd316aa69c Merge "Fix finding next symbol when multiple symbols have the same address"
am: 8d43b7cf81

Change-Id: I188c96f3bd6fab327e961b06817813ee4e02bd4f
2018-03-01 05:43:13 +00:00
Treehugger Robot
8d43b7cf81 Merge "Fix finding next symbol when multiple symbols have the same address" 2018-03-01 05:15:42 +00:00
Nan Zhang
7f5686aee1 Change name of droiddoc target output to *-stubs.srcjar am: 3bb14200e2
am: b1e6641a77

Change-Id: I43a8440c4ed4404097d9e2f2e947b03c8f1cc9e9
2018-03-01 02:25:37 +00:00
Nan Zhang
b1e6641a77 Change name of droiddoc target output to *-stubs.srcjar
am: 3bb14200e2

Change-Id: I68ffb9ca9c86da503f8ba4911d405438a6e895f8
2018-03-01 02:20:27 +00:00
Nan Zhang
3bb14200e2 Change name of droiddoc target output to *-stubs.srcjar
Test: m -j core-docs
Bug: b/70351683
Change-Id: If8c00a9992d262b7cd4c95794073591dcc245bd2
2018-02-28 16:15:05 -08:00
Colin Cross
dfce764476 Fix finding next symbol when multiple symbols have the same address
Some exe files have a .data symbol at the same address as the
soong_build_number symbol.  If the .data symbol is after
soong_build_number in the symbol list, symbol_inject would think
the end address was the same as the start address, and use
uint32(-1) as the size.

Use sort.Search to find the first symbol whose section number is
the same as the target symbol, but whose address is higher than
the target symbol.

Test: manual
Change-Id: I51d6e53c6b906222ba68c5cf93be944843e23550
2018-02-28 15:04:59 -08:00
Jeff Gaston
f7542544d2 Remove unused property
Bug: 72552085
Test: androidmk prebuilts/sdk/current/support/Android.mk \
      | grep LOCAL_UNINSTALLABLE_MODULE && echo failed

Change-Id: Idcdd571812594599267985dfef2cc2fc6efbb5ba
2018-02-28 15:00:15 -05:00
Colin Cross
98eaa17e73 Merge changes I41d1c3c3,I9de0a0f5 am: 0c74ad9381
am: 8c5d337c80

Change-Id: I409410fe9fd745a23124e7307ceac561092429e9
2018-02-27 23:11:56 +00:00
Colin Cross
8c5d337c80 Merge changes I41d1c3c3,I9de0a0f5
am: 0c74ad9381

Change-Id: I6f496938039222eedfe42724fa34ba497e98fa15
2018-02-27 23:06:41 +00:00
Treehugger Robot
0c74ad9381 Merge changes I41d1c3c3,I9de0a0f5
* changes:
  Sort macho symbol table entries
  Fix symbol_inject on win32 exes
2018-02-27 22:55:21 +00:00
Colin Cross
2077c15150 Report errors when opening config files am: 15cd21a492
am: aa14355b6a

Change-Id: If8c21d072d2eafb12233b82b824f854715caf462
2018-02-27 22:26:02 +00:00
Colin Cross
aa14355b6a Report errors when opening config files
am: 15cd21a492

Change-Id: I3625ab981fae0c9d647c5a1c37d67e7807c68264
2018-02-27 22:21:00 +00:00
Colin Cross
15cd21a492 Report errors when opening config files
The error handling when opening config files was ignoring all errors
except ENOEXIST.  Report other errors, instead of passing nil to
json.NewDecoder and getting:
config file: out/soong/soong.config did not parse correctly: invalid argument

Bug: 73951413
Test: touch out/soong/soong.config && chmod a-r out/soong/soong.config && m
Test: rm out/soong/soong.config && m
Change-Id: I4a609b7f060b760b76ee829b83c0eb405340f58f
2018-02-27 19:30:40 +00:00
Colin Cross
c4a18e0291 Sort macho symbol table entries
macho symbol table entries are not always in order, which breaks
finding the next symbol to find the size of the target symbol.

Test: build_version_test
Change-Id: I41d1c3c3ff9929694e9ec2b034553d6b7ddef937
2018-02-23 22:45:55 -08:00
Colin Cross
64c6d4bf14 Fix symbol_inject on win32 exes
Win32 exes seem to prefix each symbol with an underscore like
macho.

Test: build_version_test
Change-Id: I9de0a0f5f25f93ad17d34b7c1b993511c77a57eb
2018-02-23 18:24:48 -08:00
Colin Cross
a544914e5f Merge changes I84868c92,If1690a70,Ia9aeb2ff am: d2092dbc0d
am: 113265ec4c

Change-Id: Ibe5499bd0ce393703bbf51d9227ac3ad57db4a7f
2018-02-24 01:02:49 +00:00
Colin Cross
113265ec4c Merge changes I84868c92,If1690a70,Ia9aeb2ff
am: d2092dbc0d

Change-Id: Ib6f5ac0c1a6c6d30f692ccbef52d78318820f540
2018-02-24 00:56:32 +00:00
Colin Cross
d2092dbc0d Merge changes I84868c92,If1690a70,Ia9aeb2ff
* changes:
  Use PathForSource instead of PathsForSource
  Move AllowMissingDependencies check from PathsForSource to PathForSource
  Pass nil instead of []string{} to ctx.Glob* functions
2018-02-24 00:39:56 +00:00
Dan Willemsen
fb408c8e6d Merge "Add proto.canonical_path_from_root" am: 7c695eb797
am: c530837d4c

Change-Id: I0b3d042cf8cbb997274ad612b56b750eae0b86d5
2018-02-23 20:55:21 +00:00
Dan Willemsen
c530837d4c Merge "Add proto.canonical_path_from_root"
am: 7c695eb797

Change-Id: I072c8db0a9b8d4f351adc21d5eaf59b1e02f3f28
2018-02-23 20:49:18 +00:00
Dan Willemsen
7c695eb797 Merge "Add proto.canonical_path_from_root" 2018-02-23 20:38:10 +00:00
Colin Cross
480cd76672 Use PathForSource instead of PathsForSource
This reapplies If1690a708393964d3030cb908beaf7b6897c0084.

PathForSource does the AllowMissingDependencies check now, use it
instead of PathsForSource.

Test: m checkbuild
Change-Id: I84868c92ee43779f9b5c8b285dac92f5f87b018c
2018-02-23 11:31:45 -08:00
Colin Cross
192e97a95c Move AllowMissingDependencies check from PathsForSource to PathForSource
This reapplies Id7925999a27ea75a05e9301bbf1eb9f9a6bc4652 with
additional fixes to not use PathForSource in PathForModuleSrc.

PathsForSource was handling the AllowMissingDependencies case, but
PathForSource was not.  Refactor PathForSource and
ExistentPathForSource, and add logic to PathForSource to fall back
to behavior similar to ExistentPathForSource when
AllowMissingDependencies is set.

PathForModuleSrc uses PathForSource, which causes too many
globs (>50k).  The AllowMissingDependencies check doesn't make
much sense for PathForModuleSrc, since we already know the
project containing the definition of the module exists, we can
expect its local source files to exist.  Use pathForSource and
do an manual existence check instead.

Test: paths_test.go
Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: If1690a708393964d3030cb908beaf7b6897c0084
2018-02-23 11:31:45 -08:00
Colin Cross
461b445d62 Pass nil instead of []string{} to ctx.Glob* functions
[]string{} is unnecessary, just use nil.

Test: m ALLOW_MISSING_DEPENDENCIES=true
Change-Id: Ia9aeb2ffc483429787da0e473a7f1bc87eb4cad1
2018-02-23 11:31:45 -08:00
Colin Cross
dd5d40eb37 Merge "Revert "Use PathForSource instead of PathsForSource"" am: 0c18d451d2
am: be6724dd30

Change-Id: I3713d1fa4a5e0121e6de2e6c87c3c170cd8a9276
2018-02-23 07:46:23 +00:00
Colin Cross
be6724dd30 Merge "Revert "Use PathForSource instead of PathsForSource""
am: 0c18d451d2

Change-Id: Iaad079afd21e00dd92bb7cefc177bfed198c125e
2018-02-23 07:39:52 +00:00
Colin Cross
0c18d451d2 Merge "Revert "Use PathForSource instead of PathsForSource"" 2018-02-23 07:32:19 +00:00
Colin Cross
d543f37598 Revert "Move AllowMissingDependencies check from PathsForSource to PathForSource" am: c48c14369c
am: 6fe8d17dd2

Change-Id: I5daa9f0d88314ab10bda27f2aa3e89dd3da6276e
2018-02-23 07:23:16 +00:00
Colin Cross
6fe8d17dd2 Revert "Move AllowMissingDependencies check from PathsForSource to PathForSource"
am: c48c14369c

Change-Id: Ib0a5754a9958a8876573a744f28bb93276831e91
2018-02-23 07:18:44 +00:00
Colin Cross
c48c14369c Revert "Move AllowMissingDependencies check from PathsForSource to PathForSource"
This reverts commit 94a321045a.

Reason for revert: Broke builds with ALLOW_MISSING_DEPENDENCIES=true

Change-Id: I9604887f796a79809ef8d6c741597796219dcaf3
2018-02-23 07:09:15 +00:00
Colin Cross
5a49e1c65e Revert "Use PathForSource instead of PathsForSource"
This reverts commit 9d37831dd3.

Reason for revert: Broke builds with ALLOW_MISSING_DEPENDENCIES=true

Change-Id: Ibff79642f747b83364c83d6b298334121028e02d
2018-02-23 07:08:43 +00:00
Colin Cross
945aebf48e Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503 am: 1b5599e462
am: b3407069ee

Change-Id: Ib0f7f8e93842cea36b915c1e10929f96249c20e3
2018-02-23 02:38:58 +00:00
Colin Cross
b3407069ee Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503
am: 1b5599e462

Change-Id: If6ed7347189045341276d527b1fd555400203899
2018-02-23 02:34:06 +00:00
Treehugger Robot
1b5599e462 Merge changes If1894fd9,Id7925999,I4fe11c3f,Iea2b0781,Id2c0a503
* changes:
  Use PathForSource instead of PathsForSource
  Move AllowMissingDependencies check from PathsForSource to PathForSource
  Propagate errors out of validatePath
  Add t.Run and t.Helper to paths_test.go
  Remove unused intermediates parameter from ExistentPathForSource
2018-02-23 02:28:35 +00:00
Dan Willemsen
ab9f4268c0 Add proto.canonical_path_from_root
Historically, we've always passed '-I .' as the first argument to
protoc, essentially treating all proto file package names as their full
path in the android source tree. This would make sense in a monorepo
world, but it makes less sense when we're pulling in external projects
with established package names.

So keep the same default (for now), but allow individual builds to opt
into using local paths as the default names with
'canonical_path_from_root: false'. A cleanup effort and/or large scale
change in the future could change the default to false.

As part of this, run protoc once per input proto file, since the flags
may need to change per-file. We'll also need this in order to specify
--dependency_out in the future.

Bug: 70704330
Test: aosp/master build-aosp_arm.ninja is identical
Test: aosp/master soong/build.ninja has expected changes
Test: m
Test: Build protobuf test
Change-Id: I9d6de9fd630326bbcced1c62a4a7e9546429b0ce
2018-02-22 16:48:35 -08:00
Colin Cross
230c992943 Fix java_import and android_library_import conversions am: 336ad7a667
am: b4b91fa725

Change-Id: Ideeda0de950d7f153558b8691abacff8aa76c329
2018-02-22 23:32:44 +00:00
Colin Cross
f1a271a4d0 Don't pretend *parser.List is immutable am: 3fad895e75
am: 0ae9d91508

Change-Id: I2dbdf6343e9d58df94e5133744811ca8b7e24d33
2018-02-22 23:32:36 +00:00
Colin Cross
dc425fe743 Soong AAR prebuilt support am: fabb608b27
am: cb7137994f

Change-Id: I90f4d95a810685c3622ee3e5d38f59bc91fe6da6
2018-02-22 23:32:32 +00:00
Colin Cross
380c9a1f87 Add aapt includes for prebuilt SDK jars am: 9ca6942956
am: 022c52e269

Change-Id: I8fdda06cba16df50fd217a9fcdbea936f95b1edc
2018-02-22 23:32:23 +00:00
Colin Cross
b4b91fa725 Fix java_import and android_library_import conversions
am: 336ad7a667

Change-Id: Ib4963012cee1f839ef141e61676d60365cb674c1
2018-02-22 23:28:41 +00:00
Colin Cross
0ae9d91508 Don't pretend *parser.List is immutable
am: 3fad895e75

Change-Id: I342ed780933174e1126980c9f658891c0c73dd80
2018-02-22 23:28:36 +00:00
Colin Cross
cb7137994f Soong AAR prebuilt support
am: fabb608b27

Change-Id: I38ce0673ecbd0b81e29f433480dcbd2e295b9eea
2018-02-22 23:28:29 +00:00
Colin Cross
022c52e269 Add aapt includes for prebuilt SDK jars
am: 9ca6942956

Change-Id: Ic940e06a20e8d299f147e53531f78fbc5af593dc
2018-02-22 23:28:23 +00:00
Dan Willemsen
73e1814213 Merge "Only depend on a single file for generated headers" am: 2f2f24f775
am: 463a23efc3

Change-Id: I21780fcd1966c8174e7067d2ace53f06036742fa
2018-02-22 23:13:30 +00:00
Nan Zhang
a400bb400c Droiddoc Support in Soong am: 581fd21e91
am: 2ea76706b3

Change-Id: I240c145395bd018f75398502390650e3f475dc2e
2018-02-22 23:11:15 +00:00
Dan Willemsen
463a23efc3 Merge "Only depend on a single file for generated headers"
am: 2f2f24f775

Change-Id: Iedf323be7d0feb84bd0c38c1a3e1f26fc33e8329
2018-02-22 23:00:43 +00:00