Commit graph

6774 commits

Author SHA1 Message Date
Dan Willemsen
f66010de07 Turn GlobFiles into a Glob for files, use it am: 540a78c1ce am: f49ff89266
am: a7070c158c

Change-Id: I06f6cc4481f826de7f7923630c2de344c84603a6
2018-03-02 00:29:39 +00:00
Dan Willemsen
a7070c158c Turn GlobFiles into a Glob for files, use it am: 540a78c1ce
am: f49ff89266

Change-Id: I291699269cdf463bd6ccbf0ed6cdda67cfb3a298
2018-03-02 00:24:07 +00:00
Dan Willemsen
f49ff89266 Turn GlobFiles into a Glob for files, use it
am: 540a78c1ce

Change-Id: Ia5811eb2fe2db20d4ab8e554341b875392cc345a
2018-03-02 00:18:04 +00:00
Dan Willemsen
540a78c1ce Turn GlobFiles into a Glob for files, use it
GlobFiles had allowed results to be anywhere in the source tree,
restrict it to results within the current module directory.

Then use it for ExpandSources and other places where we only want files.
This fixes using '*' in cc_test's `data` property, which can only
support files.

The only thing this changes today is that java_resource_dirs and
java_resources no longer pass directories to soong_zip's -f argument.
core-libart previously added some icu directories, now it only passes
files.

Bug: 71906438
Test: only expected changes in out/soong/build.ninja
Test: add data: ["**/*"] to a cc_test, build successfully
Change-Id: Iff1bd8c005a48e431c740706d7e23f4f957d8b1d
2018-03-01 14:05:20 -08:00
Dan Willemsen
003e0f3d2a Merge "Add droiddoc_template" am: f6366cc0a1 am: 1ba2989d4f
am: 6f535b5476

Change-Id: I83324c0727741921d549b4435916b98087b07a83
2018-03-01 18:16:27 +00:00
Dan Willemsen
6f535b5476 Merge "Add droiddoc_template" am: f6366cc0a1
am: 1ba2989d4f

Change-Id: Id872ecbf0e3ad835b89a171000938789aaf0a3c0
2018-03-01 18:10:16 +00:00
Dan Willemsen
1ba2989d4f Merge "Add droiddoc_template"
am: f6366cc0a1

Change-Id: I0b977eea1f67813615ca3eadb02bb4456f0abf3e
2018-03-01 18:04:47 +00:00
Dan Willemsen
f6366cc0a1 Merge "Add droiddoc_template" 2018-03-01 17:53:25 +00:00
Jeff Gaston
4035d9e3f3 Merge "Remove unused property" am: 491ace3c0a am: 3181870d1f
am: 577287d084

Change-Id: I8642a88ce510c238a79c987a3f23a9dafe2f13d4
2018-03-01 16:40:47 +00:00
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
90c6ce37aa Merge "Fix finding next symbol when multiple symbols have the same address" am: 8d43b7cf81 am: fd316aa69c
am: 1e2e55182c

Change-Id: I8389f5e0dca989b738be67604c7b3ea08b9d7fc2
2018-03-01 06:08:42 +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
429b71ea11 Change name of droiddoc target output to *-stubs.srcjar am: 3bb14200e2 am: b1e6641a77
am: 7f5686aee1

Change-Id: I81aa0f094cad9f7c00fa7dcbc77c758fccd2d4c4
2018-03-01 02:30:12 +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
Dan Willemsen
cc09097359 Add droiddoc_template
We prefer not to use absolute paths in modules, but to reference modules
that have associated paths. This a few benefits:

* it's easier to move a module than to update all the references
* if the module doesn't exist, we treat it as a normal missing
dependency, not having to deal with the missing dependency in path.go
* implementing visibility(etc) in the future would be simpler if there
was a module attached to the reference, so we don't have to do various
path-based lookups to try and match things up.

So define a `droiddoc_template` module, which takes a path, and will run
the glob once in that module. All of the `droiddoc` modules can then
specify it through the `custom_template` property, which will pull the
necessary data.

Also fix that htmldirs should be references from the local path, the
htmldir2 argument never being specified, and complain if more than two
htmldirs are specified, or if the custom template isn't specified.

Test: m core-docs
Test: out/soong/build.ninja is nearly identical
      - line numbers in comments
      - adds directories to droiddoc template dependency lists, which
        is more correct, since we need to rerun on added or removed
	files too.
Change-Id: Iff630bddb3818b8eeed439de7e41fc7fbe7cdcb0
2018-03-01 02:10:51 +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
be5ee2db09 Merge changes I41d1c3c3,I9de0a0f5 am: 0c74ad9381 am: 8c5d337c80
am: 98eaa17e73

Change-Id: I119f406b661373fc8b45413c8f48665e8e81923a
2018-02-27 23:17:37 +00: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
439b95a68b Report errors when opening config files am: 15cd21a492 am: aa14355b6a
am: 2077c15150

Change-Id: Ia4e8bda652317eed42a9e559f881eddf5a6ada12
2018-02-27 22:31:05 +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
761955541f Merge changes I84868c92,If1690a70,Ia9aeb2ff am: d2092dbc0d am: 113265ec4c
am: a544914e5f

Change-Id: I5ffddc29b0006e763fef2cb2c4c315306a8a36d1
2018-02-24 01:08:43 +00: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
6c3ba6c46c Merge "Add proto.canonical_path_from_root" am: 7c695eb797 am: c530837d4c
am: fb408c8e6d

Change-Id: I6bfe260cc2c8d67f73bdbb1eb70ee1df6bf33de4
2018-02-23 21:00:53 +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
77b3dc4172 Merge "Revert "Use PathForSource instead of PathsForSource"" am: 0c18d451d2 am: be6724dd30
am: dd5d40eb37

Change-Id: I0cabaeee1add960ea94ba2b06985655dcfe9efe8
2018-02-23 07:52:06 +00: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
0071b0d8bd Revert "Move AllowMissingDependencies check from PathsForSource to PathForSource" am: c48c14369c am: 6fe8d17dd2
am: d543f37598

Change-Id: Id00030c0a6253237777b6ccf69bcb6ee63550668
2018-02-23 07:28:49 +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