Commit Graph

36283 Commits

Author SHA1 Message Date
Paul Duffin f5dae016bb Merge "Add license modules to the sdk" am: 62fb7438b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699191

Change-Id: I57a406c5c5f8c01c205c36c6792e3f4764fd82f7
2021-05-12 14:43:03 +00:00
Paul Duffin 814d3fffaa Merge "Switch Effective_license_text from []string to Paths" am: fffd98fd16
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702369

Change-Id: I26fc1c416cad8025f236cc49dbd4c001f4a1862a
2021-05-12 14:42:49 +00:00
Paul Duffin d2dea2f249 Merge "Move license module processing to GenerateAndroidBuildActions" am: 12f5d04859
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699190

Change-Id: I5bccbefeb34db8d0b60432c6b978da5127e12011
2021-05-12 14:42:34 +00:00
Paul Duffin 9fbe8bb506 Merge "Add baseline test for license with sdk" am: 0d62615468
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699189

Change-Id: I41b1eb3945c340ac61cc083ea2b69c1d38182af5
2021-05-12 14:40:04 +00:00
Paul Duffin 62fb7438b1 Merge "Add license modules to the sdk" 2021-05-12 13:28:45 +00:00
Paul Duffin fffd98fd16 Merge "Switch Effective_license_text from []string to Paths" 2021-05-12 13:28:05 +00:00
Paul Duffin 12f5d04859 Merge "Move license module processing to GenerateAndroidBuildActions" 2021-05-12 13:27:15 +00:00
Paul Duffin 0d62615468 Merge "Add baseline test for license with sdk" 2021-05-12 13:27:08 +00:00
Jingwen Chen 2700ace254 bp2build: remove libc_tzcode from denylist. am: 3950cd6ed4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1704770

Change-Id: I74ab40938e180020281545059540570515fcc5a6
2021-05-12 12:40:24 +00:00
Jingwen Chen 3950cd6ed4 bp2build: remove libc_tzcode from denylist.
This now works with --features no_copts_tokenization. With tokenization,
the escaped empty string '\"\"' became an actual empty string '' on the
command line, setting -DWILDABBR to the wrong value.

