Commit Graph

44002 Commits

Author SHA1 Message Date
Treehugger Robot
4c72f68962 Merge "SdkLibraryImport's DexJarInstallPath uses installPath from source module" am: 257608f993 am: 64614bbcff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1758354

Change-Id: Ibd345e6d76706c54d5cfb0799d80f5d107332f78
2021-07-14 01:21:18 +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
cb656bb1ca Merge "Export paths for the snapshot modules" am: 5445c84f4d am: e7154ca8e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1762847

Change-Id: I878703ad9b1f6f2fb36909603023110f9e88cf3a
2021-07-14 00:36:06 +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
76da607830 Merge "Seperate asflags and cflags" am: ace3b7f0a2 am: 7e8be02166
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1764626

Change-Id: I2edbc9c29d57af80df67f5bc90bc45b29df5de77
2021-07-13 21:36:06 +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
d98fb8a30e Merge "convert flag options and values in the same line" am: 49e4187e43 am: 54fbcf2869
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751550

Change-Id: I60041cbfc9ecbf4904a01ecb699a739dd32fa915
2021-07-13 17:40:33 +00: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
af4588c7d2 Merge "Use bazel syntax for fully qualified name in path property" am: 73c7755ac9 am: 9054cd9739
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1763785

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

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

Change-Id: I9fd451246b5ab15237b0ab912bffbce1df320abc
2021-07-13 14:00:28 +00: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
ab4ba6862d [automerger skipped] Merge "make system server modules use filtered lint database" am: 49e0e81155 am: 0e689980e2 -s ours
am skip reason: Merged-In Ie8f63286aeeb4cdbec5b9320c2ba41c8e37c7345 with SHA-1 7609182dda is already in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1756510

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

Change-Id: Iee6ae2a99d36117e9099a6c926b0c0c46ec42436
2021-07-13 09:24:26 +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
502fe992f2 Merge changes Ibb6c4aed,I54af1654 am: 1c19b81e3d am: 8c19669866
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624595

Change-Id: I6afb1f88f98d8c1073bb7b8cf518e4b207e9f4a5
2021-07-13 03:11:58 +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
5145a63372 Merge "Config variables reader" am: ef13011dc2 am: 3a2ce050b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1624809

Change-Id: I3a2ed6d460c8a304d3949bf7c6c3feb3c7ebee1c
2021-07-13 02:01:15 +00: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
322af7d65a Merge "Share EffectiveLicenseFiles for snapshot modules" am: b9386b703e am: 56ff4c5c08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1751244

Change-Id: Ia7eea45d703289ad943f1e818c88e736265bfb67
2021-07-12 22:38:31 +00: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
800fbbaeef Merge "Add bpfix to remove sanitize.scudo" am: e9204db2f3 am: 6ea1e6b77b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1760828

Change-Id: I41f2090c98e10fbd50675f290095288aba41c0ad
2021-07-12 21:17:42 +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
3a3580f7f7 Merge "Support customizing behavior around sourceOrOutputDependencyTag" am: e1ef4763b4 am: 18eb25e395
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761488

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

Change-Id: I6e1fe2b84341891c2fd249acc9399a9e60dd937e
2021-07-12 18:15:00 +00: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