Commit Graph

15000 Commits

Author SHA1 Message Date
Jiyong Park 19dd886ec5 [automerger skipped] Merge changes from topic "drop_circular_dep"
am: 7153b767a5 -s ours
am skip reason: change_id I81f9614d20fbdd2f7d18340d6dbdb592e7acde06 with SHA1 01d5401dc0 is in history

Change-Id: Id03a7bdf7494b8bb86e5bf252d4cc7f6da7f0815
2019-08-30 07:09:14 -07:00
Treehugger Robot 7153b767a5 Merge changes from topic "drop_circular_dep"
* changes:
  Remove srcs_lib and srcs_lib_whitelist_pkgs
  Remove the automatic dependency to framework-res.apk for R/Manifest
  Prepare to be able to put framework-res in srcs
2019-08-30 13:47:31 +00:00
Jiyong Park 777050e48e Merge "Automatically enable abi checker for the stub libs"
am: c61c83db9a

Change-Id: I44b7eebdd0b2ac55b55c4b0f2fa1448bdf80ba9d
2019-08-29 23:10:19 -07:00
Treehugger Robot c61c83db9a Merge "Automatically enable abi checker for the stub libs" 2019-08-30 05:29:23 +00:00
Jiyong Park 2867f766d4 Merge changes from topic "drop_circular_dep" into stage-aosp-master
* changes:
  Remove srcs_lib and srcs_lib_whitelist_pkgs
  Remove the automatic dependency to framework-res.apk for R/Manifest
  Prepare to be able to put framework-res in srcs
2019-08-30 05:14:21 +00:00
Yi Kong 09c3304fe4 Merge "Re-enable tautological-unsigned-zero-compare"
am: 73e2125894

Change-Id: I12b004231a9f19a85f8afb9d0ac1d78bf6a50cac
2019-08-29 19:05:03 -07:00
Yi Kong 73e2125894 Merge "Re-enable tautological-unsigned-zero-compare" 2019-08-30 01:44:27 +00:00
Dan Willemsen c89b6f1981 Rewrite depfile from sbox to stay reproducible
sbox will generate a random directory for the output root, and most
tools will encode that directory name in the output target of the
depfile.

So embed the library from dep_fixer into sbox so that it can rewrite the
output filename to a static (reproducible) value. Ninja doesn't care
what that value is, so it's just "outputfile".

Also fix up rule_builder to actually tell sbox about the depfile.

Test: mmma system/iorap; check the contents of:
out/soong/.intermediates/system/iorap/libiorap-binder/android_arm_armv7-a-neon_core_static/gen/aidl/system/iorap/binder/com/google/android/startop/iorap/IIorap.cpp.d

Change-Id: I3640a2e8b0c034f143a35e398a8418a6d621b265
2019-08-29 14:47:40 -07:00
Pete Gillin 82639482fa Merge "Normalize and validate the java_version property."
am: 17f4728d4b

Change-Id: Ib1caaf9cbe29cfee6bbffa54acdd3aaabaf59e20
2019-08-29 11:32:00 -07:00
Treehugger Robot 17f4728d4b Merge "Normalize and validate the java_version property." 2019-08-29 18:15:07 +00:00
Mitch Phillips 586b8a2042 Merge "Disable FORTIFY for fuzzer builds."
am: 1e7f14b1d5

Change-Id: Ifa6d2c356181af8005e8df12801141b17e5b99ae
2019-08-29 10:10:17 -07:00
Anna Trostanetski d5c734f2c3 Merge "Move platform compat config to their own directory."
am: c772405d75

Change-Id: Ia8037254a105de27bcd6c871fa1a3ef2858a0826
2019-08-29 10:08:30 -07:00
Treehugger Robot 1e7f14b1d5 Merge "Disable FORTIFY for fuzzer builds." 2019-08-29 17:00:20 +00:00
Anna Trostanetski c772405d75 Merge "Move platform compat config to their own directory." 2019-08-29 16:57:34 +00:00
Roland Levillain 3ca5d67ec6 Merge changes from topic "check-flattened-art-apex"
am: af93360ef9

Change-Id: I0227444dc4cd2de48e2a1b63fa0a8f02fdd1631d
2019-08-29 08:34:47 -07:00
Roland Levillain e78b1103af Allow modules to be enabled/disabled depending on whether APEXes are flattened.
am: 2879d41a98

Change-Id: I4ec408f99805b5229f926163fea2ebefb8515032
2019-08-29 08:34:33 -07:00
Roland Levillain af93360ef9 Merge changes from topic "check-flattened-art-apex"
* changes:
  Add an output file type for flattened APEXes.
  Allow modules to be enabled/disabled depending on whether APEXes are flattened.