However, no_copts_tokenization unveiled other problems with Android.bp
flags, such as spaces in existing cflags like
https://cs.android.com/android/platform/superproject/+/master:bionic/libc/Android.bp;l=288;drc=a0a4a6c2967b5b3c02c951ea1145f32ed5564ab9
- this trips up Bazel's copts when generated literally, so the
fix (other than splitting on space and making Soong accept strings that
don't start with dashes as cflags) is to make bp2build split cflags on
spaces before generating them as copts.

Test: bp2build, build bionic/...
Fixes: 186822591
Change-Id: Icf10bd20f6fb81db0b719ca0555fc70c75b91a79
2021-05-12 10:46:15 +00:00
Lukács T. Berki 8178b454a3 Merge "Make @soong_injection usable in standalone builds." am: b9ebb7dfd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1703387

Change-Id: Icc34e21f51e3d0801e4b38f201874b4d3c5d11c0
2021-05-12 06:48:54 +00:00
Lukács T. Berki b9ebb7dfd8 Merge "Make @soong_injection usable in standalone builds." 2021-05-12 06:26:31 +00:00
Yuntao Xu 197dc43bfd Merge "Support LOCAL_ENFORCE_USES_LIBRARIES in androidmk" am: 89733a4ce5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1703985

Change-Id: Ifa4c6ec4fc968470cda091075f47e6d2669aff6e
2021-05-11 21:53:20 +00:00
Yuntao Xu 89733a4ce5 Merge "Support LOCAL_ENFORCE_USES_LIBRARIES in androidmk" 2021-05-11 21:30:21 +00:00
Yuntao Xu c97761e781 Support LOCAL_ENFORCE_USES_LIBRARIES in androidmk
1. add LOCAL_ENFORCE_USES_LIBRARIES support in the androidmk tool;
2. add one test case.

Bug: 187838385
Test: run 'm androidmk'
Test: TreeHugger
Change-Id: Ibdde2a5a58ef45655a3083b592fa21f7fe63d032
2021-05-11 12:39:54 -07:00
Elliott Hughes 41f7037e90 Merge "Use SHT_RELR relocations where possible." am: 4dac3874f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1673945

Change-Id: I060512435c2b80ad5409d03b32c5963369a629d5
2021-05-11 18:02:51 +00:00
Elliott Hughes 4dac3874f1 Merge "Use SHT_RELR relocations where possible." 2021-05-11 17:29:39 +00:00
Jaewoong Jung 9319584fad Merge "Strict updatability linting against dependencies." am: ccbbeb6965
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702008

Change-Id: I566bd2b6f517dc8441776162e4e8c8a0ff586ee5
2021-05-11 15:51:40 +00:00
Jaewoong Jung ccbbeb6965 Merge "Strict updatability linting against dependencies." 2021-05-11 15:24:06 +00:00
Andrew Walbran 3c004705a6 Merge "Output machine-readable file with all soong keywords." am: ed00a40686
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699938

Change-Id: I7454f784af7fdd1318bff574c8dee428acee1986
2021-05-11 14:56:53 +00:00
Lukacs T. Berki 3069dd9d71 Make @soong_injection usable in standalone builds.
Test: Presubmits.
Change-Id: I942e627f9f7b7428834258ef3ccefb7f1f5c7606
2021-05-11 16:54:29 +02:00
Andrew Walbran ed00a40686 Merge "Output machine-readable file with all soong keywords." 2021-05-11 14:38:09 +00:00
Treehugger Robot 3e51be492f Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." am: a556647c50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699193

Change-Id: Idc249094fafaf46cfd0222b7ea9fb81ddb65d259
2021-05-11 13:10:43 +00:00
Treehugger Robot a556647c50 Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." 2021-05-11 12:53:23 +00:00
Andrew Walbran 75bba11bbc Output machine-readable file with all soong keywords.
Test: make, looked at output
Change-Id: Id0427e1a4f04515493c4dadb9e2856518e3a08dd
2021-05-11 11:10:25 +00:00
satayev e5cf47e902 Merge "Move conv_classpaths.proto to packages/modules/common." am: 7b6d059326
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699942

Change-Id: I79bab381e05c3454b23adf76e64d6dab68941255
2021-05-11 10:04:24 +00:00
satayev 3db3547d1f Generate empty classpaths.proto for bootclasspath_fragment.go.
- Adds all required details for bootclasspath_fragment to implement
  classpath_fragment.
- Keeps the actual boot jars in platform-bootclasspath to begin with.
- Makes sure to put the file in apex/etc/classpath on device. Note that
  for platform versions of classpath fragment AndroidMkEntries perform
  the installation, while for APEXes it must be plumbed via apex.go.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6101ebdf5b8bcbe95c0b7ce21f3f67a2685aef50
2021-05-11 10:34:47 +01:00
satayev 7b6d059326 Merge "Move conv_classpaths.proto to packages/modules/common." 2021-05-11 09:30:03 +00:00
Paul Duffin b999da770a Merge "Add support for name-less modules and property comments" am: 05f86890ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702368

Change-Id: I50389b3ff3fbe943b657da0301f18f039d1da46b
2021-05-11 07:42:11 +00:00
Paul Duffin a5b2055183 Merge "Allow an sdk member type not to provide a bp property" am: bea70fb54e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702367

Change-Id: I815de02730276bcce700240c8e86e55b25855046
2021-05-11 07:41:53 +00:00
Paul Duffin 5a0a87eb16 Merge "Allow sdk snapshot to contain source module type" am: f08e7c444c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702366

Change-Id: I1b31218defef43f8d2b6268f7424baebde15324a
2021-05-11 07:41:44 +00:00
Paul Duffin fdd9631810 Merge "Move setting of prefer to createMemberSnapshot" am: 9a59e70fe1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702365

Change-Id: I2d20e3a541af960b5875a67e6b6bc0f63a1df3ed
2021-05-11 07:39:08 +00:00
Paul Duffin b0bb376efa Add license modules to the sdk
Adds initial support for adding license modules to the sdk, along with
any referenced license text files. There is a number of minor
improvements to be made but the core of the support is there and it
works for ART sdks.

Basically, this change will automatically add license modules
referenced from any sdk member module as an internal sdk member. An
internal module has an sdk snapshot specific name that will not
conflict with the source module and which cannot be referenced from
outside the sdk snapshot.

Bug: 181569894
Test: m art-module-sdk art-module-host-exports art-module-test-exports
      - diff output before and after this change
        made sure that every prebuilt had a licenses field
        and that the license modules were added
Change-Id: I0c5ccabf58f4ef487e42ef8e61a5b2a74c0e81af
2021-05-11 08:28:49 +01:00
Paul Duffin ec0836af3a Switch Effective_license_text from []string to Paths
Effective_license_text contains paths to files that are copied from
one module to another and so need to be converted to Paths within the
context of the owning module as the paths are relative to the owning
module's directory.

The previous code did convert the license_text property to paths but
converted it back to strings again which was confusing and does not
follow the normal pattern.

Bug: 181569894
Test: m nothing
Change-Id: Iea09ee7f3de1187a2c3e41455ca83b0233d904b2
2021-05-11 08:24:59 +01:00
Paul Duffin df5a90502d Move license module processing to GenerateAndroidBuildActions
Previously, the processing of the license module was done in the
licensesPropertyFlattener method which is called for all modules before
their GenerateAndroidBuildActions method is called. This change moves
the processing into the license module's GenerateAndroidBuildActions
method which was previously empty to match the normal practice.

Bug: 181569894
Test: m nothing
Change-Id: I3736879bfa4b4d1f4e2b35770852a02d09b3db83
2021-05-11 08:24:59 +01:00
Paul Duffin e96108d797 Add baseline test for license with sdk
This change adds a test that includes license modules that are used by
modules which are part of an sdk but which does not yet copy the
license module into the snapshot. It includes the refactoring changes
needed to allow license modules to be used in an sdk test and provides
a baseline against which future changes can be compared.

Bug: 181569894
Test: m nothing
Change-Id: I60722f43cc9cc8375d97f46eb4c281e6c38987cd
2021-05-11 08:24:59 +01:00
Paul Duffin 05f86890ee Merge "Add support for name-less modules and property comments" 2021-05-11 07:19:06 +00:00
Paul Duffin bea70fb54e Merge "Allow an sdk member type not to provide a bp property" 2021-05-11 07:18:41 +00:00
Paul Duffin f08e7c444c Merge "Allow sdk snapshot to contain source module type" 2021-05-11 07:18:06 +00:00
Paul Duffin 9a59e70fe1 Merge "Move setting of prefer to createMemberSnapshot" 2021-05-11 07:17:32 +00:00
Lukács T. Berki 3baab77119 Merge "Fix typo caused by incorrect git merge." am: 9c9a069ae6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1701987

Change-Id: Ib71c6bf8c38518e0df91f1399e46a7ee681a8234
2021-05-11 06:16:36 +00:00
Lukács T. Berki 9c9a069ae6 Merge "Fix typo caused by incorrect git merge." 2021-05-11 06:01:30 +00:00
Paul Duffin 0df49686b3 Add support for name-less modules and property comments
Bug: 181569894
Test: m nothing
Change-Id: Ia4da1d2a55a924db82ae999da455adedbaca47c0
2021-05-11 01:00:12 +01:00
Paul Duffin 1308205638 Allow an sdk member type not to provide a bp property
Bug: 181569894
Test: m nothing
Change-Id: I7e98f14cb377683457fba32fd05d6c614f78ffeb
2021-05-11 01:00:06 +01:00
Paul Duffin 0d4ed0ac56 Allow sdk snapshot to contain source module type
Bug: 181569894
Test: m nothing
Change-Id: I30513dd22e2719099a1a1ef63cacc98336d02e9f
2021-05-11 00:59:56 +01:00
Colin Cross 92fddc04f0 Merge "Store real number of records in regular end record when possible" am: b00df8cc48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1700385

Change-Id: Ib7804ccc60f8c8ae4026b220d04b8ce7eb1987b6
2021-05-10 23:36:44 +00:00
Colin Cross b00df8cc48 Merge "Store real number of records in regular end record when possible" 2021-05-10 23:14:11 +00:00
Paul Duffin 83ad956ec4 Move setting of prefer to createMemberSnapshot
Test: m nothing
Change-Id: Iab1c048fe74a5e474f68ce4acc6c1b41381368ca
2021-05-11 00:05:53 +01:00
Chris Parsons 6dfc0bbe94 Handle cc_library shared/static only properties am: 0864831019
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699029

Change-Id: I19dd5929cf14b0fce173f9945b79a7964337a9b2
2021-05-10 23:00:51 +00:00
Rupert Shuttleworth 3b413d35a4 Fix typo caused by incorrect git merge.
Test: bazel build //bionic/...
Test: cd cc; go test
Test: cd bp2build; go test
Change-Id: I334e02609203f332384256e990f2c40a016fc9e5
2021-05-10 18:41:51 -04:00