Commit graph

7263 commits

Author SHA1 Message Date
Dan Willemsen
906a608451 Use Config/DeviceConfig functions to access ProductVariables
am: 3fb1faeeb9

Change-Id: I729b297ed40dc8fe3476ee2d9cff097374433cc1
2018-04-10 18:52:34 -07:00
Dan Willemsen
0fe7866897 Add VendorConfig for board-level Soong plugin configuration
This allows Soong (Go) plugins to get custom configurations set in the
current product's BoardConfig.mk.

I'll have some more comprehensive documentation later, but the general
concept is that you'd have one namespace per plugin, defined in the
BoardConfig.mk (though they would work in the product.mk files too):

  SOONG_CONFIG_NAMESPACES += myPlugin

Within that namespace you can set key-value pairs:

  SOONG_CONFIG_myPlugin := key1 key2 ...
  ...
  SOONG_CONFIG_myPlugin_key1 := value
  ...
  SOONG_CONFIG_myPlugin_key2 := true

Then in your plugin, you can ask for your namespace:

  vars := ctx.Config().VendorConfig("myPlugin")

And then use them:

  str := vars.String("key1")
  if vars.Bool("key2") { ... }
  if vars.IsSet("key3") { ... }

Warning: It's not a good idea to fail on missing inputs, since an
android tree may contain plugins from multiple owners, and we may
configure your modules (but not build/install them) even if they're not
meant for the currently configured product.

Bug: 76168832
Test: define some variables, use them
Test: m blueprint_tools
Change-Id: I4c38f5a4344022c6f332de279d9bbef24502e741
2018-04-11 01:45:37 +00:00
Dan Willemsen
45133ac184 Make Config.ProductVariables private
All access to these should be going through the methods on Config /
DeviceConfig.

Bug: 76168832
Test: m blueprint_tools
Change-Id: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
2018-04-11 01:45:29 +00:00
Dan Willemsen
674dc7f7f0 Expose ProductVariables from TestConfig
In preparation for unexporting ProductVariables, explicitly return a
pointer to the structure from TestConfig / TestArchConfig.

Bug: 76168832
Test: m blueprint_tools
Change-Id: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
2018-04-11 01:45:22 +00:00
Dan Willemsen
3fb1faeeb9 Use Config/DeviceConfig functions to access ProductVariables
An upcoming change will stop exporting ProductVariables from Config, so
switch to using existing accessor functions, and add more when they're
missing.

Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
2018-04-11 01:45:14 +00:00
Colin Cross
38b40dffd6 Use proptools.BoolDefault
Replace x == nil || *x with proptools.BoolDefault(x, true)

Test: m checkbuild
Change-Id: Icc5378cab3ea72d86544b40761c2f00b278cc0a1
2018-04-10 16:26:10 -07:00
Colin Cross
0f9be9a4f5 Merge "Add java_test and java_test_host" am: 47f98af97f
am: 6c2f92bab6

Change-Id: Id284ec9287b264c37ffbf5346900a22693dd57d5
2018-04-10 16:08:59 -07:00
Colin Cross
a7c8f5a4e0 Allow wildcards in java_resource_dirs am: 0ead1d75ce
am: 79dbe712d7

Change-Id: I8f5c89b6339ed9a1253b30f6e1883cb3208ab2a0
2018-04-10 16:03:55 -07:00
Colin Cross
6c2f92bab6 Merge "Add java_test and java_test_host"
am: 47f98af97f

Change-Id: I2fcee815e282b6ea79234c0ace1c136f54faa3a4
2018-04-10 16:03:54 -07:00
Colin Cross
79dbe712d7 Allow wildcards in java_resource_dirs
am: 0ead1d75ce

