Commit Graph

22013 Commits

Author SHA1 Message Date
Jiyong Park cabc299091 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" am: 18bbde1615 am: a3c8a7d511
Change-Id: I7942cf827040f1683ffda90e1483e383ab33057a
2020-05-08 08:43:53 +00:00
Jiyong Park a3c8a7d511 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" am: 18bbde1615
Change-Id: I6cd7ae09581273a917c31263403d8a19fc7ba735
2020-05-08 08:22:46 +00:00
Jiyong Park 18bbde1615 Merge "Revert "Prevent statically linking to a lib providing stable C APIs"" 2020-05-08 08:11:24 +00:00
Jiyong Park 5b75774004 Revert "Prevent statically linking to a lib providing stable C APIs"
This reverts commit 45b90e79c9.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Change-Id: I0df395eaa4cd856ab466925031b21aa4adc3af08
Test: m on full-eng
2020-05-08 07:55:47 +00:00
Paul Duffin 8a82cc2f22 [automerger skipped] Merge changes Ic6f90eb4,I5c5b8436,If673d482,I98b575b8 into rvc-dev am: 40cd500f07 -s ours
am skip reason: Change-Id Ic6f90eb4449338e549878f64e8119e286b9aa549 with SHA-1 f022920bde is in history

Change-Id: Icd8d6920fcf3ada889d294c75228fb978c86a1ea
2020-05-08 06:55:13 +00:00
Paul Duffin 40cd500f07 Merge changes Ic6f90eb4,I5c5b8436,If673d482,I98b575b8 into rvc-dev
* changes:
  Switch java_sdk_library to use SetDefaultableHook()
  Allow extractCommonProperties to return an error
  Remove reference to obsolete BuildSnapshot()
  Correct order of parameters to AssertDeepEquals
2020-05-08 06:46:19 +00:00
Jiyong Park e074cc3f52 Merge changes from topic "no_staticlinking_to_stubs" am: 06938a0a16 am: 36a0125014
Change-Id: I5c20e745bec1f57ba6bc2c1f08a7c942d98bcf75
2020-05-08 02:48:34 +00:00
Jiyong Park 18d4b2b708 Add GetPathString am: 1c7e962957 am: abf09b50e4
Change-Id: I079dd1d4394b494c225c054d46c5a5eb7fc4f113
2020-05-08 02:48:28 +00:00
Jiyong Park 36a0125014 Merge changes from topic "no_staticlinking_to_stubs" am: 06938a0a16
Change-Id: Iaa76d24dc4d1867c2daa25130ad4c607cceb036a
2020-05-08 02:35:14 +00:00
Jiyong Park abf09b50e4 Add GetPathString am: 1c7e962957
Change-Id: Iada405f160d8178ec90a1634f22a50cb18215938
2020-05-08 02:35:11 +00:00
Jiyong Park 06938a0a16 Merge changes from topic "no_staticlinking_to_stubs"
* changes:
  Prevent statically linking to a lib providing stable C APIs
  Add GetPathString
2020-05-08 02:12:58 +00:00
Colin Cross 3f23e19bf4 [automerger skipped] Skip dexpreopting android_test_import modules am: f30c453df1 -s ours
am skip reason: Change-Id I7baa5405d03df03920b01616b030ba77f882a77e with SHA-1 c80828d567 is in history

Change-Id: I1fb2989cf593ef17cf5fbdc5527a1cea5fb3036d
2020-05-08 01:13:55 +00:00
Paul Duffin 7bca3ddc0e Merge changes I167b47a1,I7ebd3330,Ifc8116e1 am: af6fbcbcca am: 4b99ceccd6
Change-Id: Id1001db2b0f09868529b3f7b87ddd3e822c14d49
2020-05-07 22:21:06 +00:00
Paul Duffin 4b99ceccd6 Merge changes I167b47a1,I7ebd3330,Ifc8116e1 am: af6fbcbcca
Change-Id: I880559ccaa54c4d4e32e0389148c0c1e864aeb4f
2020-05-07 22:09:03 +00:00
Paul Duffin 2aaef53b6d Switch java_sdk_library to use SetDefaultableHook()
Previously, java_sdk_library used AddLoadHook() to register a hook that
when called would create its child modules. That meant the
java_sdk_library properties that were used to create the child modules,
e.g. sdk_version could not be defaulted because the modules are created
before the defaults are applied.

