Commit graph

1230 commits

Author SHA1 Message Date
Inseob Kim
9b36280d08 Merge "Clean up sortedKeys function" am: b6fd6f75f2
am: a0ea84a72c

Change-Id: I168d2021a29a4f6e5e46ceec964999cc07677fa7
2019-06-10 12:24:16 -07:00
Treehugger Robot
b6fd6f75f2 Merge "Clean up sortedKeys function" 2019-06-10 19:16:14 +00:00
Colin Cross
abcb92804f Merge "Revert "Consolidate *MutatorContext and ModuleContext into BaseModuleContext"" am: 90ef4b9c12
am: 437679ddd1

Change-Id: Ie2ca6bc1c4df204333baaa3ba0d69c0db7842bc7
2019-06-10 11:18:00 -07:00
Colin Cross
380c69aab4 Revert "Consolidate *MutatorContext and ModuleContext into BaseModuleContext"
This reverts commit 7e0a2cb590.

Reason for revert: broke TARGET_BUILD_APPS builds

Change-Id: I5316a62f77bb38f6195e3df5e31b073dbd1eb682
2019-06-10 17:49:58 +00:00
Colin Cross
9d5d72f7a6 Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4be
am: 236ac108f5

Change-Id: Ia0777130add15aceb17739f5dcb613ca4e1bf172
2019-06-10 10:00:33 -07:00
Inseob Kim
1a365c6a7f Clean up sortedKeys function
This introduces a generic function SortedStringKeys which can be used to
get a slice of sorted string keys for all kinds of maps having string
keys.

Bug: N/A
Test: m
Change-Id: I542194c68984d909b7ad1dbf060d4d3a98f0ef23
2019-06-08 16:10:38 +09:00
Colin Cross
7e0a2cb590 Consolidate *MutatorContext and ModuleContext into BaseModuleContext
Following 99bdb2ab4fd5168a71a20aecf10611425be47ec4 in build/blueprint,
move more methods into BaseModuleContext.

Test: m checkbuild
Change-Id: I9f8df94f1ae2b55d3cccf7b9468247f3e7cb2ebd
2019-06-07 13:29:12 -07:00
Colin Cross
0ea8ba82fc Consolidate baseContext, BaseContext, and BaseModuleContext
blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators).  The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.

Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
2019-06-06 20:01:31 -07:00
Colin Cross
4157e88427 Rename ModuleBase receivers
I3b23590b8ce7c8a1ea1139411d84a53163288da7 renamed AndroidModuleBase
to ModuleBase, but left the receivers called 'a'.  Rename them to
'm' to match the type.

Test: m checkbuild
Change-Id: I0ebb738152febfd9a2a56ac0b197f19f9e01a1e7
2019-06-06 20:01:23 -07:00
Colin Cross
25de6c30d3 Remove repetition in android package names
Types in the android package don't need to be prefixed with 'android'.

Test: m checkbuild
Change-Id: Ieefcfc1a2c4161d9c412f40ef31867149ec21aec
2019-06-06 17:24:01 -07:00
Dan Willemsen
1945a4b47d Convert cc aidl to rule builder
This fixes an incremental build issue where we didn't clean up old aidl
header files (or necessarily notice that they were updated).

We do this by declaring the header files as outputs in the build graph,
but this means that the src file name needs to be convertible to the
aidl package name, as that's how the header file paths are created. In
many cases, filegroups can be used to strip path prefixes from the aidl
files.

Bug: 112114177
Test: treehugger
Change-Id: If534ff3dbfac329dea9a7402e30be74495754160
2019-06-06 08:23:53 -07:00
Colin Cross
ea68aad696 Fix data race and ordering consistency in apex modules
apexDepsMutator can be called on multiple apex modules in parallel,
and then two goroutines could call BuildForApex on the same module
in parallel, leading to a data race appending to apexVariations.
This also results in random ordering of the entries in
apexVariations.

Hold a mutex around appending to apexVariations, and sort it before
passing it to ctx.CreateVariations.

Fixes: 134425751
Test: m nothing
Change-Id: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
Merged-In: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
(cherry picked from commit cefa94bd27)
2019-06-05 11:32:50 -07:00
Colin Cross
d6e75e4ef9 Merge "Support tagged module references" am: b4c35f3378
am: a360b2b335

Change-Id: I61cff6302236ed5c67b86682563eaeae9d0e3363
2019-06-05 10:34:40 -07:00
Roland Levillain
b7dc6845d2 Merge "Remove extra word in soong.android.archMutator's comment." am: 933d2a8e63
am: 97c9f50490

Change-Id: I0315835dcb894e2aa18fcc5d6c92e99705a2a2aa
2019-06-05 10:24:37 -07:00
Treehugger Robot
b4c35f3378 Merge "Support tagged module references" 2019-06-05 17:17:32 +00:00
Treehugger Robot
933d2a8e63 Merge "Remove extra word in soong.android.archMutator's comment." 2019-06-05 17:04:52 +00:00
Patrice Arruda
5c52630d4e Merge "Soong: Define a new Soong module named prebuilt_firmware." am: e52b978c2a
am: 6ed00c6589

Change-Id: I05b0cebe792b6e9d2e53a1236eccb2f5e891cae7
2019-06-05 09:35:56 -07:00
Treehugger Robot
e52b978c2a Merge "Soong: Define a new Soong module named prebuilt_firmware." 2019-06-05 16:17:10 +00:00
Roland Levillain
f5b635d51f Remove extra word in soong.android.archMutator's comment.
Test: n/a
Change-Id: Idb12ebe3f1c1f5bac303fba3ea98aaa569294e90
2019-06-05 14:46:25 +01:00
Colin Cross
41955e8895 Support tagged module references
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output.  For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files.  Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).

Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
2019-06-04 10:22:51 -07:00
Colin Cross
9cc712aa51 Merge changes I88973671,If5a3b53a am: 2406a123ba
am: 5a927378ea

Change-Id: Ibba9c6d25e075943ffd8d91ee5929a9b591bd25a
2019-06-03 23:30:30 -07:00
Colin Cross
cefa94bd27 Fix data race and ordering consistency in apex modules
apexDepsMutator can be called on multiple apex modules in parallel,
and then two goroutines could call BuildForApex on the same module
in parallel, leading to a data race appending to apexVariations.
This also results in random ordering of the entries in
apexVariations.

Hold a mutex around appending to apexVariations, and sort it before
passing it to ctx.CreateVariations.

Fixes: 134425751
Test: m nothing
Change-Id: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
2019-06-03 15:52:27 -07:00
Patrice Arruda
057a8b1114 Soong: Define a new Soong module named prebuilt_firmware.
There are several firmware files that are being installed to
system/etc/firmware or vendor/firmware. A new module type is
defined to install firmware files to install in the system
or vendor image.

Fixes: b/133711895
Test: Ran lunch, wrote unit test cases, created a sample Android.bp
      with defined prebuilt_firmware Soong and ran mma.

Change-Id: Iaa791cdda4402936037c5a456cc8bf8e6c905b3e
2019-06-03 15:40:22 -07:00
Jaewoong Jung
91cc2a05c8 Merge "Add data property to sh_test." am: 06b2c69cfe
am: d41cf78501