Change-Id: Ie9b8764b2b2254f3dc7241bcdb9c5ce55d08a905
2018-04-10 15:58:49 -07:00
Treehugger Robot
47f98af97f Merge "Add java_test and java_test_host" 2018-04-10 22:53:30 +00:00
Colin Cross
0ead1d75ce Allow wildcards in java_resource_dirs
Expand java_resource_dirs using ctx.Glob before globbing inside it
in case it has wildcards in it.  Fixes:
internal error: panic in GenerateBuildActions for module "icu4j" variant "linux_glibc_common"
path "external/icu/icu4j/main/classes/charset/src/META-INF" does not start with "external/icu/icu4j/main/classes/*/src"

Test: java_test.go
Change-Id: Icd28b7a3dd14752642fb0ec8d41bbd6e30f81a68
2018-04-10 20:12:47 +00:00
Colin Cross
05638fc76f Add java_test and java_test_host
java_test is equivalent to a java_library with a default junit
dependency and marked as a test in Make for installation and
automatic AndroidTest.xml generation.

Bug: 70770641
Test: m checkbuild
Change-Id: I9ca97521e952d121db46abff6f24f274dd7a3ad7
2018-04-10 20:12:38 +00:00
Colin Cross
17eddb6cc8 Use built SDK stubs am: f19b9bb981
am: cf3a11aa94

Change-Id: Ic6db9dd0a5d641cb9572aeda7526b9b31459c027
2018-04-10 12:23:06 -07:00
Colin Cross
cf3a11aa94 Use built SDK stubs
am: f19b9bb981

Change-Id: Icb4e96595f0845c8e93d35bda7086060cb7aee18
2018-04-10 11:21:34 -07:00
Jayant Chowdhary
c1ba7a19ab [automerger skipped] Merge "Add informational message to help with updation of VNDK abi references." into pi-dev
am: 195f53c0f2  -s ours

Change-Id: Ic1ba939d343c05e73084972c156e28798023c072
2018-04-10 10:52:30 -07:00
Jayant Chowdhary
195f53c0f2 Merge "Add informational message to help with updation of VNDK abi references." into pi-dev 2018-04-10 17:35:27 +00:00
Colin Cross
f19b9bb981 Use built SDK stubs
Now that the SDK stubs are built in Soong, undo the hack that
uses the prebuilt stubs.

Fix the linktype checks to treat the various stubs libraries as
the correct type, since they can't be annotated with sdk_version.

Bug: 70351683
Bug: 77285514
Test: m checkbuild
Change-Id: I5e870c34dd0ebc8ae3f888ec627da590c846a76f
2018-04-10 17:06:21 +00:00
Colin Cross
3bd9e3d753 Remove deviceProperties from BinaryHostFactory am: 559795114d
am: bb6528c368

Change-Id: Ic0e0746c7c005ab8456cfe196b7a731b7eb1ecba
2018-04-10 10:01:47 -07:00
Colin Cross
bb6528c368 Remove deviceProperties from BinaryHostFactory
am: 559795114d

Change-Id: Ie451d214a55a5ebef26f4a7dcf81b07e5317cecd
2018-04-10 09:56:44 -07:00
Colin Cross
559795114d Remove deviceProperties from BinaryHostFactory
java_binary_host should not include the device-only properties.

Test: m checkbuild
Change-Id: Ief6b0a0e98310f7a4f3684c4632f618d73f10bdd
2018-04-10 14:43:59 +00:00
Kweku Adams
62158b433d Fixing protoOutParams concatenation.
ParseGeneratorParameter delimits based on commas, not colons:
external/protobuf/src/google/protobuf/compiler/code_generator.cc

Bug: 72570104
Test: flash device with new build
Change-Id: I00042782a718d288ca6b0cb78f856d0fb223a926
(cherry picked from commit fb5b31ce96)
2018-04-09 12:04:49 -07:00
Jayant Chowdhary
e3ee2f5e67 Add informational message to help with updation of VNDK abi references.
Bug: 64267858

Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor, build fails with helpful message.

Test: create reference dump for libjpeg; add exported function to libjpeg;
      m -j libjpeg.vendor dist DIST_DIR=dist, build fails with helpful message.