This change switches java_sdk_library to use the new
SetDefaultableHook() mechanism to register the hook instead of the
AddLoadHook() mechanism.

It also prevents the child modules from being created if the module has
been disabled.

Bug: 155295806
Test: m checkapi
Merged-In: Ic6f90eb4449338e549878f64e8119e286b9aa549
Change-Id: Ic6f90eb4449338e549878f64e8119e286b9aa549
(cherry picked from commit f022920bde)
2020-05-07 23:06:13 +01:00
Treehugger Robot fda00d6f1c Merge "Skip dexpreopting android_test_import modules" am: cf23ab4cd8 am: a7f446af4a
Change-Id: I991362bb18254731726b1c6d533ae3ace7b6190c
2020-05-07 22:02:32 +00:00
Paul Duffin 1c58f5795a Allow extractCommonProperties to return an error
Refactoring in preparation for follow up changes.

Also:
* Adds a new AssertErrorMessageEquals() helper method.
* Improved error reporting in the accessor and added name to
  extractorProperty to ensure meaningful errors are reported.
* Added String() string method to propertiesContainer.
* Reports errors using the field name as the errors are not really
  fixable by developers and it is more meaningful to the build team.

Bug: 155628860
Test: m nothing
Merged-In: I5c5b8436bcbc39e4e7cd35df2577b2dac53e702a
Change-Id: I5c5b8436bcbc39e4e7cd35df2577b2dac53e702a
(cherry picked from commit 4b8b79394f)
2020-05-07 23:00:04 +01:00
Paul Duffin d7acc7b73e Remove reference to obsolete BuildSnapshot()
Bug: 155628860
Test: m nothing
Merged-In: If673d482e8318b5fbb86780236123b0bd59eb5d3
Change-Id: If673d482e8318b5fbb86780236123b0bd59eb5d3
(cherry picked from commit 425b0eacaa)
2020-05-07 22:59:55 +01:00
Paul Duffin 9ec2a79ab2 Correct order of parameters to AssertDeepEquals
The expected/actual were around the wrong way.

Bug: 155628860
Test: m nothing
Merged-In: I98b575b8b85dcbfd2075e77689f0329aa2eadbf0
Change-Id: I98b575b8b85dcbfd2075e77689f0329aa2eadbf0
(cherry picked from commit 1d6c0df597)
2020-05-07 22:59:44 +01:00
Paul Duffin af6fbcbcca Merge changes I167b47a1,I7ebd3330,Ifc8116e1
* changes:
  Fix snapshot of a host/device cc_library with stubs
  Adds support for 'ignored-on-host'
  Detect invalid arch specific properties in snapshot
2020-05-07 21:58:14 +00:00
Treehugger Robot a7f446af4a Merge "Skip dexpreopting android_test_import modules" am: cf23ab4cd8
Change-Id: Ic9ec152d8c1a28dc9553323ae81058c90c062a3b
2020-05-07 21:48:08 +00:00
Treehugger Robot cf23ab4cd8 Merge "Skip dexpreopting android_test_import modules" 2020-05-07 21:37:37 +00:00
Treehugger Robot 28481f7090 Merge "Switch java_sdk_library to use SetDefaultableHook()" am: 3d60daadbc am: 7cd5ce4e59
Change-Id: Ic0e577d97cd23ac9f0aba26653953ef4540d8938
2020-05-07 20:55:44 +00:00
Treehugger Robot 7cd5ce4e59 Merge "Switch java_sdk_library to use SetDefaultableHook()" am: 3d60daadbc
Change-Id: Id0447311a043f0e46930ab1dfbb300979e109199
2020-05-07 20:48:27 +00:00
Treehugger Robot 3d60daadbc Merge "Switch java_sdk_library to use SetDefaultableHook()" 2020-05-07 20:39:05 +00:00
Colin Cross f30c453df1 Skip dexpreopting android_test_import modules
android_test_import modules should be labelled as tests so they are
not dexpreopted.

