Commit Graph

7193 Commits

Author SHA1 Message Date
Anton Hansson
cbe6a7f772 Merge "Migrate soong to use new sdk prebuilts." am: 6284323772
am: f6677ff743

Change-Id: I85ea8ded0b03f52adac92ab58e0685162468c6b3
2018-04-18 08:46:56 -07:00
Anton Hansson
f6677ff743 Merge "Migrate soong to use new sdk prebuilts."
am: 6284323772

Change-Id: I8a957d1c32847d96509373ee71ef5648d9dcd480
2018-04-18 08:42:24 -07:00
Anton Hansson
6284323772 Merge "Migrate soong to use new sdk prebuilts." 2018-04-18 15:33:46 +00:00
Anton Hansson
f66efeb4ef Migrate soong to use new sdk prebuilts.
Make is moved over in aosp/661963.

Bug: 77525052
Test: make
Change-Id: I04ea58964df3d4149ef09ab7ca9238336d338a06
2018-04-18 14:53:59 +01:00
Dan Willemsen
643d6c1abb [automerger skipped] Add VendorConfig for board-level Soong plugin configuration
am: 8328367c44  -s ours

Change-Id: Ie20759462cb1ecbfa275a66ad4e4fedc7324813f
2018-04-17 13:23:19 -07:00
Dan Willemsen
8124d65e32 [automerger skipped] Make Config.ProductVariables private
am: d57ed550fd  -s ours

Change-Id: Ia315f4f600ceeecfce74928f52d8c195feb335c1
2018-04-17 13:23:13 -07:00
Dan Willemsen
2c6706222d [automerger skipped] Expose ProductVariables from TestConfig
am: cb3bff1b65  -s ours

Change-Id: I51b67f9be6c2e4e1702fb062d992a5924261ad1a
2018-04-17 13:23:08 -07:00
Dan Willemsen
b15a8f84f1 [automerger skipped] Use Config/DeviceConfig functions to access ProductVariables
am: 050ca73dbf  -s ours

Change-Id: I8d2a79b8672161ea9a74d7ae3f0480a713a36193
2018-04-17 13:23:01 -07:00
Dan Willemsen
2242c59b05 [automerger skipped] Add DistPath to reference the dist folder
am: e9216117dd  -s ours

Change-Id: I579e716baeed28d6b01536ae6039fdf170a47302
2018-04-17 13:22:56 -07:00
Dan Willemsen
580f40eac7 [automerger skipped] Switch PackageContext functions to take a ctx
am: bf4f0a0965  -s ours

Change-Id: I87081f073cb4a661ebb6014dd5a151b8736f5ca5
2018-04-17 13:22:49 -07:00
Dan Willemsen
bd288c003e [automerger skipped] Remove obsolete Brillo variable
am: 0c1f7bd956  -s ours

Change-Id: If40fabbfe592eed626c08c603c4f8c10e03a8e9c
2018-04-17 13:22:43 -07:00
Dan Willemsen
af9c40d8da Merge "Fix ABI diff reporting with dist" am: 556752d3d4
am: 860d3a907f

Change-Id: Icec22e75caf3128b24055656564b1802c67bcc3c
2018-04-17 12:52:14 -07:00
Dan Willemsen
860d3a907f Merge "Fix ABI diff reporting with dist"
am: 556752d3d4

Change-Id: Iaef70296d2206d6b4fd890fd9e06783637802799
2018-04-17 12:46:09 -07:00
Jayant Chowdhary
d0b76712fd Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks." am: 7e88af3258
am: b90c85da9e

Change-Id: Iff9150c64ef1afe2e185a7946fb7a010bffcaee5
2018-04-17 12:40:08 -07:00
Treehugger Robot
556752d3d4 Merge "Fix ABI diff reporting with dist" 2018-04-17 19:35:35 +00:00
Jayant Chowdhary
b90c85da9e Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks."
am: 7e88af3258

Change-Id: I57f738b492f7c0037924408c8616dfb2713c42e4
2018-04-17 12:30:19 -07:00
Treehugger Robot
7e88af3258 Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks." 2018-04-17 19:16:28 +00:00
Jayant Chowdhary
b391feaea5 Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks.
Bug: 78118272

Bug: 72225642

Test: SKIP_ABI_CHECKS=true mm -j64 in external/libjpeg-turbo; no abi
      dumping / diffing happens

Test: SKIP_ABI_CHECKS=false mm -j64 in external/libjpeg-turbo; abi
      dumping / diffing happens

Test: SKIP_ABI_CHECKS=foo mm -j64 in external/libjpeg-turbo; abi
      dumping / diffing happens

Change-Id: I6330bc6de81abd589e78572af8efdf70d4c69b80
2018-04-17 18:13:45 +00:00
Dan Willemsen
edd1ae0817 Fix ABI diff reporting with dist
When we're doing ABI diffing, we run something like:

  (run-abi-diff) || (echo && exit 1)

