Commit graph

38071 commits

Author SHA1 Message Date
Paul Duffin
07a807151e Merge "Support generating sdk snapshots that can be selected by Soong config vars" am: 4e444dab84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762229

Change-Id: I9d566d0024f619586051d59b291a91da8a518be8
2021-07-15 09:09:27 +00:00
Treehugger Robot
1bc89a7af1 Merge "dexpreopt.config should be created even though unbundled image is built" am: 75d719fdd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1730112

Change-Id: I0fd2826925ce20755218342865911fc85a6c60e1
2021-07-15 09:02:23 +00:00
Paul Duffin
4e444dab84 Merge "Support generating sdk snapshots that can be selected by Soong config vars" 2021-07-15 07:59:06 +00:00
Treehugger Robot
75d719fdd7 Merge "dexpreopt.config should be created even though unbundled image is built" 2021-07-15 03:41:30 +00:00
Jeongik Cha
4b073cd083 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I36a6e8b10b9922cc5522accaf90af1aa05049a86
2021-07-15 09:57:49 +09:00
Paul Duffin
fb9a7f99be Support generating sdk snapshots that can be selected by Soong config vars
Allows the builder of an sdk snapshot to specify a Soong config
variable that can be used to control whether the snapshot's prebuilts
are used or not.

Bug: 193523070
Test: m nothing
Change-Id: Ib09500ba61befc1202dff61dc06847c730ba9253
2021-07-14 23:19:53 +01:00
Paul Duffin
435ef09c6a Merge "Choose prebuilt or source via an Soong config variable" am: e88944c51e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762228

Change-Id: Ib88e4a9526a74204744d8ddc9110526d30a74e76
2021-07-14 20:45:41 +00:00
Paul Duffin
e88944c51e Merge "Choose prebuilt or source via an Soong config variable" 2021-07-14 20:23:34 +00:00
Paul Duffin
0c52c7ba63 Choose prebuilt or source via an Soong config variable
A simple way to provide fine grained control over the use of a prebuilt
or source module via a Soong config variable.

Bug: 193523070
Test: m nothing
Change-Id: I47ae8ac04fa29156d2e87efd9e60ab995f50ea6d
2021-07-14 20:23:06 +00:00
Treehugger Robot
91214030d3 Merge "Add ClassLoaderContextMap.Dump()" am: e04058f291
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764532

Change-Id: I8759734c99af9306df64dbbf0472b1dfdbfbb294
2021-07-14 13:11:12 +00:00
Treehugger Robot
e04058f291 Merge "Add ClassLoaderContextMap.Dump()" 2021-07-14 12:57:56 +00:00
Treehugger Robot
64614bbcff Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" am: 257608f993
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1758354

Change-Id: Icf95690ad0066fa644674151260fb9d170fae278
2021-07-14 01:04:13 +00:00
Treehugger Robot
257608f993 Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" 2021-07-14 00:47:40 +00:00
Treehugger Robot
e7154ca8e7 Merge "Export paths for the snapshot modules" am: 5445c84f4d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762847

Change-Id: I5543c2c5f9c2a23e15824a91d4bff7ae35b465a2
2021-07-14 00:23:19 +00:00
Treehugger Robot
5445c84f4d Merge "Export paths for the snapshot modules" 2021-07-14 00:08:12 +00:00
Christopher Parsons
7e8be02166 Merge "Seperate asflags and cflags" am: ace3b7f0a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764626

Change-Id: I633ff94b7155be285175f5b1d380f74ff0255644
2021-07-13 21:20:35 +00:00
Christopher Parsons
ace3b7f0a2 Merge "Seperate asflags and cflags" 2021-07-13 21:03:27 +00:00
Chris Parsons
69fa9f9e5e Seperate asflags and cflags
This fixes a bug which was a misunderstanding of soong properties:
Soong's cflags pertain only to C and C++ language, whereas bazel's copts
pertain to all three languages. This change ensures that asflags are
added as specifically asflags, and the 'copts' for the static library
macro pertains only to C and C++ languages.

This requires a somewhat hacky workaround for asflags, however: Since
assembly sources also need includepath-related flags, this duplicates
these flags between copts and asflags. To reduce verbosity of
bp2build-generated targets, this also ensures that asflags are omitted
in cases where there are no assembly sources.

Test: Mixed build droid CI
Change-Id: Ic0babed1f90d6dc82e5788638681ce5b995043f8
2021-07-13 14:06:14 -04:00
Yuntao Xu
54fbcf2869 Merge "convert flag options and values in the same line" am: 49e4187e43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751550

