Commit graph

1248 commits

Author SHA1 Message Date
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
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
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
Roland Levillain
2879d41a98 Allow modules to be enabled/disabled depending on whether APEXes are flattened.
Allow the `enabled` Soong/Blueprint property (e.g. in `genrule` and
`cc_prebuilt_binary` module definitions) to have a different value
when APEX flattening is enabled.

Test: m checkbuild
Bug: 139277987
Change-Id: Ic586bdfac7690077445da12543154381d92cf98e
Merged-In: Ic586bdfac7690077445da12543154381d92cf98e
2019-08-27 14:25:59 +01:00
Jooyung Han
d48f3c3885 soong: Add tests for depending on disabled module
This will check if direct deps of android.Module type is "Enabled()".
Previously, this is checked only if a module calls VisitDeps*()
functions in GenerateAndroidBuildActions().

Most modules call VisitDeps*() in GenerateAndroidBuildActions(),
but some modules don't. For example, "apex" module calls
WalkDepsBlueprint() or VisitDirectDepsBlueprint() since it
exceptionally depends on non-android.Module modules.

Therefore, when an apex module depends on disabled(enabled:false) module,
build fails with panic, which is fixed by this change.

Test: m # runs soong tests
Change-Id: I81c5c148bbd51a253d2904690eb76ae7b6df1a0f
2019-08-26 13:19:42 +00:00
Jiyong Park
90c36cedc2 Merge "Add no_apex property"
am: fb7e0b3aa2

Change-Id: I6f2b54d15ab4e7f787a2a714fabe4c8596173e29
2019-08-23 02:34:03 -07:00
Treehugger Robot
fb7e0b3aa2 Merge "Add no_apex property" 2019-08-23 04:00:38 +00:00
Pete Bentley
677ba298a5 Merge changes I75b4a761,I779f28c6,If1422372,I26307dd1
am: 792942de47

Change-Id: I48b5288882430733400f897aee1eb76a83fa64c2
2019-08-22 17:32:40 -07:00
Treehugger Robot
792942de47 Merge changes I75b4a761,I779f28c6,If1422372,I26307dd1
* changes:
  Introduce inject_bssl_hash library property.
  BoringSSL FIPS build - introduce extraLibFlags and use for STL libs.
  Allow linker scripts when building objects.
  Allow .o files as srcs.
2019-08-23 00:15:08 +00:00
Pete Bentley
fcf55bf656 Allow .o files as srcs.
Test: m nothing
Test: TreeHugger
Bug: 134581881
Bug: 137267623

Change-Id: I26307dd1129e58878f0468da3b61c53f074bd674
2019-08-22 13:21:37 -07:00
Jiyong Park
4f7dd9b4db Add no_apex property
This change adds 'no_apex' property which, when set to true, prevents
the module from being installed to any APEX. If the module is included
either directly or transitively in an APEX, but build fails.

Bug: 139016109
Test: m

Change-Id: If1478aa9660a3442f7dd1ffe45e4ca5611a6acbe
2019-08-22 20:37:07 +09:00
Roland Levillain
79ccffad7d Merge "Rename Soong variable FlattenApex as Flatten_apex."
am: 5f576375fa

Change-Id: I76f5104d5bbcdcbf08919b4acea6ff30179e56a8
2019-08-21 13:13:55 -07:00
Roland Levillain
5f576375fa Merge "Rename Soong variable FlattenApex as Flatten_apex." 2019-08-21 19:55:47 +00:00
Jaewoong Jung
7a6bb1d925 Merge "Add arch variant support to android_app_import."
am: a701d9071e

Change-Id: I7e20e0a6f4f0adaec0897fee3a371adcf78106d3
2019-08-16 09:26:58 -07:00
Jaewoong Jung
1ce9ac6755 Add arch variant support to android_app_import.
Bug: 128610294
Fixes: 138792623
Test: app_test.go
Change-Id: I47c80ec283ce58a0ce9b7d0af40844bd73e9d3f1
2019-08-15 16:26:18 -07:00
Hsin-Yi Chen
d5c7188d45 Merge "Add tags to the list of lsdump paths"
am: eef3366ab3

Change-Id: Ia08611a0c926ccebfcdbfade31b09878712b82e9
2019-08-14 19:44:45 -07:00
Hsin-Yi Chen
eef3366ab3 Merge "Add tags to the list of lsdump paths" 2019-08-15 02:20:30 +00:00
Roland Levillain
a386321345 Rename Soong variable FlattenApex as Flatten_apex.
This is so that it can be used as a Soong/Blueprint property.

Test: m
Bug: 139277987
Change-Id: I8840811fde92a71e97ed100aacfc7fbb003580d0
2019-08-13 15:08:29 +01:00
Jiyong Park
046a62833c Merge "java_import can be included in apex"
am: f02f30952d