2019-08-29 15:17:29 +00:00
Pete Gillin 4e8b48a055 Normalize and validate the java_version property.
There are two parts to this change.

Normalization: If a module specifies 'java_version: "9"', this is now
normalized into 'java_version: "1.9"'. Users might reasonably assume
that "9" should be valid, since javac treats them as synonyms (and, in
fact, the javac documentation lists "9" as a valid value but doesn't
mention "1.9"). However, the soong code that triggers JPMS support
(i.e. setting -system rather than --boot-class-path) looks for the
string "1.9", so prior to this change modules specifying "9" would
fail with a confusing error ('javac: option --boot-class-path not
allowed with target 1.9'). Normalizing "9" to "1.9" fixes this. (The
change normalizes the other supported values, too, for consistency.)

Validation: This change also makes the build fail-fast with a clear
error message for invalid values. In particular, modules specifying
"10" or "11" fail with an explicit message that this is not supported,
in anticipation of the switch to OpenJDK 11. Prior to this change,
modules setting those values would get the confusing
'--boot-class-path not allowed' error described about since JPMS
support would not be triggered. (That could be fixed by changing the
JPMS logic to trigger on "10" and "11", but that would be dangerous
since support in the rest of the system for v54 and v55 class files is
unproven: it is better to fail explicitly.) (This change also makes it
fail-fast for any unrecognized values.)

Test: make java
Test: make targets with java_version set to "1.8", "8", "1.9", and "9", all succeed ("9" fails without this change)
Test: make targets with java_version set to "10" and "11", fail with the explicit "not supported" message
Test: make target with java_version set to "xxx", fails fast with the "unrecognized" message
Bug: 131683177
Change-Id: I2f5eb496c29d7736c68c01401c3f0967aeae99fc
2019-08-29 16:10:04 +01:00
atrost 87901b055b Move platform compat config to their own directory.
This prevents SystemConfig from trying to read them. Also removed ' ' prefix+postfix when creating an empty config.
Bug: 140074769
Bug: 140092095
Test: Flashed device, no more "SystemConfig: Tag compat-change is unknown..." warnings in logcat

Change-Id: I374826526fe3e4555474688b65a0be7253c6dd8c
2019-08-29 13:46:41 +00:00
Jiyong Park 01d5401dc0 Remove srcs_lib and srcs_lib_whitelist_pkgs
They are no longer used. Sources are provided via filegroup.

Also removing the SrcDependency interface as it is no longer used.

Bug: 135922046
Test: m
Merged-In: I81f9614d20fbdd2f7d18340d6dbdb592e7acde06
(cherry picked from commit fa21cba64a)
Change-Id: I81f9614d20fbdd2f7d18340d6dbdb592e7acde06
2019-08-29 15:54:29 +09:00
Jiyong Park 0650aca86a Remove the automatic dependency to framework-res.apk for R/Manifest
framework-minus-apex and framework-annotation-proc had automatic
dependency to framework-res.apk to get the generated R.java and
Manifest.java as their inputs.

That is no longer needed as the sources are fed from framework-srcs
filegroup.

Bug: 70046217
Test: m

Merged-In: Ibb03db01c177d6e908cbbdf91f18be8744f02c03
(cherry picked from commit 8cc55bdffe)
Change-Id: Ibb03db01c177d6e908cbbdf91f18be8744f02c03
2019-08-29 15:54:23 +09:00
Jiyong Park 4c61d97457 Prepare to be able to put framework-res in srcs
This change introduces two changes required to put
framework-res explicitly in srcs property, without relying on the build
system to specially add framework-res as a dependency to
framework-minus-apex, etc.

1) R.java and Manifest.java generated from aapt were packaged to the file
R.jar directly under the gen directory. With this change, the file
becomes android/R.srcjar under the gen directory.

2) android_app module now overrides OutputFileProducer interface so that
it can recognize "{.aapt.srcjar}" tag to reference the generated srcjar file.

Being able to put framework-res in srcs allows us to pass all the source
files (both in the source tree and the ones generates) via a filegroup.
Previously, the source files could only be passed via the java_library
module type. This caused a circular dependency problem when the java
library was used as an input (src_libs) of the droiddoc module. Using
filegroup eliminates the circular dependency.

Bug: 70046217
Test: m

Merged-In: I9ab6116bcc6fa3da60933d427575463b05ae69b4
(cherry picked from commit 94f37f33ed)
Change-Id: I9ab6116bcc6fa3da60933d427575463b05ae69b4
2019-08-29 15:54:17 +09:00
Dan Shi f11508a94f Merge "Add option disable_framework for auto-generated test config"
am: e7eb842bbb