Change-Id: If1ad5e6e940d85afcf22c53a08ff6598e0a50982
2021-07-13 17:27:14 +00:00
Yuntao Xu
49e4187e43 Merge "convert flag options and values in the same line" 2021-07-13 17:11:00 +00:00
Paul Duffin
b1b4d856e1 Add ClassLoaderContextMap.Dump()
Test: n/a
Change-Id: I1e1ad0093301a463d8d03b07cf58710b65e3dc6d
2021-07-13 17:03:50 +01:00
Jeongik Cha
d5fe8782e0 SdkLibraryImport's DexJarInstallPath uses installPath from source module
Even though actual installed module path is the same as source module,
it uses impl's one.

Bug: 188179858
Bug: 193082464
Test: compare dexpreopt_config.zip files from
  1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
  2. m dexpreopt_config_zip
  (note that m clean should run between steps)
Test: build aosp_cf_x86_64_phone,  launch_cvd, and then
  adb wait-for-device \
      && adb root \
      && adb logcat \
      | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
      and then check if there is no message.

Change-Id: I34ffd9a2d214a6614c2befc35b2beec003cfcd25
2021-07-13 13:54:03 +00:00
Paul Duffin
9054cd9739 Merge "Use bazel syntax for fully qualified name in path property" am: 73c7755ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1763785

Change-Id: I4b928adda33ae23c93d434d238b81fc6fc9b999e
2021-07-13 13:43:32 +00:00
Paul Duffin
47eec54245 Merge "Stop PathForModuleSrc from validating the paths unnecessarily" am: ccabbfd941
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761490

Change-Id: Id9ab3a565e86ac3ee8e27e4b70fb38b9cbba5161
2021-07-13 13:43:27 +00:00
Paul Duffin
359ab61b5a Merge "Add test to show broken behavior of fully qualified name in path property" am: fc78e2aad9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761489

Change-Id: I677d7cf336ca5625d4d4dd294a189d9155378246
2021-07-13 13:43:21 +00:00
Paul Duffin
73c7755ac9 Merge "Use bazel syntax for fully qualified name in path property" 2021-07-13 13:31:04 +00:00
Paul Duffin
ccabbfd941 Merge "Stop PathForModuleSrc from validating the paths unnecessarily" 2021-07-13 13:30:55 +00:00
Paul Duffin
fc78e2aad9 Merge "Add test to show broken behavior of fully qualified name in path property" 2021-07-13 13:30:44 +00:00
Pedro Loureiro
0e689980e2 Merge "make system server modules use filtered lint database" am: 49e0e81155
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1756510

Change-Id: I057f0fba2989eb08cd701b34f015c983111d9f44
2021-07-13 09:12:26 +00:00
Treehugger Robot
4ba5a02a4d Merge changes from topic "vendor_snapshot-192647618" am: da70df7277
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1755250

Change-Id: I1d13f3729a3815d6e97ca40186600b43bbc6f4a2
2021-07-13 09:11:41 +00:00
Pedro Loureiro
49e0e81155 Merge "make system server modules use filtered lint database" 2021-07-13 08:55:13 +00:00
Treehugger Robot
da70df7277 Merge changes from topic "vendor_snapshot-192647618"
* changes:
  cc/cc.go: Harden GetSnapshot() against nil pointer panic
  cc/cc.go: Add Device() method to LinkableInterface
2021-07-13 08:54:11 +00:00
Treehugger Robot
8c19669866 Merge changes Ibb6c4aed,I54af1654 am: 1c19b81e3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624595

Change-Id: If8216a7e828077e32b4e5d2d39c59e4c50777bc1
2021-07-13 02:58:38 +00:00
Treehugger Robot
1c19b81e3d Merge changes Ibb6c4aed,I54af1654
* changes:
  AndroidProducts.mk file reader
  Soong variables reader
2021-07-13 02:44:58 +00:00
Justin Yun
d9e05750ba Export paths for the snapshot modules
Some makefiles require the paths to the snapshot to use the snapshot
resources. Export SOONG_{IMAGE}_{VERSION}_SNAPSHOT_DIR to make.

Bug: 187222756
Test: check ninja depedency with and without snasphots.
Change-Id: Ie817285d43db094335e4c81ebb6eca7007c5f37d
2021-07-13 11:36:24 +09:00
Alexander Smundak
3a2ce050b2 Merge "Config variables reader" am: ef13011dc2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624809

