Commit graph

7263 commits

Author SHA1 Message Date
Colin Cross
10f450962a Merge "Reverse RRO dir paths when passing to Make" am: 5ddf292268
am: f5a9cca054

Change-Id: I90e4766ef62487963dd10b7138af01effcafef79
2018-04-18 15:35:11 -07:00
Colin Cross
9d0af2e737 Merge "Fix aapt2 --min-sdk-version after finalized SDK"
am: 59bcf6e631

Change-Id: I56bde0f49c2931dc105471effbe5ea80d009ac29
2018-04-18 15:32:18 -07:00
Colin Cross
f5a9cca054 Merge "Reverse RRO dir paths when passing to Make"
am: 5ddf292268

Change-Id: I3ff9ae83c75a3b8a10270fbf1bcc98c2e3e64663
2018-04-18 15:32:06 -07:00
Colin Cross
9ccbc6036d Reverse RRO dir paths when passing to Make
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last.  Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.

Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
Merged-In: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
(cherry picked from commit a140bb05f1)
2018-04-18 15:26:55 -07:00
Colin Cross
59bcf6e631 Merge "Fix aapt2 --min-sdk-version after finalized SDK" 2018-04-18 22:22:25 +00:00
Colin Cross
5ddf292268 Merge "Reverse RRO dir paths when passing to Make" 2018-04-18 22:22:06 +00:00
Pirama Arumuga Nainar
6c77d18183 Fix few issues with filegroups am: 955dc4999e
am: daf0ac55ea

Change-Id: I28fe1931c64564cf1a0f34e4a0cc042e6c9ccc9e
2018-04-18 14:15:29 -07:00
Pirama Arumuga Nainar
daf0ac55ea Fix few issues with filegroups
am: 955dc4999e

Change-Id: Iaf017c917db2b5fe6c1844461ceeba3d8372270d
2018-04-18 14:12:23 -07:00
Colin Cross
e20c1b1904 Fix aapt2 --min-sdk-version after finalized SDK
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.

Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
Merged-In: I622eaf92f8a940f79007c2a579536da325700b06
(cherry picked from commit d09b0b653b)
2018-04-18 12:48:02 -07:00
Colin Cross
d09b0b653b Fix aapt2 --min-sdk-version after finalized SDK
aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
Add PlatformSdkCodename() for non-finalized SDKs, use it for
DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.

Bug: 78224641
Test: TestAppSdkVersion in app_test.go
Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
2018-04-18 12:39:25 -07:00
Pirama Arumuga Nainar
955dc4999e Fix few issues with filegroups
Bug: http://b/64121881
Bug: http://b/78188880

- Allow filegroup's properties to be extended by a LoadHook
- Support a filegroup (':module') in a prebuilt's 'Srcs' property to
export files from a different path as the prebuilt's sources.

This change also includes a refactoring that moves genrule/filegroup.go
to android/filegroup.go so that FileGroupFactory is visible in
prebuilt_test.go.

Test: Test
https://android-review.googlesource.com/c/platform/development/+/469159
in clang-tools branch on Linux, Darwin.  Test regular build in
aosp/master.

Change-Id: I3ff6215ab2e62955f039fd1086c31f1bd50ebcf6
2018-04-18 18:56:33 +00:00
Jayant Chowdhary
159fdcfbf6 [automerger skipped] Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks." into pi-dev
am: 31db990217  -s ours

Change-Id: Ibc8bf0d15e302e1412ac8d94326def8f901bc956
2018-04-18 11:22:41 -07:00
Jayant Chowdhary
31db990217 Merge "Setting SKIP_ABI_CHECKS=true will make soong skip native abi checks." into pi-dev 2018-04-18 18:08:00 +00:00
Nelson Li
1f6b14e822 build/make: set LOCAL_NATIVE_BENCHMARK for Google Benchmark Test
Set LOCAL_NATIVE_BENCHMARK to true. Then, build system can use it
to auto generate the related Test config file of Google Benchmark
Test

Bug:74844131
Test: Use mm to rebuild any module in cc_benchmark
Change-Id: I6a8f1ff78f7aec3f4eb17e218845f0cdf3f57f32
2018-04-18 17:28:57 +00:00
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
Jiyong Park
5fb8c10f2b Add double_loadable property and checks for it
double_loadable is a property that tells whether a module is capable or
being loaded with other instance (possibly an older version) of the same
module in the same process. Currently, a shared library that is a member
of VNDK can be double loaded in a vendor process if the library is also
a dependency of an LLNDK library. Such libraries now must be explicitly
marked as `double_loadable: true` by the owner, or the dependency from
the LLNDK lib should be cut if the lib is not designed to be double
loaded.

Bug: 77155589
Test: m -j
Merged-In: I3b839f860cbdc01f43b59872cd7bb84ac4a7d73e
Change-Id: I3b839f860cbdc01f43b59872cd7bb84ac4a7d73e
(cherry picked from commit 89943d8be2)
2018-04-18 11:46:51 +09:00
Chih-Hung Hsieh
3101a969aa Define clang lld flags for hosts.
* Add -fuse-ld=lld to hostGlobalLldflags.
* Set up *ClangLldflags variables for hosts.
  They are the same as *ClangLdflags, but could be changed in the future.

Bug: 73768157
Test: make checkbuild
Change-Id: I3d61504ab7262d472bbf933df7c1a9bef62519e1
2018-04-17 16:01:08 -07: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
Jayant Chowdhary
0e5afde2f6 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

Merged-In: I6330bc6de81abd589e78572af8efdf70d4c69b80
Change-Id: I6330bc6de81abd589e78572af8efdf70d4c69b80
(cherry picked from commit b391feaea5)
2018-04-17 12:25:53 -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
Colin Cross
a140bb05f1 Reverse RRO dir paths when passing to Make
LOCAL_RESOURCE_DIRS puts the highest priority overlay first, but
aapt2 expects the highest priority overlay last.  Soong stores the
list in aapt2 order (low to high priority), but that means when it
exports to Make as LOCAL_SOONG_RRO_DIRS, which goes to
build_rro_package.mk and then package_internal.mk, it gets reversed
again and comes out backwards.

Bug: 78032566
Test: m checkbuild
Change-Id: If72bf929fbf1d126f9051a2f21ec1eb4e3030e6e
2018-04-17 10:53:54 -07: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