Merged-In: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
Change-Id: Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a
(cherry picked from commit d8b70a39d1)
(cherry picked from commit 301aa8a8dcb0a92e96ffbf1aa2da3ca49ce2bda9)
2018-04-09 09:46:49 -07:00
Jeff Gaston
4447ff7d38 Have pom2mk list all duplicates modules
For easier debugging if there are multiple duplicates

Bug: 76692459
Test: ./update_current.py -x <build-id>

Change-Id: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
Merged-In: I3079cb4ed1cfd365d792a7b41c9cdb4e7a1e148f
2018-04-09 12:44:13 -04:00
Jeff Gaston
15a7f83104 Have pom2mk include runtime deps too
It still excludes test deps though

Bug: 76692459
Test: ./update_current.py -x <build-id>

Change-Id: I55a786e9feab31f99b95b7cebe84869757e46270
Merged-In: I55a786e9feab31f99b95b7cebe84869757e46270
2018-04-09 12:44:07 -04:00
Alan Viverette
b035d85ae8 [automerger skipped] Always include JAR dependencies (not just with --static-deps) in Makefile
am: d95159cb33  -s ours

Change-Id: Iffa7ca81b246bee1c8e390f5e1dbbcd08c16d0fc
2018-04-09 08:52:50 -07:00
Alan Viverette
d95159cb33 Always include JAR dependencies (not just with --static-deps) in Makefile
Bug: 76692459
Test: ./update_current.py -x <build-id>
Change-Id: Ie0f77e52089adbe153d668fe39902545f469f2d2
Merged-In: Ie0f77e52089adbe153d668fe39902545f469f2d2
2018-04-06 13:20:44 -04:00
Kweku Adams
74f58c4849 Merge "Fixing protoOutParams concatenation." am: eacf1a6e85
am: e819d2b345

Change-Id: I8969a5bf4532c4f71fc353f326b83bf1c563194e
2018-04-06 10:05:45 -07:00
Kweku Adams
e819d2b345 Merge "Fixing protoOutParams concatenation."
am: eacf1a6e85

Change-Id: Iac5729bd16b484946de389fa9ce84f8cfe793ddd
2018-04-06 10:01:13 -07:00
Treehugger Robot
eacf1a6e85 Merge "Fixing protoOutParams concatenation." 2018-04-06 16:48:15 +00:00
Dan Willemsen
e66a2c96dc Allow boards to turn overriding commands into an error am: 3d60b115a0
am: faf45dedac

Change-Id: I06717df87681cb05a1fd0028ed1e9bb4f5b80557
2018-04-06 09:12:07 -07:00
Dan Willemsen
faf45dedac Allow boards to turn overriding commands into an error
am: 3d60b115a0

Change-Id: I6eb0d7d34a206922be59bc9501b11ca141fbbe18
2018-04-06 09:08:41 -07:00
Kweku Adams
fb5b31ce96 Fixing protoOutParams concatenation.
ParseGeneratorParameter delimits based on commas, not colons:
external/protobuf/src/google/protobuf/compiler/code_generator.cc

Bug: 72570104
Test: flash device with new build
Change-Id: I00042782a718d288ca6b0cb78f856d0fb223a926
2018-04-05 17:48:32 -07:00
Steven Moreland
ab4a214c76 Merge "Add vintf_fragments." am: 51ba4a7970
am: f974294c86

Change-Id: I0ed4fbbe7193687c9176a60bee639024b323612d
2018-04-05 16:24:34 -07:00
Dan Willemsen
3d60b115a0 Allow boards to turn overriding commands into an error
Many board still have this problem, but if we can switch some over,
we'll prevent global problems and have the ability to clean boards up
one-by-one.

Bug: 77611511
Test: lunch aosp_arm-eng; m nothing
Test: lunch aosp_marlin-eng; m nothing
Test: build_test on all downstream branches
Change-Id: I78bee44adde2059d01188658b9050927748d2028
2018-04-05 16:23:10 -07:00
Steven Moreland
f974294c86 Merge "Add vintf_fragments."
am: 51ba4a7970