Change-Id: I9fb72312b88b79f1d0b2361e42c801c9a2723e42
2019-05-31 09:41:27 -07:00
Jaewoong Jung
06b2c69cfe Merge "Add data property to sh_test." 2019-05-31 16:05:42 +00:00
patricktu
88b829983c Merge "AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json" am: b023fe382b
am: 0fd9fb5299

Change-Id: I7b29c01628ae43cbd0463ac6ebe1746538399b69
2019-05-30 22:48:02 -07:00
Treehugger Robot
b023fe382b Merge "AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json" 2019-05-31 05:29:15 +00:00
Jaewoong Jung
8eaeb0987d Add data property to sh_test.
Fixes: 131861785
Test: sh_binary_test.go, a real sh_test with added data
Change-Id: Ic78022d2db38a530074c70823ef16773d8ba6821
2019-05-30 17:21:29 -07:00
Colin Cross
4f3124ee1c Merge "Port uses-shared library verification and dexpreopting to Soong" am: 7a1fefc2de
am: 38ec6cfbf4

Change-Id: Ib9bbb720605f418d242aba98df9d9904671c29e4
2019-05-30 15:04:09 -07:00
Colin Cross
50ddcc4b69 Port uses-shared library verification and dexpreopting to Soong
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.

This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes
for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true
set.

Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
2019-05-29 19:11:26 -07:00
Colin Cross
11a19ed1cc Merge "Revert "Port uses-shared library verification and dexpreopting to Soong"" am: 7d06395f0c
am: cc50c0c4de

Change-Id: I4e12ee0f7d2dbb293e492c55f2eae66dc9638266
2019-05-29 13:55:14 -07:00
Colin Cross
7d06395f0c Merge "Revert "Port uses-shared library verification and dexpreopting to Soong"" 2019-05-29 20:34:10 +00:00
Colin Cross
c032498336 Revert "Port uses-shared library verification and dexpreopting to Soong"
This reverts commit b66d7b1c20.

Reason for revert: broke unbundled builds

Change-Id: I96ae287885107079de4a26e6b100ad8ed66961c0
2019-05-29 20:28:47 +00:00
Colin Cross
7cb1d9c5e2 Merge changes from topic "verify_uses_libraries" am: 2f4c55e9f7
am: 3c8e809052

Change-Id: I9bd1e0d745c605b3617576f9a6044527421fbfe4
2019-05-29 11:32:23 -07:00
Treehugger Robot
2f4c55e9f7 Merge changes from topic "verify_uses_libraries"
* changes:
  Port uses-shared library verification and dexpreopting to Soong
  Move verify_uses_libraries.sh out of dexpreopt
2019-05-29 18:09:01 +00:00
Martin Stjernholm
cc83276c90 Merge "Allow //visibility:public to override other visibility rules." am: 90e2eef512
am: 551438983b

Change-Id: I1f62a8d1c5ad91b4e2cc4bf4435e887132b96571
2019-05-29 09:07:49 -07:00
Colin Cross
b66d7b1c20 Port uses-shared library verification and dexpreopting to Soong
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.

Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
2019-05-28 11:20:09 -07:00
patricktu
18c82ffea7 AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json
Build module_bp_java_deps.json without this change:
Build time: 3m53.761s
File size: 12,955,363 Bytes

Build module_bp_java_deps.json with this change:
Build time: 3m49.106s
File size: 13,361,647 Bytes

Bug: 132407603
Test: 1. SOONG_COLLECT_JAVA_DEPS=false make nothing
      2. SOONG_COLLECT_JAVA_DEPS=true make nothing
      3. Check module_bp_java_deps.json in /out/soong.
         In SettingsProvider section there should contain
         "srcjars": [
             "out/soong/.intermediates/frameworks/base/packages/SettingsProvider/SettingsProvider/android_common/gen/R.jar"
         ]

Change-Id: I800a4d4f13b280d7ef87005e599cbd0aaf8c93f4
2019-05-27 11:34:10 +00:00
Martin Stjernholm
226b20dc15 Allow //visibility:public to override other visibility rules.
However only allow it when they are merged from different defaults.

Extend the tests to cover that and other cases with visibilities in
defaults.

Also avoid dumping the whole visibility spec in the error message when a
visibility check fails, because it gets noisy for long visibility lists, and
can be confusing when //visibility:public gets merged with other visibility
rules.

Test: Soong self test
Bug: 112158820
Bug: 130796911
Change-Id: I242513975a3f824b9ea2eab5b94b194b9af2481b
2019-05-24 16:33:50 +01:00
Martin Stjernholm
ebd757d609 Document how properties work in defaults modules.
Also remove an unused field in DefaultsModuleBase.