Change-Id: I0f78c37159c19db327560f6473de78177231f746
2019-08-28 22:28:13 -07:00
Dan Shi e7eb842bbb Merge "Add option disable_framework for auto-generated test config" 2019-08-29 05:18:20 +00:00
Jiyong Park b5ddfa9219 Remove srcs_lib and srcs_lib_whitelist_pkgs
They are no longer used. Sources are provided via filegroup.

Also removing the SrcDependency interface as it is no longer used.

Bug: 135922046
Test: m
Merged-In: I81f9614d20fbdd2f7d18340d6dbdb592e7acde06
(cherry picked from commit fa21cba64a)
Change-Id: I81f9614d20fbdd2f7d18340d6dbdb592e7acde06
2019-08-29 13:58:40 +09:00
Jiyong Park 289206594c Remove the automatic dependency to framework-res.apk for R/Manifest
framework-minus-apex and framework-annotation-proc had automatic
dependency to framework-res.apk to get the generated R.java and
Manifest.java as their inputs.

That is no longer needed as the sources are fed from framework-srcs
filegroup.

Bug: 70046217
Test: m

Merged-In: Ibb03db01c177d6e908cbbdf91f18be8744f02c03
(cherry picked from commit 8cc55bdffe)
Change-Id: Ibb03db01c177d6e908cbbdf91f18be8744f02c03
2019-08-29 13:58:18 +09:00
Jiyong Park b7c639e0b3 Prepare to be able to put framework-res in srcs
This change introduces two changes required to put
framework-res explicitly in srcs property, without relying on the build
system to specially add framework-res as a dependency to
framework-minus-apex, etc.

1) R.java and Manifest.java generated from aapt were packaged to the file
R.jar directly under the gen directory. With this change, the file
becomes android/R.srcjar under the gen directory.

2) android_app module now overrides OutputFileProducer interface so that
it can recognize "{.aapt.srcjar}" tag to reference the generated srcjar file.

Being able to put framework-res in srcs allows us to pass all the source
files (both in the source tree and the ones generates) via a filegroup.
Previously, the source files could only be passed via the java_library
module type. This caused a circular dependency problem when the java
library was used as an input (src_libs) of the droiddoc module. Using
filegroup eliminates the circular dependency.

Bug: 70046217
Test: m

Merged-In: I9ab6116bcc6fa3da60933d427575463b05ae69b4
(cherry picked from commit 94f37f33ed)
Change-Id: I9ab6116bcc6fa3da60933d427575463b05ae69b4
2019-08-29 13:57:32 +09:00
Dan Willemsen ce33a3546c Merge "Disallow __DATE__/__TIME__ on host builds"
am: 63cce39166

Change-Id: Ib04880b728ecde0cd9789077fe9d26b8a96d7229
2019-08-28 19:31:57 -07:00
Dan Willemsen 63cce39166 Merge "Disallow __DATE__/__TIME__ on host builds" 2019-08-29 02:14:27 +00:00
Jaewoong Jung 6e104c7ee5 Merge changes Ife12ba69,Ibf910262
am: 7ca5576905

Change-Id: I4e486be727b3be79afac66644cc3e9967e43bd45
2019-08-28 18:17:30 -07:00
Jaewoong Jung 7ca5576905 Merge changes Ife12ba69,Ibf910262
* changes:
  Implement android_test_import
  AndroidMkEntries minor refactoring.
2019-08-29 00:55:14 +00:00
Jooyung Han 7e035187e9 Merge "soong: Add tests for depending on disabled module"
am: a9caf47ea2

Change-Id: I201c11b499650c96c3d52b53eda72f163364681e
2019-08-28 17:24:44 -07:00
Ivan Lozano eb18951d4d Merge "Add Rust support to Soong."
am: c6de2d9482

Change-Id: I2fd8084c35e8c4a3a27a3e3d5a2cd8b181b1646f
2019-08-28 17:07:56 -07:00
Jooyung Han a9caf47ea2 Merge "soong: Add tests for depending on disabled module" 2019-08-28 23:58:33 +00:00
Dan Shi 20ccd2125d Add option disable_framework for auto-generated test config
The new option will allow the auto-generated test config for cc_test to
include RunCommandTargetPreparer to disable framework before the test
run and re-enable it after the test run.

Bug: 140065309
Test: test hello_world_test with the new option.
Change-Id: If2189e9474f5b11bd0d0471e231a2cae14155389
2019-08-28 15:53:43 -07:00
Ivan Lozano c6de2d9482 Merge "Add Rust support to Soong." 2019-08-28 22:04:56 +00:00
Jaewoong Jung b28eb5fdcb Implement android_test_import
Test: app_test.go, prebuilt CTS tests
Fixes: 132371143
Change-Id: Ife12ba691dfa597dde90faf0957224a6f444e139
2019-08-28 14:58:19 -07:00
Ivan Lozano ffee334706 Add Rust support to Soong.
Adds support to Soong for building rust modules. This currently only
supports x86_64 device and x86 linux host targets. The functionality
is sufficient to build crosvm.