Change-Id: Ia0000d21cf4cf5608549e997c06e01771b649dd3
2018-04-05 16:17:55 -07:00
Treehugger Robot
51ba4a7970 Merge "Add vintf_fragments." 2018-04-05 23:09:14 +00:00
Jeff Gaston
8fe16e50f7 Merge changes I3079cb4e,I55a786e9 am: fdc24d2f91
am: 5aaa818f96

Change-Id: I58c82332af1ac9f83c25dc9e4e6fdb297cd64963
2018-04-05 14:30:40 -07:00
Jeff Gaston
5aaa818f96 Merge changes I3079cb4e,I55a786e9
am: fdc24d2f91

Change-Id: Id1dcda0f1558eb475234fd0a1a87219bdd1e1ec5
2018-04-05 14:24:09 -07:00
Treehugger Robot
fdc24d2f91 Merge changes I3079cb4e,I55a786e9
* changes:
  Have pom2mk list all duplicates modules
  Have pom2mk include runtime deps too
2018-04-05 21:10:31 +00:00
Steven Moreland
57a23d2f20 Add vintf_fragments.
Bug: 66917623
Test: fragments are loaded in the right place
Test: boot device which is depending on fragments
Test: androidmk file which uses LOCAL_VINTF_FRAGMENTS properly
    converted
Change-Id: I366b731cf8d5ecf51851866f441ff1c517da75cf
2018-04-05 20:33:01 +00:00
Ryan Prichard
0fed7c8647 Fix mini_debug_info stripping when no symbols should be kept.
am: d2cc96c24a

Change-Id: I036366c1145000b25775da7371c280df5502a550
2018-04-04 18:15:54 -07:00
Jayant Chowdhary
c29ca8e329 Merge "Add informational message to help with updation of VNDK abi references." am: bc30a77591
am: dcd9c60461

Change-Id: I188545b2c980001e4f87ffe3e6d0fb070ae898e4
2018-04-04 17:14:44 -07:00
Jayant Chowdhary
dcd9c60461 Merge "Add informational message to help with updation of VNDK abi references."
am: bc30a77591

Change-Id: I824e905c05b326fab2e69da30e1c6c8d54162460
2018-04-04 17:04:41 -07:00
Jayant Chowdhary
bc30a77591 Merge "Add informational message to help with updation of VNDK abi references." 2018-04-04 23:40:06 +00:00
Ryan Prichard
d2cc96c24a Fix mini_debug_info stripping when no symbols should be kept.
If there are no symbols to keep (i.e. all function symbols are also in
the dynsym table), then the "${outfile}.keep_symbols" file has size 0.
When objcopy parses a --keep-symbols file, it has a special case for
0-sized files where it silently fails (exits with status 1, no error
message). On the other hand, objcopy is happy with a file containing no
symbols, as long as there is some whitespace or a comment. Avoid the
special case by appending a newline to keep_symbols.

Bug: b/62815515
Bug: b/77242617
Test: manual
Change-Id: I90fd3258426176dc18aa5a8c19389c55fe6329c7
(cherry picked from commit afefacf196)
2018-04-04 15:56:28 -07:00
Ryan Prichard
ec90794d08 Merge "Fix mini_debug_info stripping when no symbols should be kept." am: 4c65916c4e
am: 78b43b934f

Change-Id: Id4a91497f131a9dc51a13fab763dca36e88c193a
2018-04-03 21:56:29 -07:00
Ryan Prichard
78b43b934f Merge "Fix mini_debug_info stripping when no symbols should be kept."
am: 4c65916c4e

Change-Id: Ic2c651a9e1e6ea43185d6e1910f12a991e414c1b
2018-04-03 21:48:17 -07:00
Treehugger Robot
4c65916c4e Merge "Fix mini_debug_info stripping when no symbols should be kept." 2018-04-04 04:28:52 +00:00
Yifan Hong
172a7e3f29 [automerger skipped] Add overrides to cc_binary
am: d452a42d9d  -s ours

Change-Id: Ic0d4e6b1a535cba68dae85d7c0616b06b60b3eba
2018-04-03 20:42:44 -07:00