Bug: 155778135
Test: m CtsCorruptApkTests_Compressed_Q
Change-Id: I7baa5405d03df03920b01616b030ba77f882a77e
Merged-In: I7baa5405d03df03920b01616b030ba77f882a77e
2020-05-07 12:40:27 -07:00
Colin Cross c80828d567 Skip dexpreopting android_test_import modules
android_test_import modules should be labelled as tests so they are
not dexpreopted.

Bug: 155778135
Test: m CtsCorruptApkTests_Compressed_Q
Change-Id: I7baa5405d03df03920b01616b030ba77f882a77e
2020-05-07 12:06:14 -07:00
Colin Cross 2bd5aba821 [automerger skipped] Merge "Add jni_uses_sdk_apis" am: 7500f46b95 am: 5ac0b15211 -s ours
am skip reason: Change-Id I841fb761ec1c1ab8596aac44e01eb7eb91428006 with SHA-1 76583a443e is in history

Change-Id: I04f345bf068bf61d418c6626054527a395978f7f
2020-05-07 18:41:54 +00:00
Ivan Lozano 7c3358dd60 Merge "Add gcov coverage support to Rust modules." am: 6c4e5c05c3 am: acdf2ac701
Change-Id: Id236afb83e583a93020803302a61dbf46904c295
2020-05-07 18:41:29 +00:00
Colin Cross 5ac0b15211 Merge "Add jni_uses_sdk_apis" am: 7500f46b95
Change-Id: I985d088f671e41ae4a216b8cee0af3800aa92606
2020-05-07 18:13:29 +00:00
Colin Cross 7500f46b95 Merge "Add jni_uses_sdk_apis" 2020-05-07 18:09:47 +00:00
Colin Cross 7204cf0e6a Add jni_uses_sdk_apis
NetworkStackTests is using platform APIs for its Java code, but needs
to use portable JNI libraries.  Add a jni_uses_sdk_apis so that it
can select the SDK variants of JNI libraries even though it doesn't
set sdk_version.

(clean cherry-pick from internal branch)
Bug: 154665579
Test: atest NetworkStackTests
Merged-In: I841fb761ec1c1ab8596aac44e01eb7eb91428006
Change-Id: I841fb761ec1c1ab8596aac44e01eb7eb91428006
2020-05-07 18:09:06 +00:00
Ivan Lozano acdf2ac701 Merge "Add gcov coverage support to Rust modules." am: 6c4e5c05c3
Change-Id: I9f998821818e30e427696cdbcb3121722a2c8f56
2020-05-07 18:07:50 +00:00
Ivan Lozano 6c4e5c05c3 Merge "Add gcov coverage support to Rust modules." 2020-05-07 17:56:43 +00:00
Paul Duffin 2af52380be Fix snapshot of a host/device cc_library with stubs
Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.

Bug: 155628860
Test: m nothing
Change-Id: I167b47a1374f541aa09d7e045972d740f1d9009c
2020-05-07 18:35:11 +01:00
Paul Duffin 12f67bcf42 Adds support for 'ignored-on-host'
Adds a filter mechanism that can exclude property values from being
included in the common value extraction. That is needed to prevent the
snapshot mechanism from generating invalid output for properties that
are ignored on host (and have their values cleared) and which are not
tagged with `android:"arch_variant"`.

Changes:
* Updates the documentation of SdkMemberType to explain what effect
  the 'ignored-on-host' tag has.
* Adds some tests for this new mechanism.