Test: m nothing
Test: Verify no diffs in ninja files:
  <check out clean tree>
  m nothing && shasum out/*.ninja | sort -k2 > before
  <apply patch>
  m nothing && shasum out/*.ninja | sort -k2 > after
  diff before after
Bug: 112158820
Change-Id: Id819cea10f7af1603b4e4e1b14c0b49afcd0fecd
2019-05-24 11:27:08 +01:00
Dimitry Ivanov
16e7643f54 Merge "Apply native_bridge suffix to all cc_modules" am: 7636b362e1
am: 158ca2bfa2

Change-Id: I09fd0978f62c8812b3ba7e3ea02608b278448a11
2019-05-24 01:47:32 -07:00
Dimitry Ivanov
7636b362e1 Merge "Apply native_bridge suffix to all cc_modules" 2019-05-24 08:28:55 +00:00
Martin Stjernholm
a161caf5d7 Merge "Add some more visibility test cases." am: d14e5c6ed4
am: 295630abf8

Change-Id: I410c1917c3e9e08cf4165a4eae53648b8b71ece1
2019-05-23 11:04:39 -07:00
Treehugger Robot
d14e5c6ed4 Merge "Add some more visibility test cases." 2019-05-23 16:31:49 +00:00
dimitry
4320449c97 Apply native_bridge suffix to all cc_modules
This fixes the problem with cc_object not having this suffix and
as a result overriding non-bridged variants for modules using mk files.

Bug: http://b/77159578
Test: build 4arch product
Change-Id: Ie958f997c6f54f93d8b2987ca5ba605004e1eb70
2019-05-23 13:31:10 +02:00
dimitry
962029a8c6 Merge "Native bridge modules are not translated second archs" am: 989d83ce1d
am: 1d7bb4fb21

Change-Id: Ibd70ff04a1016b0569be623da1e2e83961c1f71a
2019-05-22 21:19:09 -07:00
dimitry
628db6faa4 Native bridge modules are not translated second archs
Ignore native_bridge targets when detecting whether second
architecture is translated or not.

The concept of second translated architectures is almost deprected
and will be removed once all affected products are switched to
native_bridge support from the build system.

Bug: http://b/77159578
Test: make 4arch target
Change-Id: Ife93ccc60f5c1a4020f66b2cf862b709889d9d6b
2019-05-22 15:21:15 +00:00
Martin Stjernholm
8edeb6372e Add some more visibility test cases.
Bug: 112158820
Test: Soong self test
Change-Id: Ia359c35c0c124bac2693926ce8f05dd20435f05d
2019-05-21 20:36:00 +01:00
Colin Cross
1f547cfaac Merge changes I3dc3fded,Ic1276329,I6be04dec am: 045f0f1f30
am: 4c18d670df

Change-Id: I0c32a4d28740aa23c4a8ee90a879b19374f915ed
2019-05-17 18:40:13 -07:00
Colin Cross
0d99f7cd84 Don't create a second host arch for tests on darwin
Only x86_64 darwin is supported, not x86.  Don't create an x86
host arch when running tests on darwin.

Test: all soong tests
Change-Id: Ic12763298345e32a1340f8fbef338d2ab4d62b2e
2019-05-17 08:43:36 -07:00
Jaewoong Jung
b16dc74729 Merge "Fix override_android_app dependency issues." am: 105920a792
am: ac5ee3559f

Change-Id: Ie6447241cc069f507d053e10d78ba540d9cc84f9
2019-05-16 08:31:45 -07:00
Jaewoong Jung
105920a792 Merge "Fix override_android_app dependency issues." 2019-05-16 15:07:13 +00:00
Patrice Arruda
94dbdd3072 Merge "Soong: Add support on installing fonts in /fonts system image." am: e40da8cff6
am: b87703697d

Change-Id: Ib1c3018321812e7a6121f42a4276d7b11943d464
2019-05-15 20:49:11 -07:00
Treehugger Robot
e40da8cff6 Merge "Soong: Add support on installing fonts in /fonts system image." 2019-05-15 23:53:28 +00:00
Inseob Kim
b3ea83a22f Merge "Generate VNDK snapshot with Soong except configs" am: 651f40bbe1
am: 62ca44a36b

Change-Id: I35f356f9590518406a2fd8d1d3c318cf529dad92
2019-05-15 15:38:29 -07:00
Treehugger Robot
651f40bbe1 Merge "Generate VNDK snapshot with Soong except configs" 2019-05-15 22:13:35 +00:00
Ian Pedowitz
253b0b2d97 Merge "Revert "Revert "Android Q is API 29""" into qt-dev
am: c91fcb46ed

Change-Id: I34ffaffca59fa796d74c728992533cec61f804a6
2019-05-15 13:15:21 -07:00
Patrice Arruda
61583eb72a Soong: Add support on installing fonts in /fonts system image.
A new module named prebuilt_font allows a set of fonts to be
installed in the /fonts system image.

Bug: b/123403785
Test: Wrote and ran unit test cases.
Change-Id: Icd468abe3d70a528b28a8d8f216407484e9966a7
2019-05-15 12:35:29 -07:00
Jaewoong Jung
b639a6adb2 Fix override_android_app dependency issues.
This change fixes an issue where an android_test could not depened on an
override_android_app or an android_app overridden by one by moving all
override processing to post-deps and forwarding incoming dependencies on
override_android_apps to base android_app modules

Fixes: 132447700
Test: app_test.go
Change-Id: I4ac593be661f541f5ea9823ef97373bee4b186f9
2019-05-15 12:11:18 -07:00
Colin Cross
982c6ca76c Merge "Prevent hangs in OncePer when the callback panics" am: b7afaf0802
am: bf200f61ac

Change-Id: Iefa4ae2c21c81c486f603ba9d2601e97d5ffd0ac
2019-05-15 10:52:21 -07:00
Ian Pedowitz
c91fcb46ed Merge "Revert "Revert "Android Q is API 29""" into qt-dev 2019-05-15 16:28:52 +00:00
Inseob Kim
1f086e2f0d Generate VNDK snapshot with Soong except configs
This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.

Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
     development/vndk/snapshot/update.py

Change-Id: I8629e1e25bfc461fd495565bb4872c9af176cf92
2019-05-15 10:26:54 +09:00
Colin Cross
66bdb695ae Prevent hangs in OncePer when the callback panics
If the callback passed to Once panics it was leaving the waiter
in place that would never be completed.  Move writing the value
and signalling the waiter to defer.

Test: TestOncePerPanic
Change-Id: Icc4d3b779a79914fcd881d61d38dffcc2f591c39
2019-05-14 18:40:13 +00:00
Ian Pedowitz
851de71044 Revert "Revert "Android Q is API 29""
This reverts commit 9e2bf9ec51.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Bug: 129943426
Change-Id: Ic8a09aca67c189edfda4b10e5deb13716eb66adc
Test: Build
2019-05-11 17:02:50 +00:00
Pete Gillin
2c18ebd83c Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." am: 42e862c56d
am: 350f0987bf

Change-Id: Ibfc75aa4c4356d86cf7ce80becff0cf92cf98e14
2019-05-10 05:22:48 -07:00
Pete Gillin
42e862c56d Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2019-05-10 11:50:08 +00:00
Dimitry Ivanov
f8eb90728a Merge "Enable native bridge support by default for certain ndk modules" am: 9c9fd4e73a
am: 64ad4e8d72

Change-Id: I610996c9aa9a3b6bca8572e939bd4f92958da1d8
2019-05-10 03:39:39 -07:00
dimitry
03dc3f63f6 Enable native bridge support by default for certain ndk modules
The ndk_library, ndk_prebuilt_object and ndk_prebuilt_static_stl
modules are natural targets to have native bridge support enabled,
since they build user facing object which have to be supported for
translated architectures.

Bug: http://b/77159578
Test: make
Change-Id: Ic556f4c1c41e5b3dc92f9c290b4482dee8faed33
2019-05-09 16:37:16 +02:00
Pete Gillin
0c2143e1ee Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy
from when the 8 -> 9 toolchain upgrade was happening. That migration
is done and the variable only affects the language level, so it should
have a name that reflects that. (The current situation would be
especially confusing if we started a 9 -> 11 toolchain upgrade,
presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11,
since the two settings look incompatible but are actually orthogonal.)

The current variable historically allowed a value or "1.8" which meant
"use the OpenJDK 9 toolchain but target language level 8". That value
no longer has any meaning and the new variable doesn't allow it.

Bug: 131678633
Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true`
Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53
Test: Audit all mentions of the old string here and downstream
Change-Id: Idad808c7f07913baba1a777627322d5452dabcef
2019-05-09 15:36:29 +01:00
Jaewoong Jung
726fd0dc35 Merge "Implement DPI variants in android_app_import." am: 53ad63c127
am: a64eb7eada

Change-Id: Idcfca3ed5cbeb4955958d007ef701939cd3f26ae
2019-05-08 17:54:56 -07:00
Jaewoong Jung
a5e5abc449 Implement DPI variants in android_app_import.
Bug: 128610294
Test: app_test.go
Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
2019-05-07 17:55:23 -07:00
dimitry
46becd866e Merge "Add native_bridge target to Android.bp" am: ec89e4c65c
am: 9da19e15ee

Change-Id: I49ecaa7fdb8bd283c9a8df00ddb6572bab9d140d
2019-05-03 16:47:46 -07:00
dimitry
1f33e40972 Add native_bridge target to Android.bp
This allows us to build guest libraries for the native bridge for
arm/arm64 architectures.

Bug: http://b/77159578
Test: make
Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
2019-05-03 15:33:28 +02:00
Jiyong Park
6c5318266d Emit LOCAL_MODULE_TARGET_ARCH for prebuilt_etc
Absense of the flag causes problem when prebuilt_etc is configured with
compile_multilib.

Bug: 130138217
Test: choosecombo to aosp_x86_64 and build
test_com.android.media.swcodec
Check that the test APEX has 32-bit artifacts.

Merged-In: Idd28443d129ff70053295015e69328a8fa3eca47
Change-Id: I6b90668d6effc9f82f7cf3a958d4964e8f06ac8e
2019-05-03 08:41:35 +09:00
Ian Pedowitz
22100cfb12 Merge "Revert "RESTRICT AUTOMERGE Android Q is API 29"" into qt-dev
am: 6b360490e1

Change-Id: I7d24715f9780d6970b9c783bedecd375d889cc08
2019-05-02 14:50:27 -07:00
Ian Pedowitz
ff463e9eae Merge "RESTRICT AUTOMERGE Android Q is API 29" into qt-dev
am: 36ed555dfc

Change-Id: I90a15d399952ec7a1f943d942ed823ec42b02ff1
2019-05-02 14:16:36 -07:00
Colin Cross
d756aa05c9 Merge "Support robolectric_test" am: 5346d07108
am: 74e9718189

Change-Id: I271db13eb5c2cee1e72d0b68bd9666bad4e10e24
2019-05-02 09:55:30 -07:00
Ian Pedowitz
9e2bf9ec51 Revert "RESTRICT AUTOMERGE Android Q is API 29"
This reverts commit ca6e927678.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ice988aea0cab8ba462166c27b0d7f95fc7d46466
2019-05-02 00:55:30 +00:00
Colin Cross
0ef0816727 Support robolectric_test
robolectric_test will compile a suite of tests that run in
robolectric.  For now it also generates a Run* rule, later
that will be removed in favor of atest.

Bug: 123248659
Test: m RunSettingsLibRoboTests
Change-Id: I12407d0b0d639e31c1969077ba787e8985e6a506
2019-05-01 16:41:44 -07:00
Paul Duffin
25f35fa650 Remove unnecessary core library neverallow rules
The rules that restricted access to core library targets are no longer
required as they have been replaced with visibility rules. The
visibility rules are safer because they check all dependencies whereas
the neverallow rules that have been removed only checked dependencies
in the libs property and so missed dependencies in static_libs and
java_libs properties.

Bug: 112158820
Test: m core-tests
Change-Id: Ibfef74db0769992266ebadf445836d2a183df3f7
Merged-In: Ibfef74db0769992266ebadf445836d2a183df3f7
(cherry picked from commit 8e8c01c382)
2019-05-01 20:31:24 +00:00
Paul Duffin
ff5a177879 Remove unnecessary core library neverallow rules
The rules that restricted access to core library targets are no longer
required as they have been replaced with visibility rules. The
visibility rules are safer because they check all dependencies whereas
the neverallow rules that have been removed only checked dependencies
in the libs property and so missed dependencies in static_libs and
java_libs properties.

(cherry picked from 8e8c01c382)

Bug: 112158820
Test: m core-tests
Change-Id: I3b50b705b7cd6fcdc55d26cd71b9149b3abd2b88
Merged-In: Ibfef74db0769992266ebadf445836d2a183df3f7
2019-05-01 09:39:32 +01:00
Treehugger Robot
1341942d86 Merge "Prebuilt APEXes are recoreded in apexkeys.txt" 2019-04-30 03:14:01 +00:00
Suprabh Shukla
ca6e927678 RESTRICT AUTOMERGE Android Q is API 29
Test: Only updated a constant. Builds as expected.

Bug: 129975435
Change-Id: I10bb72d59d7ffdb942b11701d3cebc383afa6a77
2019-04-30 00:17:09 +00:00
Logan Chien
f7a6c944d4 Merge "Support opt-in ABI checks" am: 23803f9365
am: 5b70a03268

Change-Id: Id45f014546d9d85439350bf85d69e558149f82fc
2019-04-29 11:05:11 -07:00
Logan Chien
23803f9365 Merge "Support opt-in ABI checks" 2019-04-29 17:40:06 +00:00
Paul Duffin
39610641ca Merge "Add visibility support" am: 77b47fdf51
am: f028b496b6

Change-Id: If85c0b4f117a4d6e6af2d093fbdc2c8fd8bb4f35
2019-04-29 03:30:36 -07:00
Jiyong Park
4d27704da0 Prebuilt APEXes are recoreded in apexkeys.txt
apexkeys.txt now correctly lists prebuilt APEXes with keys specified as
PRESIGNED.

This change also fixes a bug that non-installable APEXes are listed in
the file.

Bug: 131130235
Test: m out/soong/apexkeys.txt and check that
com.android.apex.cts.shim.apex is listed there with PRESIGNED keys.

Merged-In: Ib6d391a82864714743a1cc59cd655bea917b5073
Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073
(cherry picked from commit a41f12a6fa)
2019-04-29 09:21:23 +09:00
Logan Chien
41eabe63e8 Support opt-in ABI checks
This commit allows a module to opt in for ABI checks even when it is
not an LLNDK/VNDK module.

Bug: 131421213
Test: Add `header_abi_checker { enabled: true, }` to some module
Change-Id: Ie09d262e651cbb44d7d0eba652f55dc1e1e52962
2019-04-27 01:55:50 +08:00
Paul Duffin
2e61fa6e14 Add visibility support
Implementation uploaded for review. Includes unit tests but does not
yet handle prebuilts, that will come in a future change once some
more general issues with prebuilts and namespaces is resolved.

See README.md#Visibility for details of what this does and how to use
it.

Bug: 112158820
Test: add visibility rules for core library modules, make core-tests
Change-Id: I8ec980554398ad6f2d42043ce518f811a35da679
2019-04-26 12:37:37 +01:00
Inseob Kim
e902a80b01 Merge "Build contexts files with Soong" am: 18805e483f
am: a5d61d865a

Change-Id: I521a8f9cb48f911b80ed9a595741deca6e13d1e6
2019-04-25 00:57:30 -07:00
Treehugger Robot
18805e483f Merge "Build contexts files with Soong" 2019-04-25 07:46:19 +00:00
Jiyong Park
ded02fab27 Merge "Prebuilt APEXes are recoreded in apexkeys.txt" into qt-dev
am: a25a2779c6

Change-Id: Ia6f97ecf118b6a74f68ddc6c69ece35ee8fe934d
2019-04-23 21:42:24 -07:00
TreeHugger Robot
a25a2779c6 Merge "Prebuilt APEXes are recoreded in apexkeys.txt" into qt-dev 2019-04-24 03:46:16 +00:00
Jaewoong Jung
f80055138e Merge "New AndroidMk authoring system based on entry map." am: 159a585251
am: 7cf4b87560

Change-Id: I2b9e70d207146ba5a4d2c04489cc680b6f9d0d6f
2019-04-23 09:31:18 -07:00
Jaewoong Jung
159a585251 Merge "New AndroidMk authoring system based on entry map." 2019-04-23 14:43:52 +00:00
Jiyong Park
a41f12a6fa Prebuilt APEXes are recoreded in apexkeys.txt
apexkeys.txt now correctly lists prebuilt APEXes with keys specified as
PRESIGNED.

This change also fixes a bug that non-installable APEXes are listed in
the file.

Bug: 131130235
Test: m out/soong/apexkeys.txt and check that
com.android.apex.cts.shim.apex is listed there with PRESIGNED keys.

Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073
2019-04-23 18:03:16 +09:00
TreeHugger Robot
6decc5d7ff Merge changes Ic5f467fb,I68d52668 into qt-dev
* changes:
  Ensure that PathsForModuleSrc works with prebuilts
  Fix: PathsForModuleSrc does not work for a replaced dependency
2019-04-23 06:24:22 +00:00
Colin Cross
3533a273fa Merge "Fix tests with cc_binary_host on mac" am: 588c1ee5f8
am: 34f52a3894

Change-Id: I868f475487e3b0b761ba2c1f7b160751365372d4
2019-04-22 21:26:51 -07:00
Treehugger Robot
588c1ee5f8 Merge "Fix tests with cc_binary_host on mac" 2019-04-23 04:12:26 +00:00
Inseob Kim
0866b003b2 Build contexts files with Soong
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.

The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.

Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.

Change-Id: I49206e656564206d6f7265206361666665696e65
2019-04-23 10:10:56 +09:00
Colin Cross
9c6241f768 Fix tests with cc_binary_host on mac
cc_binary_host on mac uses ctx.Config().HostSystemTool(), which needs
PATH in the test environment.  Copy it from the original environment.

Fixes: 129763458
Test: proto_test.go
Change-Id: I41c1acdceee7c35036148256adafb471871034df
2019-04-22 15:55:56 -07:00
Jaewoong Jung
9aa3ab1f3f New AndroidMk authoring system based on entry map.
The new system collects all Android.mk variable assignments using a map
and writes them to io.Writer. Compared to the previous system, which
directly writes all entries to buffers, this new system is more robust
and test-friendly.

Test: Built without prebuilt_etc.go change and diffed the mk output.
Test: prebuilt_etc_test.go
Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
2019-04-22 15:32:44 -07:00
Colin Cross
6479beeca0 Merge "Allow codename.fingerprint format for targetSdkVersion" am: e928452f30
am: 1a385d14ef

Change-Id: Ib5d0bb3b6501a3b1565a13d21c57cf5e1a601a03
2019-04-22 10:09:41 -07:00
Colin Cross
5c87791a78 Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
Merged-In: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
(cherry picked from commit 109328714f)
2019-04-22 10:08:35 -07:00
Colin Cross
e928452f30 Merge "Allow codename.fingerprint format for targetSdkVersion" 2019-04-22 16:48:35 +00:00
Jiyong Park
48af68cf58 Merge "Ensure that PathsForModuleSrc works with prebuilts" am: 3ed757ab3a
am: 2b77cefa1b

Change-Id: I7766815b06d8673e98e8d3a97943c966c342f5f5
2019-04-19 21:06:14 -07:00
Jiyong Park
dfa933e6e4 Ensure that PathsForModuleSrc works with prebuilts
prebuilt_test is amended to ensure
f2976304f7 is not broken.

PathsForModuleSrc is called to check if the file is from correct module
(either from source or prebuilt module)

Bug: 130627486
Test: m

Merged-In: Ic5f467fbc2837727df92102530687e967cd5529f
Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
(cherry picked from commit d4671111ef)
2019-04-20 11:52:01 +09:00
Jiyong Park
1570c803b6 Fix: PathsForModuleSrc does not work for a replaced dependency
PathsForModuleSrc does not work if a source module is replaced with a
prebuilt module. This is because the function uses GetDirectDepWithTag
with the name of the original source module. Since the dependency is
replaced and the prebuilt module has the name "prebuilt_<name>", the
search always fails.

Fixing this by re-implementing GetDirectDep* functions inside Soong
using VisitDirectDep.

Bug: 130627486
Test: m
Merged-In: I68d52668283c429d5e93c7f2c81f6a8db1f24893
Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
(cherry picked from commit f2976304f7)
2019-04-20 11:51:22 +09:00
Jiyong Park
683c699acd Fix: PathsForModuleSrc does not work for a replaced dependency am: f2976304f7
am: 581569e4cc

Change-Id: I7fee54cf5aa62f5b58b88a4a04e600619b488806
2019-04-19 02:09:52 -07:00
Jiyong Park
d4671111ef Ensure that PathsForModuleSrc works with prebuilts
prebuilt_test is amended to ensure
f2976304f7 is not broken.

PathsForModuleSrc is called to check if the file is from correct module
(either from source or prebuilt module)

Bug: 130627486
Test: m

Change-Id: Ic5f467fbc2837727df92102530687e967cd5529f
2019-04-19 17:57:33 +09:00
Jiyong Park
f2976304f7 Fix: PathsForModuleSrc does not work for a replaced dependency
PathsForModuleSrc does not work if a source module is replaced with a
prebuilt module. This is because the function uses GetDirectDepWithTag
with the name of the original source module. Since the dependency is
replaced and the prebuilt module has the name "prebuilt_<name>", the
search always fails.

Fixing this by re-implementing GetDirectDep* functions inside Soong
using VisitDirectDep.

Bug: 130627486
Test: m
Change-Id: I68d52668283c429d5e93c7f2c81f6a8db1f24893
2019-04-19 13:48:33 +09:00
Colin Cross
109328714f Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
2019-04-18 16:05:37 -07:00
Dan Willemsen
6128b85885 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
Merged-In: Ic1f7d38239f3f805ca0723c24005d3e18a811870
(cherry picked from commit 54879d193e)
2019-04-18 14:27:46 -07:00
Dan Willemsen
9d1dc04e2d Merge "TARGET_FS_CONFIG_GEN is a list, not a single path" am: 3c4a9159c9
am: 8fa04304e7

Change-Id: I9e2450bfc99d592c2e272cb298fbc53fee112755
2019-04-18 12:53:35 -07:00
Dan Willemsen
54879d193e TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: Ic1f7d38239f3f805ca0723c24005d3e18a811870
2019-04-18 17:16:41 +00:00
Colin Cross
f449d2aedb Merge "Use LoadHook to create modules in java_sdk_library" am: 59d4a31063
am: 414d337702

Change-Id: Ide9449f45066883662d05946fbbd43b142ec208f
2019-04-17 01:46:32 -07:00
Treehugger Robot
59d4a31063 Merge "Use LoadHook to create modules in java_sdk_library" 2019-04-17 08:28:36 +00:00
Colin Cross
44d5d22db6 Merge "Allow guava to use java_host_for_device" 2019-04-16 23:14:12 +00:00
Colin Cross
f8b860a0fb Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator.  Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.

Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-16 21:46:28 +00:00
Colin Cross
c6de83c8d1 Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=true
Set the location label for missing srcs and tools to avoid
nonsensical errors when parsing the command.

Cherry-pick note: Being cherry-picked to qt-dev to fix unbundled -qt
builds, see b/130588113.
Bug: 130588113

Test: genrule_test.go
Test: paths_test.go
Test: unbundled branch with missing framework-res module needed by robolectric genrule
Change-Id: I9c1f1cd82a80f048c0e903b8e93910b1ae34b0b1
(cherry picked from commit ba71a3fb11)
2019-04-16 09:39:09 +01:00
Colin Cross
97add50354 Allow guava to use java_host_for_device
Guava can't compile against a device bootclasspath, it uses methods
that only exist in the host bootclasspath, and then avoids calling
them at runtime.

Bug: 130306229
Test: m checkbuild
Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c
Merged-In: I012030cb701c01ea9ff554c1b6156d0242365a4c
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit b5191a573d)
2019-04-15 21:44:51 -07:00
Colin Cross
bd9183c02b Merge "Allow guava to use java_host_for_device" into qt-dev-plus-aosp 2019-04-16 03:35:50 +00:00
Dan Willemsen
c74ce7d85f Convert yacc to a single RuleBuilder rule am: 4e0aa23dd3
am: e71c0691ad

Change-Id: I8e5b153cfeb7887777065dc8ee33d04dda36e613
2019-04-15 17:51:03 -07:00
Dan Willemsen
891af48379 Support RuleBuilder.Sbox to wrap commands in sbox am: 633c502295
am: b933c57635

Change-Id: I07cb4998e8d860f97c4ae00f9f776744cc8a5adf
2019-04-15 17:50:48 -07:00
Dan Willemsen
4e0aa23dd3 Convert yacc to a single RuleBuilder rule
So that <module>/gen/yacc/... is (re)created by a single rule, previous
files are removed, and location.hh is in the build graph when it is
produced.

Test: treehugger
Change-Id: I2f6e47ea07f315e10ae1cb8ad50697e7123d0285
2019-04-15 14:52:05 -07:00
Dan Willemsen
633c502295 Support RuleBuilder.Sbox to wrap commands in sbox
This essentially allows you to declare that everything in a directory
will be created by the rule, and we'll ensure that your command actually
writes out all of the claimed outputs, and remove any other files that
previously existed in that directory.

Test: built-in tests
Change-Id: I990dce2b3a0d89ebd2736ac1a0cadfb5864c6e73
2019-04-15 14:52:05 -07:00
TreeHugger Robot
5e037c38d3 Merge "Export more config variables" into qt-dev 2019-04-12 17:24:18 +00:00
TreeHugger Robot
353222b81d Merge "Fix package path of android/soong/android pctx" into qt-dev 2019-04-12 17:24:18 +00:00
Dan Willemsen
64e8416056 Merge "Expose TargetFSConfigGen to DeviceConfig from Make" am: 8235220a82
am: a0fcf98136

Change-Id: Iafb6fd966ea4c38ed488e3d34de0df7ffe0f6b37
2019-04-11 16:47:58 -07:00
Colin Cross
b5191a573d Allow guava to use java_host_for_device
Guava can't compile against a device bootclasspath, it uses methods
that only exist in the host bootclasspath, and then avoids calling
them at runtime.

Bug: 130306229
Test: m checkbuild
Change-Id: I012030cb701c01ea9ff554c1b6156d0242365a4c
2019-04-11 16:42:34 -07:00
Dan Willemsen
898efa15a1 Expose TargetFSConfigGen to DeviceConfig from Make
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers
Change-Id: I2675822ae01af9bbec70f0c0413c047f36b5e024
Merged-In: I2675822ae01af9bbec70f0c0413c047f36b5e024
(cherry picked from commit 71c7460713)
2019-04-11 16:42:06 -07:00
Colin Cross
8e84648a63 Export more config variables
Export some more config variables that will be used to generate
robolectric's build.prop file.

Bug: 122331577
Test: m checkbuild
Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87
2019-04-11 10:54:18 -07:00
Dan Willemsen
71c7460713 Expose TargetFSConfigGen to DeviceConfig from Make
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers
Change-Id: I2675822ae01af9bbec70f0c0413c047f36b5e024
2019-04-10 20:24:16 -07:00
Colin Cross
713ef2b424 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Bug: 130298888
Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-10 16:49:27 -07:00
Dan Willemsen
c5f8f6e93f Stop using build/target -> build/make/target symlink am: 412160e1c9
am: 8862c76a68

Change-Id: I0dacd807818a58934d436724401335f2c8366c37
2019-04-10 13:46:48 -07:00
Dan Willemsen
412160e1c9 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09 21:36:26 -07:00
Dan Willemsen
868e299039 Merge changes I2bff8fb8,Ifa584479 am: cb4e0551a2
am: 787b999bc0

Change-Id: Idbc987afbaf1fcc183629431a745c9ae41bb215f
2019-04-09 18:26:03 -07:00
Dan Willemsen
b6d171bb73 Update default soong config
BuildNumberFromFile is required to be non-empty for version injection to
work.

The various platform version values are needed for various Java builds.

Test: treehugger
Change-Id: Ifa5844794ea9e9baf0ec725dec107975cd759354
2019-04-09 09:44:31 -07:00
Colin Cross
4f53bebacd Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=true am: ba71a3fb11
am: 4618ddc9d1

Change-Id: Ia3ffed632b8d7de10e674c3c011aab54f1ffd144
2019-04-07 15:40:39 -07:00
Colin Cross
ba71a3fb11 Fix missing genrule srcs and tools with ALLOW_MISSING_DEPENDENCIES=true
Set the location label for missing srcs and tools to avoid
nonsensical errors when parsing the command.

Test: genrule_test.go
Test: paths_test.go
Test: unbundled branch with missing framework-res module needed by robolectric genrule
Change-Id: I9c1f1cd82a80f048c0e903b8e93910b1ae34b0b1
2019-04-07 19:40:02 +00:00
Sasha Smundak
8b48326fbd Merge "Implement host_required and target_required properties." am: b9045cf28c
am: 0e47e406de

Change-Id: I476551e94329a1703d9afddc6cb25e7311ac64ef
2019-04-05 08:34:46 -07:00
Sasha Smundak
b6d230515e Implement host_required and target_required properties.
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.

Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
2019-04-04 11:24:01 -07:00
Colin Cross
a51caadf4a Export more config variables am: 092c9da922
am: 34998d71cd

Change-Id: I5acae0e9043089f1a86b013e3cecb07c993eee10
2019-04-04 01:40:10 -07:00
Colin Cross
11fbb890c9 Fix package path of android/soong/android pctx am: cc0ce80ed5
am: a1c57b4664

Change-Id: Ifba10892f902e70bd0a52a82a20bd5f1b64a61de
2019-04-04 01:39:57 -07:00
Colin Cross
092c9da922 Export more config variables
Export some more config variables that will be used to generate
robolectric's build.prop file.

Bug: 122331577
Test: m checkbuild
Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87
2019-04-04 03:59:41 +00:00
Colin Cross
cc0ce80ed5 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-04 03:59:34 +00:00
Christopher Ferris
134f8f6f00 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
Merged-In: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-03 14:54:12 -07:00
Colin Cross
49c87dfae9 Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: b007b2bde5 am: 8c3f398c6c
am: 209edee425

Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
2019-04-03 14:04:07 -07:00
Colin Cross
ff0daf4ccf Fix sdk_version: "system_current" when Platform_sdk_final=true
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final
becomes true, which causes the return value of sdkVersionToNumber
for "system_current" to a real version number instead of
FutureApiLevel.  This enables the check against
PlatformSystemSdkVersions, which doesn't contain "current".  Use
the numeric value instead.

Fixes: 129786845
Test: sdk_test.go
Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
2019-04-02 23:18:30 +00:00
Christopher Ferris
25bda7ea49 Make libc_scudo always go first.
In addition, add Shared_libs to malloc_not_svelte.

Bug: 123689570

Test: Verified that libc_scudo is first wherever it is added.
Change-Id: Ibdc5dbd019a382630a727c270f846aa4446f8d99
2019-04-02 15:31:29 -07:00
Colin Cross
32762a08eb Add support for protoc plugins am: fe17f6f0e8 am: 91c063cfdc
am: 7299e418df

Change-Id: I30e57f6678343f57233831775b62afa1f043a450
2019-04-02 10:31:28 -07:00
Colin Cross
57205f3cb4 Move proto compilation to RuleBuilder am: 19878da6a0 am: 61918685aa
am: c8a3eb9110

Change-Id: If3922ee1900d6f3888c7291997ac49d4a939c065
2019-04-02 10:31:13 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Colin Cross
a50a2464c6 Merge changes I7dd4ba7f,I7887a67a am: 92cc71606c am: 900574f0cd
am: 6c99a30bb7

Change-Id: If557897ed64ecdf8967299b5512392e5485767ae
2019-04-02 08:21:42 -07:00
Colin Cross
1d2cf0494a Add depfile support to RuleBuilder
Allow rules built with RuleBuilder to use depfiles.  Ninja only
supports a single depfile with single output.  If there are
multiple outputs in a rule, move all but the first to implicit
outputs.  If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.

Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
2019-03-29 16:35:06 -07:00
Colin Cross
92b7d584c8 Add RuleBuilderCommand.Flags
Test: rule_builder_test.go
Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
2019-03-29 16:35:06 -07:00
Jaewoong Jung
4bc3a00349 Merge "Add prebuilt_apex." am: 083bd3e971 am: 14acd15640
am: 3cdc5b69a4

Change-Id: Ie43668acd32e52cdb2391f5c9d9798859a6aa885
2019-03-29 00:59:39 -07:00
Treehugger Robot
083bd3e971 Merge "Add prebuilt_apex." 2019-03-29 07:36:53 +00:00
Jaewoong Jung
939ebd5f33 Add prebuilt_apex.
Bug: 127789981
Test: apex_test.go + com.android.tzdata.apex
Change-Id: I09bb0a4b2acf310c55c789569da3c9d755638232
2019-03-28 15:56:22 -07:00
Jaewoong Jung
a4edf844da Merge "Fix an override_module bug." am: 044ead6b1a am: 5ce95f2eaf
am: ac24969630

Change-Id: I352a380486600c0b48a61daa0457eff09ceb8f66
2019-03-27 16:13:22 -07:00
Jaewoong Jung
a641ee9cc7 Fix an override_module bug.
proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.

Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
2019-03-27 11:21:24 -07:00
Patrice Arruda
010bc3f077 Merge "Soong: Add synopsis to soong_namespace module." am: 39302bbcb9 am: acca92e981
am: e54b65abc2

Change-Id: I3b2de8d90dff9a398588cf0e2677e57ba05dfb12
2019-03-27 09:06:33 -07:00
Patrice Arruda
64765aaef9 Soong: Add synopsis to soong_namespace module.
Synopsis was missing to soong_namespace module. Also added documentation
to imports properties. This required the namespaceProperties struct to be
pulled out of the NamespaceModule struct in order for the documentation
tool to extract the property documentation.

Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis was
added to soong_namespace and imports properties is listed too.

Change-Id: I519b14629bdbc85f35fbc8fa03e78dc2ad3f655e
2019-03-26 09:09:41 -07:00
Jaewoong Jung
79e3e79ee8 Merge "Add override_android_app module type." am: e9665723da am: 9874d6abe6
am: c3432e294e

Change-Id: I28638a23c6140ae1775187a2afc61b15db97f487
2019-03-22 07:57:11 -07:00
Jaewoong Jung
e9665723da Merge "Add override_android_app module type." 2019-03-22 14:36:04 +00:00
Dan Willemsen
2039c8ebfb Merge "Tell make that sh_test is a NATIVE_TEST" am: 7446606eeb am: 4204e66c4c
am: 66f363dbff

Change-Id: I5f14565e0ebd1393666199263894764db722617c
2019-03-21 20:28:37 -07:00
Jaewoong Jung
525443aa22 Add override_android_app module type.
This is a new implementation of overriding module types that makes use
of local variants. With this, product owners can use PRODUCT_PACKAGES to
decide which override module to include in their products.

Bug: 122957760
Bug: 123640028
Test: app_test.go
Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
2019-03-21 13:26:20 -07:00
Dan Willemsen
3db041948b Tell make that sh_test is a NATIVE_TEST
So that it ends up in VTS's DATA/nativetest like a cc_test, and
otherwise acts like a test.

Test: convert external/linux-kselftest to sh_test
Change-Id: I44b7cfca45f8fe5d7fbb6eaa845a79bd70f155ef
2019-03-21 12:44:57 -07:00
Anton Hansson
b56333c19b Separate device and product overlays am: 53c88448fd am: d24adcf68e
am: 40286c75e4

Change-Id: I1e6ae2fe7f5cc57271edce235b702b83b64a7902
2019-03-21 04:46:05 -07:00
Anton Hansson
53c88448fd Separate device and product overlays
This change adds book-keeping of whether an overlay came from
DEVICE_PACKAGE_OVERLAYS or PRODUCT_PACKAGE_OVERLAYS. This is
later used when writing the output to soong_app_prebuilt.mk, to
use either LOCAL_SOONG_[DEVICE|PRODUCT]_RRO_PACKAGES depending
on the original source.

This change is intended to be a noop on its own, but allows a
follow-up make change to customize the location of the auto-generated
RRO packages.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ib24fe1d05be132c360dd6966f7c83968c9939f77
2019-03-21 11:25:46 +00:00
Jiyong Park
6964c93121 Merge "Notice support for APEX" am: 21c81326ff am: 602b6ba221
am: ba47ea108a

Change-Id: I67ecf430ba38963084c4a65d3482a0a7ff5ba73e
2019-03-20 23:20:22 -07:00
Treehugger Robot
21c81326ff Merge "Notice support for APEX" 2019-03-21 06:04:14 +00:00
Vic Yang
b7700709dd Add support for no-vendor-variant VNDK am: efd249e62a am: 409b1d2375
am: 89ac74fed3

Change-Id: I11df12e61cab3d3f694573a558fe8862023e475c
2019-03-20 21:58:34 -07:00
Vic Yang
efd249e62a Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed.  Since not all VNDK libraries will be
ready for this, we keep a list of library names in cc/vndk.go to
indicate which libraries must have their vendor variants always
installed regardless of whether no-vendor-variant VNDK is enabled.

Also add --remove-build-id option to the strip script to facilitate
the check of functional identity of the two variants.

Bug: 119423884
Test: Add a dummy VNDK library and build with
      TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding
      build/make change.

Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
2019-03-21 04:29:24 +00:00
Jiyong Park
52818fcde8 Notice support for APEX
Notice file for an APEX is created by merging notice files for the
modules included in it (plus the notice file for the APEX itself if
specified).

Notice files having the same content are not duplicated; it is emitted
only once.

Bug: 128701495
Test: m (apex_test is amended)
Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are
license entries for /system/apex/*.apex files

Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
2019-03-21 08:05:50 +09:00
Colin Cross
75bace9c07 Replace ctx.ExpandSources with android.PathsForModuleSrc am: 8a49795df1 am: 9bcee1f400
am: 3cafca1d18

Change-Id: I8945a8a775d5931489ef3f3614046207dd816f1e
2019-03-20 12:53:01 -07:00
Colin Cross
ecfa227f40 Remove ModuleSrcPath am: 07e51619a2 am: 734ad216fe
am: 055d480456

Change-Id: I386ab7a179da59477acc38571f63e652ac47d8a2
2019-03-20 12:52:44 -07:00
Colin Cross
cfb63c9cc7 Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir am: 2fafa3ec49 am: ba0fa9c339
am: 5bbf0dda95

Change-Id: I0c1e0fddca6afe4ed8d5d232e39d27bb9c0c3722
2019-03-20 12:52:27 -07:00
Colin Cross
8a49795df1 Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them.  When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.

Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
2019-03-20 19:36:13 +00:00
Colin Cross
07e51619a2 Remove ModuleSrcPath
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file.  In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.

Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.

Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.

Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
2019-03-20 19:36:03 +00:00
Colin Cross
2fafa3ec49 Remove ExpandSourcesSubDir and ModuleSrcPath.WithSubDir
Replace ExpandSourcesSubDir with ExpandSources plus
PathsWithModuleSrcSubDir, which loops over the paths and uses
Join to create paths relative to subdir on any results that
are ModuleSrcPaths.

Test: All soong tests
Change-Id: I11a7face88641e2c26ccdca0a3117d5c38ab588e
2019-03-20 19:35:52 +00:00
Colin Cross
f46f315a55 Merge "Support go 1.12" am: bb3deefa9d am: 930ae2f702
am: 318c318f97

Change-Id: I512af0e859af2b0c4bd690e3224488f05e05b0a5
2019-03-19 21:37:08 -07:00
Colin Cross
3020fee889 Support go 1.12
go 1.12 changed the stack trace of a function call during global
variable initialization to contain a function called
"PKG.init.ializers".  Fix callerName to split the package path
and function name on the first "." after the last "/", and look
for functions called "init.ializers" or functions with the
prefix "init."

Test: Soong tests with go 1.12
Change-Id: I25f1ba989ef2d65ca85cb7c9d84454cca230ff86
2019-03-19 23:47:22 +00:00
Julien Desprez
2af7d4edd4 Merge "Support test_suite and test_config with sh_test" am: 8c84e60f38 am: 542c4cb03f
am: e0036d8b4a

Change-Id: I886eff6faa96a8ce6c1f90a1ec24a75612660522
2019-03-19 14:20:30 -07:00
Julien Desprez
8c84e60f38 Merge "Support test_suite and test_config with sh_test" 2019-03-19 21:05:13 +00:00
Colin Cross
526f14600f Merge "Don't add dependencies on modules referenced in unused arch variants" am: 1f74135f97 am: 577ef51ca7
am: 0612d8431b

Change-Id: Iec9802e9c4873217d7d15126ced7b31207313279
2019-03-19 01:26:02 -07:00
Julien Desprez
9e7fc1407d Support test_suite and test_config with sh_test
Start basic suite support for sh_test so we can
include them in suites.

Test: make adb-remount-sh
Bug: 127959519
Change-Id: If73541d614a2d809e4f94e4fee4c660840631cc1
2019-03-18 14:35:21 -07:00
Colin Cross
a3a97415d3 Don't add dependencies on modules referenced in unused arch variants
When extracting dependencies from properties tagged with
`android:"path"`, only look at the general property structs
and not the arch-specific ones.  The necessary arch-specific
values will be appended into the general property structs.

Fixes: 128377112
Test: path_properties_test.go
Change-Id: I35e35555d5b15473229a7458fcfc2c7dacaec889
2019-03-18 12:49:14 -07:00
Benjamin Gordon
58d24616e2 Merge "Add stoney ridge x86 variant" am: cd2e52870a am: 5473e3fbdf
am: c8351c6af8

Change-Id: I83644aba3f3657bf630b9330f6d30ab1ff3466e1
2019-03-15 15:57:18 -07:00
Benjamin Gordon
87e7f2f685 Add stoney ridge x86 variant
Bug: 124445930
Test: compile and deploy to grunt
Change-Id: Ie63217c7c68f5688bf070cbabf9ea5a1b82d3acc
2019-03-15 11:04:48 -06:00
Jiyong Park
7753455639 Merge "Create symlink for bionic files" am: 7487fb54fe am: f0fceb2cbf
am: 94d2eef048

Change-Id: Ic1d94187e0d4703165e0666cac04017a780b0fea
2019-03-15 02:40:51 -07:00
Treehugger Robot
7487fb54fe Merge "Create symlink for bionic files" 2019-03-15 09:02:18 +00:00
Patrice Arruda
bf54cde61c Merge "Soong: update the synopsis of vts_config module." am: 6f933e5528 am: 826a11f6ec
am: 71bd15d860

Change-Id: I8d60b5947b02c91f52a990df6276d05b7d32d60c
2019-03-14 18:40:13 -07:00
Treehugger Robot
6f933e5528 Merge "Soong: update the synopsis of vts_config module." 2019-03-15 01:22:27 +00:00
Stephen Hines
33b3746bb7 Merge "Add AVX/AVX2 supported archs in build system" am: 5971f50a22 am: 3c9be84a21
am: 55b011de4c

Change-Id: I7bf976ebdafd8a7859c4c6aa6a6df08c6947316b
2019-03-14 18:21:09 -07:00
Stephen Hines
5971f50a22 Merge "Add AVX/AVX2 supported archs in build system" 2019-03-15 00:55:04 +00:00
Patrice Arruda
3cec272c94 Soong: update the synopsis of vts_config module.
Added more details on the vts_config synopsis.

Bug: b/128337482
Test: Ran the doc generation command and verified that the synopsis
was updated in vts_config module.

Change-Id: I1d29a7f800b5dd4e6f1719af5d0d3b723202f33d
2019-03-14 12:05:02 -07:00
Jiyong Park
f11943527d Create symlink for bionic files
This change creates following symlinks for bionic files.

/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so
/system/lib/libm.so -> /apex/com.android.runtime/lib/bionic/libm.so
/system/lib/libdl.so -> /apex/com.android.runtime/lib/bionic/libdl.so
/system/bin/linker -> /apex/com.android.runtime/bin/linker
...

This allows us to not have mountpoints under /bionic.

Bug: 125549215
Test: m and inspect the symlinks in the system partition.
Change-Id: I3a58bf4f88c967862dbf06065a1af8fc4700dda3
2019-03-15 03:04:52 +09:00
Patrice Arruda
297e7a4950 Merge "Soong: Update the filegroup's synopsis documentation." am: 33548f07a8 am: afb11048e4
am: 3574493fbd

Change-Id: I3c8cf1a0a69e19c49f59b89a3593fb5e95976afc
2019-03-13 14:13:56 -07:00