Commit graph

15085 commits

Author SHA1 Message Date
Jaewoong Jung
9dc1756484 Merge changes I3d6506f5,I3667eac9
* changes:
  Fix split apk paths.
  Fix android_test install path.
2019-10-01 16:54:40 +00:00
Treehugger Robot
fd3688c449 Merge "apex: libbinder whitelist -= com.android.media" 2019-10-01 00:56:39 +00:00
Treehugger Robot
ec3b133b8b Merge "Move fuzz phony to be make-defined, and add to dist." 2019-09-30 20:24:19 +00:00
Mitch Phillips
a0a5e19140 Move fuzz phony to be make-defined, and add to dist.
Add the fuzz packages to dist. This requires that the phony for 'make'
be define in make itself, rather than in Soong. See comments on other
patch in topic for more information.

Bug: 141026328
Test: m fuzz dist

Change-Id: I4cd476adcfa42e4b40911c4a32427a7b00c67cc3
2019-09-30 10:36:11 -07:00
Steven Moreland
06bf3bcd7c apex: libbinder whitelist -= com.android.media
All APEXes need to ship w/o libbinder since it does not offer a stable
wire protocol. Removing this since nothing adds a libbinder dep here.

Bug: 139016109
Test: build
Merged-In: Ic6a3fcb68054d8c7a5f2f64795a0e2889ce1abe8
(cherry picked from commit 1c3108d629)
Change-Id: Ic6a3fcb68054d8c7a5f2f64795a0e2889ce1abe8
2019-09-30 21:34:45 +09:00
Treehugger Robot
852116a061 Merge "respect "apex_name:" for "apex" module" 2019-09-30 00:21:10 +00:00
Jaewoong Jung
7dd4ae2fb9 Fix split apk paths.
Soong has been outputting incorrect Android.mk entries for split apks.
soong_app_prebuilt.mk expects LOCAL_SOONG_BUILT_INSTALLED to contain a
list of <split apk path>:<on device install path> pairs whereas Soong
outputs <split apk path>:$(LOCAL_MODULE_PATH)/<split apk filename> pairs.

This also adds a missing underscore in split apk filenames.

Test: m Split
Bug: 140795853
Change-Id: I3d6506f5e12106174fbbaef34749a272b5e1b90c
2019-09-27 17:13:15 -07:00
Jaewoong Jung
0949f31657 Fix android_test install path.
Test: m nothing + diff soong mk and ninja files.
Bug: 140795853
Change-Id: I3667eac951dea7e447cf73219ff89199fca9ed63
2019-09-27 16:42:20 -07:00
Alistair Delva
659053ab34 Merge "Deny rust warnings by default." 2019-09-27 20:38:51 +00:00
Treehugger Robot
318c9c5d17 Merge "Pass filename mappings to C++ and Java extractors." 2019-09-27 20:00:44 +00:00
Peter Collingbourne
bcb5ca006c Merge "Allow sanitize attribute on cc_objects and propagate sanitize attributes into them." 2019-09-27 19:31:13 +00:00
Chih-Hung Hsieh
efdd7aca76 Deny rust warnings by default.
* "-D warnings" means "deny all warnings" and make them errors.
* Modules with warnings should fix all warnings or use
        deny_warnings: false

Bug: 141699953
Test: mm in projects with Rust modules
Change-Id: I6310dee8e34b7780937e8fc1834016a04a943a2f
2019-09-27 11:16:22 -07:00
Sasha Smundak
651436460a Pass filename mappings to C++ and Java extractors.
Android builds by default put artifacts into out/ subdirectory of
the source tree, causing the extractor to record their names as
relative. The indexer considers such files as sources, which is wrong.
Fortunately, the extractor can be fed a set of filename rewriting
rules (see build/tools/vnames.json).
Also, undo previous unsuccessful attempt use to absolute path for the
output directory to distinguish between source code and artifacts.

Bug: 141385476
Test: run the build, inspect compilation units of the kzip file
Change-Id: I89ec3aed8fd14f43ea6e0b226d54f643346f6125
2019-09-27 10:28:11 -07:00
Jaewoong Jung
9a1e8bdd0b Migrate java/androidmk.go to new system #2
This change migrates remaining AndroidMk()s in java/androidmk.go to
AndroidMkEntries().

Test: Soong tests
Test: Built a system image
Test: Manual inspection of diffs
Change-Id: Ib1107fafb175fdfd8539bf6158548224e4c87a6d
2019-09-27 08:10:39 -07:00
Jaewoong Jung
2784fda152 Merge "Migrate java/androidmk.go to new system #1" 2019-09-27 14:40:24 +00:00
Paul Duffin
2e3e5e3e76 Remove unused core-system-modules
Soong tests no longer need to define a dummy version of this.