When `dist` is added, we attempt to copy out the result:

  (run-abi-diff) || (echo) && (copy && exit 1)

But this always fails, since it will always run exit 1. We really want
the parenthesis around the entire second section. This change switches
it to:

  (run-abi-diff) || (echo && (copy) && exit 1)

This matches the behavior before Iae25374fe937a0cbe8a8ddf9e23c3bc1f62bbb2a

Test: treehugger on P
Change-Id: Ic39da4d4630ee950b811ec7854d55d65c52f8661
2018-04-17 10:42:18 -07:00
Dan Willemsen
8328367c44 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
Merged-In: I4c38f5a4344022c6f332de279d9bbef24502e741
(cherry picked from commit 0fe7866897)
2018-04-17 10:34:23 -07:00
Dan Willemsen
d57ed550fd 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
Merged-In: I47512dd58fb1a1a3f25838a9b1adaed2c41af8d3
(cherry picked from commit 45133ac184)
2018-04-17 10:34:23 -07:00
Dan Willemsen
cb3bff1b65 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
Merged-In: Iccfb4c912f8e0ee3f620cc1ee00f0cdc5cba7735
(cherry picked from commit 674dc7f7f0)
2018-04-17 10:34:23 -07:00
Dan Willemsen
050ca73dbf 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
Merged-In: Ie0135bdbd2df3258ef3ddb53e5f8fc00aa9b97f7
(cherry picked from commit 3fb1faeeb9)
2018-04-17 10:34:23 -07:00
Dan Willemsen
e9216117dd Add DistPath to reference the dist folder
Instead of open-coding the logic of whether there is one, or where to
find it.

Bug: 76168832
Test: diff out/soong/build.ninja without dist
Test: diff out/soong/build.ninja with dist specified
Change-Id: Ia3f1ef335e2d6e2175343338d04867d778a50300
Merged-In: Ia3f1ef335e2d6e2175343338d04867d778a50300
(cherry picked from commit bc0c509267)
2018-04-17 10:34:23 -07:00
Dan Willemsen
bf4f0a0965 Switch PackageContext functions to take a ctx
So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).

Bug: 76168832
Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
Merged-In: I8cb524b09a84d0b8357d7c3501c71270af411e17
(cherry picked from commit 54daaf0371)
2018-04-16 19:27:14 -07:00
Dan Willemsen
0c1f7bd956 Remove obsolete Brillo variable
Unlike the original change on master, this does not remove
product_variables.brillo, as I'm not backporting all of the other
removal CLs.

Bug: 76168832
Test: none
Change-Id: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
Merged-In: I6a5ce57b317f0cdae1abef15def01e6a31e18d3e
(cherry picked from commit a052599bb6)
2018-04-16 19:27:14 -07:00
Colin Cross
b8e76ed258 [automerger skipped] Merge "Fix module rename inside namespace" into pi-dev
am: 0f7e692fff  -s ours

Change-Id: Ib96f0590ee1fae9d07ba1020d9a776b889ea8f55
2018-04-16 18:37:35 -07:00
TreeHugger Robot
0f7e692fff Merge "Fix module rename inside namespace" into pi-dev 2018-04-17 01:07:32 +00:00
Nan Zhang
f430c3dce8 Merge "Add bool to control if we need generate stubs src files." am: 423245dcc3
am: 3f8cbe202b

Change-Id: I2e3fbe0b3a53948b780e356dc03c49e8130b1633
2018-04-16 17:40:53 -07:00
Colin Cross
a8c09e7840 Merge changes I9fb94f22,I1dfac5ff am: 038f71d7d7
am: 288fd5d41e

Change-Id: I462d57eb90d57c67bd5f5987806e8e36653f2fcd
2018-04-16 17:39:31 -07:00
Nan Zhang
3f8cbe202b Merge "Add bool to control if we need generate stubs src files."
am: 423245dcc3

Change-Id: If69932d8d3bf2a721226c19d42404f6eaa65db37
2018-04-16 17:19:50 -07:00
Colin Cross
288fd5d41e Merge changes I9fb94f22,I1dfac5ff
am: 038f71d7d7

Change-Id: I8ed3ab221939497f8fffb95a1a591626128ff0f8
2018-04-16 17:19:17 -07:00
Treehugger Robot
423245dcc3 Merge "Add bool to control if we need generate stubs src files." 2018-04-17 00:08:22 +00:00
Treehugger Robot
038f71d7d7 Merge changes I9fb94f22,I1dfac5ff
* changes:
  Fix androidmk_test.go import ordering
  Add support for android_library modules
2018-04-17 00:05:25 +00:00
Colin Cross
4957e33b37 Merge "Fix module rename inside namespace" am: a42770b18a
am: 9684d4184d