Change-Id: I555dd1690984e9896ec0b00ed52ea646635b6f73
2021-07-13 01:47:26 +00:00
Alexander Smundak
ef13011dc2 Merge "Config variables reader" 2021-07-13 01:31:31 +00:00
Yuntao Xu
cc8287c494 convert flag options and values in the same line
1. Added the logic in the `androidmk` tool, to convert the flag options and their
corresponding values in the same line;
2. The flags for cc-type modules include asflags, cflags, clang_asflags, clang_cflags,
conlyflags, cppflags, ldflags, and tidy_flags;
3. The flags for java-type modules include apptflags, dxflags,
javacflags, and kotlincflags;
4. Two unit tests were added.

Bug: 192401704
Test: m androidmk
Test: TreeHugger
Change-Id: I2973ad49812e891079cd488e993f2d12c4da3797
2021-07-12 16:10:44 -07:00
Treehugger Robot
56ff4c5c08 Merge "Share EffectiveLicenseFiles for snapshot modules" am: b9386b703e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751244

Change-Id: I87791ed0e59bca282a3327599403682fa1dd75ed
2021-07-12 22:25:31 +00:00
Treehugger Robot
b9386b703e Merge "Share EffectiveLicenseFiles for snapshot modules" 2021-07-12 22:06:59 +00:00
Liz Kammer
6ea1e6b77b Merge "Add bpfix to remove sanitize.scudo" am: e9204db2f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1760828

Change-Id: I40a14c2f23f23df8795be0722fb4ed9d3c0ce7fb
2021-07-12 21:03:23 +00:00
Liz Kammer
e9204db2f3 Merge "Add bpfix to remove sanitize.scudo" 2021-07-12 20:49:02 +00:00
Liz Kammer
fbf51b67c9 Add bpfix to remove sanitize.scudo
scudo is not supported for Android 11+, sanitize.scudo is deprecated,
when running bpfix, remove it.

Test: go test bpfix tests
Change-Id: Ibb58bb302df3bad24cfce3ae98c65015c090853c
2021-07-12 15:28:21 -04:00
Paul Duffin
e6ba0723b1 Use bazel syntax for fully qualified name in path property
A module reference to a fully qualified module in a path property looks
like:
  //path:module
And with a tag:
  //path:module{tag}

At the moment the checking is quite lax but some follow up changes will
make it much stricter.

Bug: 193228441
Test: m nothing
Change-Id: Ie42edcfa33ec66fda5d75b3df1da73f56f147afd
2021-07-12 20:15:06 +01:00
Paul Duffin
407501b82c Stop PathForModuleSrc from validating the paths unnecessarily
PathForModuleSrc calls validatePath in order to convert the supplied
path components into a single path. Unfortunately, that corrupts a
fully qualified module name. So, when given "//namespace:module" it
treats it as a path and replaces "//" with "/". That replacement is
done by a call to filepath.Join().

This change simply concatenates the path components together textually,
using the path separator, to avoid the corruption. That ensures that
a fully qualified module name is preserved and processed properly. If
the path components do not contain a module name then expandOneSrcPath
will call pathForModuleSrc which validates the path so it does not open
up a way to create an invalid path as the validation was unnecessary
anyway.

Bug: 193228441
Test: m nothing
Change-Id: I0bb66feac182b77ce96c8d5d5f17e28ea28d75ba
2021-07-12 20:15:06 +01:00
Paul Duffin
ec0bd8cd9f Add test to show broken behavior of fully qualified name in path property
It reveals a number of issues:
* PathForModuleSrc corrupts the name during validation of path
  components.
* SrcIsModule and SrcIsModuleWithTag do not handle fully qualified names
  properly or detect invalid unqualified names.
* getPathsFromModuleDep does not handle fully qualified names.

Bug: 193228441
Test: m nothing
Change-Id: I583bc5e7f7df8a1b9cc32acefac3dbe43f49a27a
2021-07-12 19:05:39 +01:00
Paul Duffin
18eb25e395 Merge "Support customizing behavior around sourceOrOutputDependencyTag" am: e1ef4763b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761488

Change-Id: Id2dcde50cbadf6b0401c49d54583f14d2ef41cb1
2021-07-12 17:56:18 +00:00
Paul Duffin
ea7b6c1184 Merge "Extract preparer for namespace" am: bea17eff14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761487

Change-Id: Ie12de5c23280c133a4460fc5c814f04d91ac96f8
2021-07-12 17:56:12 +00:00
Paul Duffin
e1ef4763b4 Merge "Support customizing behavior around sourceOrOutputDependencyTag" 2021-07-12 17:45:01 +00:00
Paul Duffin
bea17eff14 Merge "Extract preparer for namespace" 2021-07-12 17:44:48 +00:00