Bug: 155628860
Test: m nothing
Change-Id: I7ebd333079619dba546bc8c4911d567e0287b676
2020-05-07 18:35:11 +01:00
Paul Duffin ee20962378 Detect invalid arch specific properties in snapshot
Previously, the snapshot code did not know whether a specific property
could be arch specific or not and assumed that they all were which
meant that it could generate snapshots containing arch specific values
for properties that are not arch specific and so would fail when
unpacked.

This change requires arch specific fields in SdkMemberProperties to be
tagged as such using `android:"arch_variant"` (just as in module input
property structures). Any property without that must have properties
that are common across all variants.

Bug: 155628860
Test: m nothing
Change-Id: Ifc8116e11d987cfe7aec2eeaa964f3bbf36b5dc2
2020-05-07 18:35:11 +01:00
Automerger Merge Worker 8d9281cef3 Merge "Merge "Add jni_uses_sdk_apis" into rvc-dev am: 2572225993" into rvc-dev-plus-aosp 2020-05-07 16:42:59 +00:00
Colin Cross 02250e9b4e Merge "Add jni_uses_sdk_apis" into rvc-dev am: 2572225993
Change-Id: I389ecb02c7e7041ff49623f37a9153b7134c7840
2020-05-07 16:42:53 +00:00
Paul Duffin 1a4b92d6d1 Merge "Allow extractCommonProperties to return an error" am: bd7e3295dd am: 01d23134f2
Change-Id: I84ee3b7c6de0ac691dfee69a46ab948cedb0062e
2020-05-07 16:42:50 +00:00
Paul Duffin 01d23134f2 Merge "Allow extractCommonProperties to return an error" am: bd7e3295dd
Change-Id: Iab5fbb31db1ce9bdb7d4a4558e051f2b6df7d830
2020-05-07 16:28:41 +00:00
Colin Cross 2572225993 Merge "Add jni_uses_sdk_apis" into rvc-dev 2020-05-07 16:21:51 +00:00
Paul Duffin bd7e3295dd Merge "Allow extractCommonProperties to return an error" 2020-05-07 16:17:42 +00:00
Paul Duffin 6b0635adf1 Merge changes If673d482,I98b575b8 am: 38e2fbdc90 am: 6b178d6f7b
Change-Id: I19d639148a482fc950bd9f877359164822047128
2020-05-07 16:15:10 +00:00
Paul Duffin 6b178d6f7b Merge changes If673d482,I98b575b8 am: 38e2fbdc90
Change-Id: I0c0d1d5da191d6684f1fc40c57eeb224d8f2588e
2020-05-07 16:00:37 +00:00
Paul Duffin 38e2fbdc90 Merge changes If673d482,I98b575b8
* changes:
  Remove reference to obsolete BuildSnapshot()
  Correct order of parameters to AssertDeepEquals
2020-05-07 15:50:06 +00:00
Jaewoong Jung fe576ad672 [automerger skipped] Merge "Make android_app_import multi targets arch module." into rvc-dev am: 4d480bcd0f -s ours
am skip reason: Change-Id I5bbb2d2b733bbd6b868898285683ba5ff45be10b with SHA-1 243688ea1b is in history

Change-Id: I840c08b59f1cfabfe823f6814273abe7e7aa16f3
2020-05-07 15:32:11 +00:00
Jaewoong Jung 4d480bcd0f Merge "Make android_app_import multi targets arch module." into rvc-dev 2020-05-07 15:19:49 +00:00
Treehugger Robot 5dd4e5ecb7 Merge "Remove implicit Bionic and kernel system includes." am: 4779327cf8 am: 6bc155429e
Change-Id: I6d848f25cd90abd31afa9816afd4174d07091304
2020-05-07 13:52:09 +00:00
Treehugger Robot 6bc155429e Merge "Remove implicit Bionic and kernel system includes." am: 4779327cf8
Change-Id: I72a5de7f105d062ca98c3d2d64d62aad2fcbdbb1
2020-05-07 13:44:33 +00:00