Commit graph

7247 commits

Author SHA1 Message Date
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
Wale Ogunwale
7eb34fd4f0 Finalizing P SDK
am: 0148f91348

Change-Id: I136999e68af2352e36c00fd5e9f674f274f3a135
2018-04-13 14:07:17 -07:00
Chih-Hung Hsieh
505b2c69ac Add USE_CLANG_LLD and use_clang_lld. am: 02b4da53a7
am: 98fda157fb

Change-Id: I3fc25e6332ae02dc4736e1f77b6de52822968d80
2018-04-13 12:44:15 -07:00
Chih-Hung Hsieh
98fda157fb Add USE_CLANG_LLD and use_clang_lld.
am: 02b4da53a7

Change-Id: I98a3bde9bb2c7b6ff6784b6e842ebdf3525f7bea
2018-04-13 12:36:39 -07:00
Nan Zhang
853f420ed7 Add bool to control if we need generate stubs src files.
Some modules only need the documentation instead of the stubs.

And fix a small issue for arg name passed to standard javadoc.

Test: m -j dx-docs and check the build.ninja
Bug: b/70351683
Change-Id: Ic47c53db12db6f2632349e48c4a626a4f432f447
2018-04-12 18:05:40 -07:00
Chih-Hung Hsieh
02b4da53a7 Add USE_CLANG_LLD and use_clang_lld.
* USE_CLANG_LLD is unedefined in current builds.
* When USE_CLANG_LLD is defined to 'true' or '1',
  use clang's lld instead of ld or ld.gold.
* When lld is enabled:
  * ld-only flags are not passed to 'lld'.
  * location_packer is disabled.
  * Use new lld's --pack-dyn-relocs=android.
* When lld does not work:
  * In Android.mk files use LOCAL_USE_CLANG_LLD := false.
  * In Android.bp files use use_clang_lld: false.
* Only arm, arm64, x86, and x86_64_devices have LLD flags;
  all other hosts and targets do not call lld yet.

Bug: 73768157
Test: make checkbuild and boot
Change-Id: I06b8a1e868a600997a7e70fe05c299d751d23d5f
2018-04-12 14:37:35 -07:00
Wale Ogunwale
0148f91348 Finalizing P SDK
Bug: 77588754
Test: builds
Change-Id: I07930ba9ca1f8b60a45109c4cc08ed2f17ea19fa
2018-04-12 06:43:59 -07:00
Kweku Adams
363d3b4086 resolve merge conflicts of 13a828764c to pi-dev-plus-aosp
BUG: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2261e8bc842e58aff89135036a7abc176a75f7b6
2018-04-11 16:49:25 -07:00
Inseob Kim
bb34873db5 Merge "Remove early-return statements of link-type check" am: 18f568f651
am: 0221151a8d

Change-Id: I323a1e145f8056363348a0a871d4ebc700661d84
2018-04-11 16:28:37 -07:00
Inseob Kim
0221151a8d Merge "Remove early-return statements of link-type check"
am: 18f568f651

Change-Id: I25d2c216ca28e3c543af59ecf99588b5ea4dadc4
2018-04-11 16:25:02 -07:00
Treehugger Robot
18f568f651 Merge "Remove early-return statements of link-type check" 2018-04-11 23:18:32 +00:00
TreeHugger Robot
13a828764c Merge "Fixing protoOutParams concatenation." into pi-dev 2018-04-11 23:02:14 +00:00
Colin Cross
f5a4488d82 Merge "Consistently use Bool instead of proptools.Bool" am: b3f16dea37
am: e56f26526c

Change-Id: Idb3d752fa245e611454cbfe6dc2c3eae22d7b29c
2018-04-11 08:01:27 -07:00
Colin Cross
e56f26526c Merge "Consistently use Bool instead of proptools.Bool"
am: b3f16dea37

Change-Id: Ibfd7205b616690b45092307b2a4f21c15363055e
2018-04-11 07:54:53 -07:00
Colin Cross
b3f16dea37 Merge "Consistently use Bool instead of proptools.Bool" 2018-04-11 14:46:31 +00:00
Inseob Kim
5e6f0101a0 Fix misleading error messages am: 34b22839f2
am: 500156a876