Test: m checkbuild
Bug: 141613583
Change-Id: Iad12560aedc74a499808bd52d9ea09ab0d68d743
2019-09-27 10:38:06 +01:00
Treehugger Robot
d9c3a7ffba Merge "Name the resulting file $BUILD_NUMBER.kzip, drop revision.txt" 2019-09-27 00:14:28 +00:00
Dan Shi
933b619383 Merge "Allow test to specify whether or not to auto-generate test config" 2019-09-27 00:01:12 +00:00
Sasha Smundak
114d966c27 Name the resulting file $BUILD_NUMBER.kzip, drop revision.txt
Bug: 137977523
Test: manual
Change-Id: Ifb02f033baaf6ee1668ccaa56b59edd05dce078a
2019-09-26 14:54:19 -07:00
Dan Shi
6ffaaa830d Allow test to specify whether or not to auto-generate test config
Attribute `auto_gen_config` is added to test modules.
Test config will be generated if:
the attribute is not set and AndroidTest.xml doesn't exists
or
the attribute is set to true, whether or not AndroidTest.xml exists.

Test config will NOT be auto-generated if:
the attribute is not set and AndroidTest.xml exists
or
the attribute is set to false, whether or not AndroidTest.xml exists.

Bug: 141684102
Test: build test module with auto_gen_config set to true
Change-Id: I64fb003a83d8c32a967835e5f8d12fe4476043be
2019-09-26 13:29:28 -07:00
Peter Collingbourne
1c648b8936 Allow sanitize attribute on cc_objects and propagate sanitize attributes into them.
Without this change, we can end up failing to sanitize parts of libraries
that are compiled as cc_objects, such as bcm_object.o in boringssl. This
is normally harmless (except that the sanitizer would fail to detect bugs
in unsanitized code), however boringssl in particular needs to be compiled
with HWASAN enabled in all translation units in order to avoid link errors
with newer toolchains that support HWASAN global instrumentation.

Change-Id: Ib8bd325f76b7852cab435bff79d6945768298a5c
2019-09-26 12:35:06 -07:00
Colin Cross
84dfc3d331 Make CreateModule take an android.ModuleFactory
Reduce the boilerplate required to call CreateModule by taking an
android.ModuleFactory instead of a blueprint.ModuleFactory.

Test: m checkbuild
Change-Id: I1259d2dd3f7893b5319c333bc180727ac40f9e91
2019-09-26 17:19:26 +00:00
Colin Cross
505bcb88ed Merge "Use ctx.Fatalln instead of log.Fatalln for absolute path errors" 2019-09-26 17:18:49 +00:00
Treehugger Robot
d08d5c9de1 Merge changes If92421af,I2e434f4c,I8735032e
* changes:
  Force dumpvars into dumb terminal mode and move log files
  status table: don't write newlines in non-scrolling terminals
  status table: ANSI code rows and columns are 1-based
2019-09-26 17:13:50 +00:00
Jooyung Han
d15aa1f123 respect "apex_name:" for "apex" module
For now, apex_name is used only for flattened apex.
Even if apex_name is set, the activation point of unflattened is
determined by 'name' in apex_manifest.json.

This change make apex_name as priority.
If apex_name is set, then use this for apex name
- update name in apex_manifest.json to apex_name
- do not check if key filename matches (use apex_name as key name)

This can be useful if soong wants to rename apex module. Simply setting
apex_name has the same effect of renaming "activation point" of apex.

But: 139774701
Test: m (soong test)
Change-Id: I8ea3645e4aa8f317997bc1443ec308ed0595b1c2
2019-09-27 01:50:46 +09:00
Jooyung Han
5e493d5660 Merge "fix: "no_apex" can be put in defaults" 2019-09-26 01:07:21 +00:00
Daniel Norman
488e7e02a2 Merge "Performs same checks as aidl_interface.go before stripping leading "I"." 2019-09-26 00:33:57 +00:00
Alexander Smundak
f0eb968d2f Merge "Build output directory should be an absolute path." 2019-09-25 21:51:37 +00:00
Alexander Smundak
a628a97ed5 Merge "Generate revision.txt file containing unique ID." 2019-09-25 20:22:03 +00:00
Treehugger Robot
8f2a61fef1 Merge "Remove libneuralnetworks from libbinder whitelist." 2019-09-25 16:54:13 +00:00
Ivan Lozano
a38312c3d3 Merge "Add Soong test for device proc-macro deps." 2019-09-25 15:17:32 +00:00
Przemyslaw Szczepaniak
598898444f Remove libneuralnetworks from libbinder whitelist.
Test: build & flash crosshatch
Bug: 139282353
Change-Id: Iaf7904fdb306dd648430ce7e167977bd6508f146
Merged-In: Iaf7904fdb306dd648430ce7e167977bd6508f146
(cherry picked from commit 76b155448d)
2019-09-25 13:04:48 +01:00
Jooyung Han
cc372c5b1d fix: "no_apex" can be put in defaults
Currently, putting no_apex in defaults module doesn't work.

To fix this,
* 'no_apex' property is added as 'defaultable'.
* apex module doesn't follow beyond 'defaults' module.