Change-Id: Ia8fb126cd81b6108d3d2b213cecf0cb38acd06d2
2019-08-12 21:50:11 -07:00
Treehugger Robot
f02f30952d Merge "java_import can be included in apex" 2019-08-13 04:18:29 +00:00
Jiyong Park
9e6c242856 java_import can be included in apex
java_import can be included in apex via 'java_libs' property.

Bug: 139175488
Test: m (apex_test.go updated)
Change-Id: I3680a47cdac93b0cb2d41da8df3f8defa2bbe670
2019-08-13 09:36:39 +09:00
Inseob Kim
4cfa0dffeb Merge "Include headers and props to VNDK snapshot"
am: 337698988a

Change-Id: Ie21ee147be804d07d7089f9bc59ce658f6d3c21e
2019-08-11 16:21:14 -07:00
Treehugger Robot
337698988a Merge "Include headers and props to VNDK snapshot" 2019-08-11 23:04:49 +00:00
Jiyong Park
72969547dc Merge "Fix sanitizer dep"
am: e49256e564

Change-Id: I2199bff441c53410030ccf7f48fc386a7e123c4f
2019-08-11 10:45:55 -07:00
Treehugger Robot
e49256e564 Merge "Fix sanitizer dep" 2019-08-11 17:12:47 +00:00
Paul Duffin
b5af6204d3 Support multiple expected errors in neverallow_test.go
Extracted some common code used by visibility_test.go and
neverallow_test.go into a new function CheckErrorsAgainstExpectations
in testing.go.

(cherry picked from commit 8e47e8bc41)
Bug: 138428610
Test: m nothing
Change-Id: Iafbadf12c6ffdc4d9128fcfe7f15792df5cfd020
2019-08-09 09:31:41 +00:00
Colin Cross
f3d807778d Merge changes I918b4878,I85238d93,Iefee8a91
am: a48f8c8070

Change-Id: Icaea636b21c37c1017d11f104b100805c77459ab
2019-08-08 17:50:47 -07:00
Treehugger Robot
a48f8c8070 Merge changes I918b4878,I85238d93,Iefee8a91
* changes:
  Add an output file tag for proguard dictionaries
  Add InstallBypassMake
  Document wokaround for yama ptrace restrictions
2019-08-09 00:12:27 +00:00
Inseob Kim
ae55303f36 Include headers and props to VNDK snapshot
For all vndk snapshot libraries, header files exported by the libraries
will be included to the snapshot. Android.bp will contain necessary
information to link against/install vndk snapshot libraires:
export_include_dirs, export_system_include_dirs, export_flags, and
relative_install_path.

Bug: 132818174
Test: 1) m nothing && mv out/soong/build.ninja /tmp && m nothing &&
         diff -u -u out/soong/build.ninja /tmp/build.ninja
Test: 2) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true \
           development/vndk/snapshot/build.sh
Test: 3) development/vndk/snasphot/update.py
Test: 4) see contents of Android.bp and include directories
Change-Id: I791ab181545eb483242b04446afd40958bbb2b17
2019-08-08 18:45:59 +09:00
Jiyong Park
1d1119f4bd Fix sanitizer dep
This change fixes a problem in sanitizerMutator where a module is linked
with of non-sanitized variant of a lib at build-time, but is linked with
the sanitized variant of the lib at run-time.

This happened because, for each sanitizer type, every shared libs are
split into non-sanitized and sanitized variants, and then either of the
variants are suppressed from Make so that it isn't installed to the
device.

This change fixes the problem by NOT splitting for shared libs; only the
sanitized variant is created if needed. Header libs, static libs and
shared libs for a few sanitizer types (asan/fuzzer) are however split
into two. This is because the static and headers libs become part of the
depending module, and asan/fuzzer require that the depending module and
the dependant module should be compiled for the same sanitizer.

Bug: 138103882
Bug: 138426065
Test: m com.android.runtime.debug
Check that libziparchive exists under both
/system/apex/com.android.runtime/[lib|lib64]

Change-Id: Ia447785c485c0d049e19477b32bc638bfe6f1608
2019-08-08 01:51:26 +09:00
Paul Duffin
c9c0f52ea5 Merge changes from topic "restrict-libandroidicu-usages"
am: d5a57d8fc5

Change-Id: I5c6fa0a1806bbbb502564d96a8f28a110162c6e8
2019-08-07 04:10:21 -07:00
Hsin-Yi Chen
5348964723 Add tags to the list of lsdump paths
This commit adds tags, such as NDK, VNDK-core, and PLATFORM, to
LSDUMP_PATHS. The script updating the reference ABI dumps uses the tags
to determine the directories where the dumps should be created.