Change-Id: Iead759a89f9fb169e9535ee9ee2223dbc27c5d4a
2018-04-11 02:21:24 -07:00
Inseob Kim
47133f0fdd Check compatibility between STLs correctly am: 01a2872c05
am: 5604c01bb6

Change-Id: I0ec936d25c6143633426eb6d8df8d870dde8a210
2018-04-11 02:21:14 -07:00
Inseob Kim
500156a876 Fix misleading error messages
am: 34b22839f2

Change-Id: Ib7b8f6908659bdf9a879501d7b1ab99086fe4ab4
2018-04-11 02:15:19 -07:00
Inseob Kim
5604c01bb6 Check compatibility between STLs correctly
am: 01a2872c05

Change-Id: I87bc0248810969dd08f82cde02cec27d01e143f8
2018-04-11 02:15:13 -07:00
Inseob Kim
da2171ae9d Remove early-return statements of link-type check
Bug: 77834464
Test: m -j
Change-Id: I75e431ee48e23130167d1fafbe80e88c8222d79b
2018-04-11 06:45:38 +00:00
Inseob Kim
34b22839f2 Fix misleading error messages
Bug: 77834464
Test: None
Change-Id: I5c21625d1e6406399f5c397ac466f3d36a2c0cbc
2018-04-11 06:08:56 +00:00
Inseob Kim
01a2872c05 Check compatibility between STLs correctly
During link-type check, if a module with sdk_version "current" refers
another, compatibility check between STLs has not been performed.

Bug: 77834464
Test: m -j succeeded
Change-Id: Id82a39372670daca779d4fb4af2deb202170a2fd
2018-04-11 06:08:47 +00:00
Colin Cross
ff3ae9da74 Consistently use Bool instead of proptools.Bool
Use Bool instead of proptools.Bool and String instead of proptools.String.

Test: m checkbuild
Change-Id: I32d84add9f27128c7a65413e9612fd920613584f
2018-04-10 22:50:34 -07:00
Colin Cross
25f6677370 Merge "Use proptools.BoolDefault" am: ed1268268d
am: 72510f2a27

Change-Id: I9c7901cdf5a24a48edac64ba3a4b8e047d4ba81a
2018-04-10 21:55:44 -07:00
Colin Cross
72510f2a27 Merge "Use proptools.BoolDefault"
am: ed1268268d

Change-Id: I608029e2b081f111332bb164ac7841c8d34b6741
2018-04-10 21:49:41 -07:00
Colin Cross
ed1268268d Merge "Use proptools.BoolDefault" 2018-04-11 04:38:31 +00:00
Dan Willemsen
32af22e2ef Add VendorConfig for board-level Soong plugin configuration am: 0fe7866897
am: 954230537d

Change-Id: I606059a27cdec3172ce38ffef2eaa5eca399f60d
2018-04-10 18:58:26 -07:00
Dan Willemsen
1fb615df28 Make Config.ProductVariables private am: 45133ac184
am: 1a837ac9fa

Change-Id: I73f7889bce4a6fe506d34623a68e337b5e290cb9
2018-04-10 18:58:20 -07:00
Dan Willemsen
0de9c08e03 Expose ProductVariables from TestConfig am: 674dc7f7f0
am: e4436b5ab2

Change-Id: Iafcdea1220e6bd7c4ced667e585e439792acf572
2018-04-10 18:58:15 -07:00
Dan Willemsen
ce4f5b0ae7 Use Config/DeviceConfig functions to access ProductVariables am: 3fb1faeeb9
am: 906a608451

Change-Id: I67b75f04bd377fe2eb4865d9ad6397167c65bbef
2018-04-10 18:58:10 -07:00
Dan Willemsen
954230537d Add VendorConfig for board-level Soong plugin configuration
am: 0fe7866897

Change-Id: I6058211a8ad94de272ef501439dbf462a1ebd65b
2018-04-10 18:52:45 -07:00
Dan Willemsen
1a837ac9fa Make Config.ProductVariables private
am: 45133ac184

Change-Id: Id1829fbffc2ba82005aaaef6afd3b4e959e873c1
2018-04-10 18:52:41 -07:00
Dan Willemsen
e4436b5ab2 Expose ProductVariables from TestConfig
am: 674dc7f7f0

Change-Id: I130d3425854c56f9e53793140e1aaa76accab619
2018-04-10 18:52:38 -07:00
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