Bug: 141560644
Test: m (soong tests added)
Change-Id: I8410785f7f83d843689a33b1241d74086c6a7671
2019-09-25 15:27:47 +09:00
Treehugger Robot
72b43adb56 Merge "Add 'make fuzz' build rule." 2019-09-25 06:14:41 +00:00
Mitch Phillips
d3254b4899 Add 'make fuzz' build rule.
Adds the `make fuzz` build rule. This offers a few features on top of
`make haiku`:
 1. Identifies all fuzz targets through the build system, rather than
 having to maintain a golden file.
 2. Packages now exist in out/soong/ and are packaged on a per-architecture
 basis. Packages also now contain fuzzer seed corpus && dictionary.
 3. This gives us further extension options:
  - Packaging shared libraries for shared library fuzzing.
  - Presubmit tests for fuzzing. Each fuzz target could be made into a
  regression test by adding the crash testcase to the corpus. We can
  also ensure that example_fuzzer finds a bug with an ASan report as a
  presubmit smoke test.

Bug: 141026328
Test: m fuzz && unzip -l out/soong/fuzz-$ARCH.zip

Change-Id: I7aaad616d6b194a3beaf908241a9817df9dfdce1
2019-09-24 20:48:00 -07:00
Daniel Norman
10b743509e Performs same checks as aidl_interface.go before stripping leading "I".
Test: building AIDL interface named IntEnum.aidl. Leading I is not
removed.
Change-Id: Ia40cbdf9b8936f6f58a99971eae1b2138a678c91
2019-09-24 17:41:15 -07:00
Ivan Lozano
b9040d6b76 Add Soong test for device proc-macro deps.
Ensure that devices can include proc_macros, which are host-only
and may include host-only dependencies.

Bug: 141491501
Test: Soong tests pass.
Test: Test fails as expected when removing CL 1126496
Change-Id: I3ae7ab80283cd1fd4b800a533cb3205b3c108d45
2019-09-25 00:23:54 +00:00
Ivan Lozano
f23f6d20f0 Merge changes from topic "add_rust_arm64_devices"
* changes:
  Add ARM32 device Rust toolchain.
  Add AArch64 device Rust toolchain.
2019-09-24 21:39:51 +00:00
Ivan Lozano
ca34692de1 Merge "Fix proc_macro dependency handling." 2019-09-24 21:33:45 +00:00
Sasha Smundak
a1e178f39d Build output directory should be an absolute path.
Bug: 141385476
Test: manual
Change-Id: I969c761571dca6949204a8aa87a0b52ba98761c2
2019-09-24 12:07:52 -07:00
Ivan Lozano
e91823e6e0 Add ARM32 device Rust toolchain.
Bug: 141207434
Test: build example rust device module.
Change-Id: I2d5b45ba09f386e1c7da7d7cdc58f13f31135863
2019-09-24 10:35:28 -07:00
Ivan Lozano
f1c8433b40 Add AArch64 device Rust toolchain.
Bug: 141207434
Test: build example rust device module.
Change-Id: I0932a614942bf4a4d4b6c153fcc4fc79c7f202bd
2019-09-24 10:35:28 -07:00
Ivan Lozano
5ca5ef6788 Fix proc_macro dependency handling.
Currently proc_macros don't pull in the correct arch dependencies when
the host arch differs from the target arch.

This fixes how proc_macro dependencies are handled by defining them as
always being host-only and including them as dependencies for
device-modules by using AddFarVariationDependencies.

Bug: 141491501
Test: Example device rust module builds with proc_macro dependency.
Change-Id: Ic037dc406ce90526f8b68c92fffc0d93a498a4ff
2019-09-24 10:35:20 -07:00
Sasha Smundak
69ee7b0967 Generate revision.txt file containing unique ID.
Bug: 137977523
Test: manual
Change-Id: Ib1fbf6a4305bd843ace203e3f62a511fbdb168a1
2019-09-24 10:28:36 -07:00
Colin Cross
1f6faeb50f Use ctx.Fatalln instead of log.Fatalln for absolute path errors
log.Fatalln calls os.Exit, which skips deferred functions and
leaves the console with the cursor disabled.  Use ctx.Fatalln
instead, which uses a panic to exit and calls the deferred
function to restore the cursor.

Test: DIST_DIR=/tmp/\test\ foo m dist
Change-Id: Ie92297075e37c171d5ba48848a0ddb19652b051c
2019-09-23 15:55:54 -07:00
Treehugger Robot
ec3e81b4be Merge "Move sysprop gen code to sysprop module" 2019-09-23 22:25:40 +00:00
Colin Cross
c0b9f6b9d2 Force dumpvars into dumb terminal mode and move log files
Force soong_ui in dumpvars mode to use a dumb terminal so that it
doesn't print an empty status table.  Also move the logs to files
that are prefixed with "dumpvars-" so that they don't rotate the
real build logs.

Fixes: 139307849
Test: lunch
Change-Id: If92421af07731fedc9ca42670f309e95922a2224
2019-09-23 14:24:57 -07:00
Yi Kong
aefd0af575 Merge "Remove -Wno-format-pedantic cflag" 2019-09-23 17:48:21 +00:00
Treehugger Robot
1a4d45b2f8 Merge "Rust config whitelist: Add chh@ to OWNERS" 2019-09-23 15:32:51 +00:00
Treehugger Robot
d9271cd823 Merge "Add isFlattenedVariant function" 2019-09-23 14:17:06 +00:00