Change-Id: I530604dfe74eadabdcae1e757f70814b1ea5329a
2018-04-16 16:22:30 -07:00
Colin Cross
9684d4184d Merge "Fix module rename inside namespace"
am: a42770b18a

Change-Id: I0bc5131c4356af86cb5c0928efc1908f72dd54e4
2018-04-16 16:13:40 -07:00
Colin Cross
2071266b28 Fix module rename inside namespace
Rename was expecting fully qualified names, but context.go always
passes it short names.

Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
Merged-In: I552ff39fd8ed6ba6da4262925060b45104840ff7
(cherry picked from commit eafb10c23a)
2018-04-16 16:06:53 -07:00
Treehugger Robot
a42770b18a Merge "Fix module rename inside namespace" 2018-04-16 23:04:37 +00:00
Colin Cross
fdb084029f Fix androidmk_test.go import ordering
Test: m checkbuild
Change-Id: I9fb94f22a157ffb9369eea071a867289c37cf026
2018-04-16 15:27:19 -07:00
Colin Cross
a97c5d3f08 Add support for android_library modules
Add support for compiling android_library modules into AARs,
and refactor app support on top of it.

Bug: 73724997
Test: app_test.go
Change-Id: I1dfac5fffe577c6680bc4709147b2061eb7d819c
2018-04-16 15:24:47 -07:00
Colin Cross
405efc4681 Merge changes I3ad2a356,I30955b6e,I1dc6fd99 am: ad6cbf18da
am: 4452800c84

Change-Id: I74eb2259a58f64fbb62cbb6131dab60078922ce3
2018-04-16 15:05:31 -07:00
Colin Cross
4452800c84 Merge changes I3ad2a356,I30955b6e,I1dc6fd99
am: ad6cbf18da

Change-Id: I16b4c22e0fba384faba36086633d396ab2d110a7
2018-04-16 15:01:06 -07:00
Colin Cross
ad6cbf18da Merge changes I3ad2a356,I30955b6e,I1dc6fd99
* changes:
  Add more androidmk translations for android libraries
  Merge matching properties in bpfix
  Make bpfix not modify the input tree
2018-04-16 21:47:20 +00:00
Colin Cross
eafb10c23a Fix module rename inside namespace
Rename was expecting fully qualified names, but context.go always
passes it short names.

Bug: 77922456
Test: TestRename in namespace_test.go
Change-Id: I552ff39fd8ed6ba6da4262925060b45104840ff7
2018-04-16 21:38:15 +00:00
Makoto Onuki
afd657ab4d Soong: add "java_genrule_host" am: 8f9ab6a26b
am: 1bb9940f3e

Change-Id: I896dad87010f44b1504687d7f2bf402772a6aec0
2018-04-16 13:56:03 -07:00
Makoto Onuki
1bb9940f3e Soong: add "java_genrule_host"
am: 8f9ab6a26b

Change-Id: Id36b1b843b68e1dda9fd06d9b38eb80aa1da1918
2018-04-16 13:52:58 -07:00
Colin Cross
2dee86d69c Add more androidmk translations for android libraries
Add support for translating LOCAL_MANIFEST_FILE, LOCAL_RESOURCE_DIR
LOCAL_SHARED_ANDROID_LIBRARIES, and LOCAL_STATIC_ANDROID_LIBRARIES.

Use the presence of non-empty LOCAL_RESOURCE_DIR,
LOCAL_SHARED_ANDROID_LIBRARIES or LOCAL_STATIC_ANDROID_LIBRARIES
to convert a java_library_static into an android_library module,
and then squash LOCAL_SHARED_ANDROID_LIBRARIES into
LOCAL_SHARED_LIBRARIES and LOCAL_STATIC_ANDROID_LIBRARIES into
LOCAL_STATIC_LIBRARIES.

Test: androidmk_test.go
Change-Id: I3ad2a3561f69ebd097eca97cb170754d64e06123
2018-04-16 17:32:23 +00:00
Colin Cross
9c55d237f6 Merge matching properties in bpfix
androidmk will start to generate multiple static_libs: properties
in a single module, add a pass in bpfix to fix them up into a
single property.

Test: bpfix_test.go
Change-Id: I30955b6efbb767c02ba77f2f18d44951ef094bad
2018-04-16 17:32:16 +00:00
Colin Cross
adee968a4b Make bpfix not modify the input tree
Make a new object called Fixer to hold the state of the tree, and
make a copy of the input tree so the original doesn't get modified.

Test: bpfix_test.go
Change-Id: I1dc6fd99158c8b0e1db029df99e6cf72699a5e63
2018-04-16 17:32:08 +00:00
Makoto Onuki
8f9ab6a26b Soong: add "java_genrule_host"
Bug: 78030154
Test: Tested with an internal test module.
Change-Id: Ifaefb7cba2eb491b62fa3b398fee931ab667575f
2018-04-13 16:37:22 -07:00