Bug: 136189233
Test: Test module builds.
Test: crosvm builds.
Change-Id: I6ea04615834a6d673578ab10ea1a2eb04259fe09
2019-08-28 14:11:07 -07:00
Dan Willemsen ba23aa723b Merge "Save deps when asflags contains -xassembler-with-cpp"
am: 7eedfe00e7

Change-Id: Iecedb5679553bdf39c393c76e218da277b6bb8a1
2019-08-28 13:12:01 -07:00
Jaewoong Jung e0dc8dfd22 AndroidMkEntries minor refactoring.
This includes a few changes that make AndroidMkEntries more resemble
AndroidMkData, especially in terms of how extra entries are added.
Most importantly it can now have multiple custom functions.

Test: Soong tests
Change-Id: Ibf9102624d16d0c1c9894a2794fc7c797bb34c9a
2019-08-28 13:07:03 -07:00
Mitch Phillips b9b3e79096 Disable FORTIFY for fuzzer builds.
Disables FORTIFY for fuzz target builds. We generally build with a
sanitizer and want the sanitizer to handle the bugs and provide us with
a nice stack trace.

Bug: 140187921
Test: m example_fuzzer && $ANDROID_HOST_OUT/fuzz/example_fuzzer (note
that you get a proper ASan report instead of a fortify crash)

Change-Id: I15a117b26c401a03785fb44c0f796588f366bc55
2019-08-28 12:41:07 -07:00
Treehugger Robot 7eedfe00e7 Merge "Save deps when asflags contains -xassembler-with-cpp" 2019-08-28 19:16:11 +00:00
Jooyung Han 853b801628 Merge "Remove hashtree from builtin APEXes"
am: 21738f6032

Change-Id: Iaecfc7dcd196ac3ecd622049e4a78c90d8828be4
2019-08-28 07:28:02 -07:00
Treehugger Robot 21738f6032 Merge "Remove hashtree from builtin APEXes" 2019-08-28 14:18:21 +00:00
Jiyong Park a034b83988 Automatically enable abi checker for the stub libs
The header ABI checker is enabled by default for the libs that are used
across APEXes.

Bug: 138219814
Test: m
Change-Id: Ic0e9c5fdfa1259f500d990abc504c452436f3bd7
2019-08-28 22:58:11 +09:00
Yi Kong 30a3c7faca Re-enable tautological-unsigned-zero-compare
Clang is smarter at producing this new warning now, producing far
fewer false positives. Re-enable the diagnostic for Android.

Test: build
Bug: 72331526
Change-Id: I2020b887fbeb3cd833462e50df835a6cd104920d
2019-08-28 09:48:30 +00:00
Jooyung Han e65ed7cd67 Remove hashtree from builtin APEXes
Builtin APEXes (/system, ...) don't need hashtree.
So if we remove hashtree from builtin APEXes we can save more space in
/system.

However, this change only affects to the apex bundles which are built
from source, not from prebuilts.
Removing hashtree from prebuilts will be handled in a follow CL.

Bug: 139957269
Test: m
Test: see if /system/apex/*.apex have hashtree
Change-Id: Id755382b2153bf6bbaf2c480f3bbb91b6f62a564
2019-08-28 17:27:27 +09:00
Dan Willemsen 98ab311767 Save deps when asflags contains -xassembler-with-cpp
Usually, ".S" files are processes with the c preprocessor, and ".s"
files are not, so they don't have any dependency information, since it
is generated by the preprocessor.

But with the -xassembler-with-cpp flag, ".s" files are processed with
the preprocessor, so we should ask for dependency information from them.

Test: NINJA_ARGS="-t deps out/soong/.intermediates/external/sonivox/arm-wt-22k/libsonivox/android_arm_armv7-a-neon_core_static/obj/external/sonivox/arm-wt-22k/lib_src/ARM-E_filter_gnu.o" m
Test: treehugger
Change-Id: Iee7baeebc2b205b5a2f33e7c1705ea4a5b4fc95a
2019-08-27 21:20:40 -07:00
Dan Willemsen 5d980c878d Disallow __DATE__/__TIME__ on host builds
Instead of just making this an error when building for the device, also
turn on this error for host builds. This is more important as we begin
to use remote caches during the build.

Test: treehugger
Change-Id: I6fcc945464032d951729aead540ea77850c88c41
2019-08-27 19:37:10 -07:00
Sundong Ahn 1702ce060e Merge "Add no_apex check for static library"
am: 13f873cefc

Change-Id: I090569ca78a81fabd65a91ec7e781400ef12022d
2019-08-27 19:31:44 -07:00