Test: make findlsdumps
Bug: 133176785
Change-Id: I8540286238cf0ec55c65e1c4f60cb9c12e5e57a1
2019-08-07 13:40:11 +08:00
Colin Cross
607d8587e4 Add InstallBypassMake
Allow modules to mark themselves as InstallBypassMake, which will
cause android.PathForModuleInstall to return a path in $OUT_DIR
instead of $OUT_DIR/soong.  This can be used for modules that
can handle installation to the final location on their own.  The
main blocker for most modules is support for the "required" property,
which requires adding dependencies on the installed location of
other modules.

Bug: 122332855
Test: m checkbuild
Change-Id: I85238d937ff30335167d4b3fec79bbefc734b5e1
2019-08-06 09:45:04 -07:00
Paul Duffin
f1c9bbee88 Support restrictions based on a module's OsClass
Bug: 137543088
Test: m nothing
Change-Id: Ibb05f222594d8180746b612c04ab1538a1cf3c0b
2019-08-06 11:09:09 +01:00
Paul Duffin
3578188fac Support restrictions based on a module's dependencies
Adds a neverallow InDirectDeps(deps) verb that will allow a neverallow
rule to restrict access to a specific dependency, irrespective of how
it is specified.

Bug: 137543088
Test: m nothing
Change-Id: I0c6bb702d55175e9b78b79e86e96924c5dd83efa
2019-08-06 11:09:02 +01:00
Jooyung Han
3c6423ef1a Put dependency in apex_manifest.json
am: e16330393a

Change-Id: I1090b2cc5154e7fefb1a16655ac874799fab740f
2019-08-05 17:33:57 -07:00
Treehugger Robot
d62b4af8b7 Merge changes from topic "put-dep-in-apex"
* changes:
  Add jsonmodify tool
  Put dependency in apex_manifest.json
2019-08-06 00:21:11 +00:00
Elliott Hughes
4177df9567 Merge "Reland "Remove product_is_iot.""
am: 80e071d1da

Change-Id: I875289d3b5f88034b4e1256054b41fb9e05dfdd1
2019-08-01 11:59:54 -07:00
Elliott Hughes
80e071d1da Merge "Reland "Remove product_is_iot."" 2019-08-01 18:24:26 +00:00
Jooyung Han
e16330393a Put dependency in apex_manifest.json
To generate ld.config.txt dynamically(b/123722631), each APEX should
provide some dependency information:
a) list of libraries which other APEXes(or system) can use from this apex
b) list of libraries which this apex uses from other APEXes(or system)

This change puts dependency information in apex_manifest.json at
build-time with two additional keys:
a) provideNativeLibs
b) requireNativeLibs

Bug: 138695532
Test: m (runs soong tests)
Test: find $OUT/apex -name apex_manifest.json  -exec cat {} \;
 (shows contents of apex_manifest.json files)

Change-Id: Iaad12c8c35454222ad177ce923cce76ef12a8a5a
2019-08-01 23:45:37 +09:00
Elliott Hughes
1f3a239953 Reland "Remove product_is_iot."
This reverts commit 5089c11b1e.

Change-Id: Iaedc22e63560a01ab01859982dc627569a421025
Test: treehugger
2019-08-01 14:42:12 +00:00
Nelson Li
742677d7b6 Merge "Revert "Remove product_is_iot.""
am: 604374742d

Change-Id: I85167277df48f3887d17a2670167b6aba6c5519d
2019-08-01 03:37:17 -07:00
Treehugger Robot
604374742d Merge "Revert "Remove product_is_iot."" 2019-08-01 10:16:24 +00:00
Nelson Li
5089c11b1e Revert "Remove product_is_iot."
This reverts commit 14fa562fbb.

Reason for revert: Broken build on 5772180

error: frameworks/av/media/utils/Android.bp:49:23: unrecognized property "product_variables.product_is_iot"

Bug: 138764596
Change-Id: I37944dfb974e4180a683361f514b404f92b943e5
2019-08-01 06:28:05 +00:00
Elliott Hughes
7bb10aa40d Merge "Remove product_is_iot."
am: 75b3788d6c

Change-Id: Ic639b5f1ac256be3369c6fe789bbef428aeac353
2019-07-31 22:07:05 -07:00
Treehugger Robot
75b3788d6c Merge "Remove product_is_iot." 2019-08-01 04:42:40 +00:00
Steven Moreland
e3ff85b968 Merge "Automatically inherit common properties."
am: d28f688e69

Change-Id: I2608257a595ade933d291ef5c4fb1f2c633c292b
2019-07-31 09:10:41 -07:00
Steven Moreland
d28f688e69 Merge "Automatically inherit common properties." 2019-07-31 15:47:51 +00:00