Commit Graph

8199 Commits

Author SHA1 Message Date
TreeHugger Robot
a91b77734b Merge "[IRadioConfig] Add to VNDK variant list" into stage-aosp-master 2021-09-21 17:23:20 +00:00
Christopher Parsons
23f8870b24 Merge "bp2build: reference static variants directly" am: ce0944fc96 am: 5a5ceb553e am: f360605c22 am: d40b09d548 am: 149ee3eedd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832014

Change-Id: I18039b6742190b2c14e6041ef64eaef204b714d1
2021-09-21 16:47:15 +00:00
Christopher Parsons
5a5ceb553e Merge "bp2build: reference static variants directly" am: ce0944fc96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832014

Change-Id: I6314b59c55d7dcc65444d44f631d39ff566c49d9
2021-09-21 15:32:04 +00:00
Christopher Parsons
ce0944fc96 Merge "bp2build: reference static variants directly" 2021-09-21 15:13:43 +00:00
Serik Beketayev
af68148d19 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
Merged-In: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-21 04:52:44 +00:00
Treehugger Robot
c62d726b7a Merge "Add tidy_disabled_srcs property." am: 1b15345ac9 am: c41aa75dec am: fd5ff6bbaa am: 52ceac3781 am: e376817006
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831865

Change-Id: Ia41355bab4df01aa5831f91b51111a36b694c43c
2021-09-21 04:52:32 +00:00
Treehugger Robot
c41aa75dec Merge "Add tidy_disabled_srcs property." am: 1b15345ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831865

Change-Id: I430b1fcd21e417e1ca0382228229188e1b47c718
2021-09-21 03:58:15 +00:00
Chih-Hung Hsieh
769a51cc6a Add tidy_disabled_srcs property.
Used as a supplement to C/C++ srcs to disable
clang-tidy for selected srcs, when a library
contains many files in srcs and only some of them
are too large to compile with clang-tidy.

Test: WITH_TIDY=1 TIDY_TIMEOUT=90 make tidy-soong
Bug: 198098397
Change-Id: Ib32eb0e46ddbc717999797717bfd8c57e182ee88
2021-09-20 18:17:59 -07:00
Serik Beketayev
319c773900 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
Merged-In: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-20 17:32:30 -07:00
Serik Beketayev
48e0e33916 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-20 16:59:40 -07:00
Chris Parsons
953b35623a bp2build: reference static variants directly
Previously, when referencing a cc_library as a static_lib from a
converted module, the corresponding target would depend on the "root
target" of that cc_library. This resulted in a superfluous dependency on
the shared target of the cc_library dependency. This superfluous
dependency could sometimes result in cycles.

This change ensures the static target name is directly specified in such
cases.

Test: mixed_libc.sh CI
Test: USE_BAZEL_ANALYSIS=1 m fmtlib
Change-Id: I36ee9f0a9017b1e9d73df9e3174669107f0afd4f
2021-09-20 15:15:29 -04:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
e749426372 Merge changes from topic "mixed-build-cc-library-shared" am: 4aeaf37bb7 am: 5cc296f072 am: 9aa94951a3 am: 35082de347 am: e01f99df5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826914

Change-Id: Ie3a9c80706002970c81ba8ea2c060a14e22f2961
2021-09-17 15:44:18 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
53ee214f0f Incorporate cc_library_shared into mixed builds am: bc4e734e59 am: 5ce0135bd8 am: f4718aefa7 am: 406877788f am: d24ad41ba7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826912

Change-Id: I9c80a888de4a78f100a64fbb437d111011e93cb6
2021-09-17 15:44:14 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
5cc296f072 Merge changes from topic "mixed-build-cc-library-shared" am: 4aeaf37bb7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826914

Change-Id: If277cd41ec3244e25aec1cedb3890f7fbc058eca
2021-09-17 14:39:12 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
5ce0135bd8 Incorporate cc_library_shared into mixed builds am: bc4e734e59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826912

Change-Id: If309ce2532d679e4af9d5cfe5b4c383afa2116e2
2021-09-17 14:39:06 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
4aeaf37bb7 Merge changes from topic "mixed-build-cc-library-shared"
* changes:
  Expose TocFile via CcInfo
  Clean up StarlarkFunctionBody for getCcInfoType
  Incorporate cc_library_shared into mixed builds
2021-09-17 14:29:17 +00:00
Chih-hung Hsieh
a7f9b5226d Merge "Use ccCmd to generate clang-tidy dependent file" am: 935ae2c51d am: d19ed27801 am: f1dd6e7da1 am: f7a91b8167 am: ae60a43fdc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824476

Change-Id: I6cfa17619365ec3e6e99e15350b49a8a6295925f
2021-09-17 03:05:42 +00:00
Chih-hung Hsieh
d19ed27801 Merge "Use ccCmd to generate clang-tidy dependent file" am: 935ae2c51d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824476

Change-Id: I303aab3d1318b9d94c76a362d07ec446fa65cdb0
2021-09-17 02:08:33 +00:00
Chih-hung Hsieh
935ae2c51d Merge "Use ccCmd to generate clang-tidy dependent file" 2021-09-17 01:59:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
62585e8436 Expose TocFile via CcInfo
To reflect what's provided in SharedLibraryInfoProvider

Move the logic for identifying the toc file into Starlark
instead of the Soong Go code.

Adapt TestGetCcInfoParseResults to expect the toc as well.

Test: build/bazel/cquery/request_type_test.go:TestGetCcInfoParseResults
Test: cc/library_test.go:TestCcLibrarySharedWithBazel
Test: build/bazel/ci/mixed_{libc,droid}.sh
Change-Id: I40ad47158cb98b14ca03c21e351988818cb01770
2021-09-16 20:55:10 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
b823020581 Create bp2build converter for cc_shared_library am: ac5097fcf4 am: d4e77a6137 am: f6c59c9c47 am: ee327d21ae am: dbd0670a65
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1816758

Change-Id: Iff31370bbc6954b2952e1c2118111264560033ef
2021-09-16 19:38:33 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
e6e7d94841 Remove Linkstatic field for static cases am: a5474e36c5 am: fff8c0a6a8 am: dbf87e3862 am: 2e0ea0636f am: 997cf74368
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826512

Change-Id: I7b214be5c1a11e6df6cf20b12a742bdfbb417222
2021-09-16 19:38:30 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
d4e77a6137 Create bp2build converter for cc_shared_library am: ac5097fcf4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1816758

Change-Id: Iad57cc75670f0e747c162758c029179ae93af3e4
2021-09-16 18:20:48 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
fff8c0a6a8 Remove Linkstatic field for static cases am: a5474e36c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826512

Change-Id: I70f97cd652598dcd520c5224f71568876338aeb4
2021-09-16 18:20:45 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
bc4e734e59 Incorporate cc_library_shared into mixed builds
The infrastructure is already there via its need in
`cc_library`. Therefore, just enable it by setting
the `bazelHandler` in `LibrarySharedFactory`, and
add a test to verify the functionality.

Bug: 198817980
Test: cc/library_test.go:TestCcLibrarySharedWithBazel
Change-Id: Ibff80616632af59a0e409110f8645e028f99c7d6
2021-09-16 18:13:52 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
ac5097fcf4 Create bp2build converter for cc_shared_library
Factor out shareable code with cc_static_library

Remove `Linkstatic` field for shared cases,
because it's redundant with the rule

Bug: 198241907
Test: cc_library_shared_conversion_test.go
Test: mixed_{libc,droid}.sh
Change-Id: I5be3b66f812893bce41edb425fbd143ab22d9051
2021-09-16 15:00:56 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
a5474e36c5 Remove Linkstatic field for static cases
With the explicit implementation of cc_library_shared,
this is now redundant for both, so remove it.

Test: cc_library_static_conversion_test.go
Test: mixed_{libc,droid}.sh
Change-Id: I6e7733ca08c254562e95e70d93c9f519719d8a18
2021-09-16 15:00:47 +00:00
Treehugger Robot
e4690a5064 Merge "Share cFlags, tidyFlags, etc. in a module" am: b1a12462a9 am: 6e5aabb91b am: 535abf1d28 am: 6aeeba8976 am: 966a8bf5db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824024

Change-Id: Ic65c6f02aefe7bc718121490a9afa0a63dda0a94
2021-09-16 03:31:19 +00:00
Treehugger Robot
6e5aabb91b Merge "Share cFlags, tidyFlags, etc. in a module" am: b1a12462a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824024

Change-Id: Iaf6050178f9d172a5a17103504e8f081277df9cf
2021-09-16 02:35:38 +00:00
Chih-Hung Hsieh
8e09f2627d Use ccCmd to generate clang-tidy dependent file
* After this change, make libtinyxml2-tidy should generate
  correct out/.../libtinyxml2.tidy.d file.
  Touching one of the dependent files, e.g., tinyxml2.h,
  should invoke clang-tidy but not to recompile tinyxml2.o.
* Note that linking libraries still depend on .tidy targets,
  so make libtinyxml2 will call clang-tidy, regnerate
  tinyxml2.tidy.d, tinyxml2.tidy, tinyxml2.o.d, tinyxml2.o.
* A clang-tidy rule uses the same $cFlags for both clang and clang-tidy.
  To share it and avoid over long command lines, we use modern shell
  array variables and cannot use old bourne shell.

Bug: 199169329
Test: WITH_TIDY=1 make
Test: WITH_TIDY=1 make libtinyxml2-tidy | grep tinyxml2
Test: touch external/tinyxml2/tinyxml2.h; make libtinyxml2-tidy | grep tinyxml2
Change-Id: I6175add58d7313ee50c9308b78c9290a60770052
2021-09-16 02:25:52 +00:00
Treehugger Robot
b1a12462a9 Merge "Share cFlags, tidyFlags, etc. in a module" 2021-09-16 02:20:25 +00:00
Paul Duffin
06744426d2 Rename nativeLibInfoProperties.archType to archSubDir am: 96f1832762 am: 9f266a87a8 am: 5554ca9d07 am: 1fc4adead6 am: 17df741a42
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826227

Change-Id: I40f11de2fdb47e5893cfe27446b428a4e968b06b
2021-09-16 01:08:12 +00:00
Paul Duffin
9f266a87a8 Rename nativeLibInfoProperties.archType to archSubDir am: 96f1832762
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826227

Change-Id: If868e6df94bbb3d25d2a6a30dc0bb34ef9773c88
2021-09-16 00:09:24 +00:00
Chih-Hung Hsieh
b8082295b6 Share cFlags, tidyFlags, etc. in a module
* In builder.go, share common flags in a module.
  * This replaces the sharing of cflags/cppflags/asflags in cc.go.
  * A unit test in apex_test.go now fails and is commented out.
    It is a failing test hidden by old optimization in cc.go.
* In module.go, expand the reference variable $someflags<n>,
  or ${someflags<n>} to keep many existing unit tests work as is.
* The build.ninja size was reduced from 8.1GB to 6.2GB,
  for aosp_arm64-eng WITH_TIDY=1 USE_RBE=true,
  and from 7.5GB to 5.6GB when USE_RBE is 0.
  Content of build.ninja is also more readable and searchable.
  Read/write build.ninja times are also reduced,
  depending on disk I/O speed.

Test: make WITH_TIDY=1
Change-Id: I17f96adf4844136d52e5d40f57a19d9e290162b7
2021-09-15 16:05:41 -07:00
Paul Duffin
96f1832762 Rename nativeLibInfoProperties.archType to archSubDir
Previously, the archType field was a string not an android.ArchType and
was used as the subdirectory into which arch specific files were
copied. This renames the field to archSubDir and clarifies the usage.

Bug: 195754365
Test: m nothing
Change-Id: Id4d6de12b40ee21e41bcd8b96a0ff04eaf615a80
2021-09-15 17:59:14 +01:00
Guang Zhu
b3d89ccb41 Merge "update build rules to use /data/local/tests/unrestricted" am: 7b32612dc4 am: da4d36227f am: 736654b861 am: a83dc7d462 am: 463c029e6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826231

Change-Id: Ibb0462b74f7d27be33936470b614f3c9196882c2
2021-09-15 00:59:00 +00:00
Guang Zhu
da4d36227f Merge "update build rules to use /data/local/tests/unrestricted" am: 7b32612dc4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826231

Change-Id: I96945a717032ade148ac6b70ba5a8b02730d43a5
2021-09-15 00:23:32 +00:00
Guang Zhu
7b32612dc4 Merge "update build rules to use /data/local/tests/unrestricted" 2021-09-15 00:22:43 +00:00
Guang Zhu
83150667ae update build rules to use /data/local/tests/unrestricted
... for native tests. This new location has the appropriate
settings for debuggerd to generate valid backtraces in case
of test binary crash.

Bug: 167308193
Bug: 199904562
Test: compile
Change-Id: Ic106011a79f0aec86896b305616cf5590ab2eb2d
2021-09-14 10:56:47 -07:00
Rob Seymour
bd9d9b09d8 Merge "Add module based host-tools snapshot" am: f6c37cc87d am: dc2cc0d8d7 am: f87696ed8c am: db72b4ea4b am: 6646dfd80c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1793067

Change-Id: I9086ee988d229ce53f49f851b20652243e668f7c
2021-09-14 16:08:22 +00:00
Rob Seymour
dc2cc0d8d7 Merge "Add module based host-tools snapshot" am: f6c37cc87d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1793067

Change-Id: I3a2bb2459677c14e3e99d654ed5ffb9b7dd09b21
2021-09-14 15:04:01 +00:00
Rob Seymour
f6c37cc87d Merge "Add module based host-tools snapshot" 2021-09-14 14:47:03 +00:00
Liz Kammer
ba5d033059 Merge "Split local/absolute include into attributes" am: 04e0a1551d am: 953bf91c49 am: 0b31f81b5c am: e3eff118a7 am: e865001a64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824019

Change-Id: I6b8ff8f4f4ed0154e2dddc858e1d1b9589b23e69
2021-09-13 22:38:10 +00:00
Liz Kammer
953bf91c49 Merge "Split local/absolute include into attributes" am: 04e0a1551d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824019

Change-Id: I05e64f79fd95836e92630941f276e64fd6c5b98f
2021-09-13 21:37:32 +00:00
Rob Seymour
925aa09ea1 Add module based host-tools snapshot
Add new module:
host_snapshot {
    name: "host-snapshot"
    deps: [
      (list of host tools)
    ],
    ...
}

Package host tools using android.PackagingBase to capture host tools and transitive packaging data.
Add JSON meta data to snapshot that allows snapshot to be installed via development/vendor_snapshot/update.py

Add support to generate a fake host snapshot of all host modules that is used to detect required
modules via development/vendor_snapshot/update.py.

Bug: 192556798
Bug: 194799048
Bug: 192896149
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist -- check snapshot exists in dist

Change-Id: I849c4db801cd858408f6fe6a3ce69262a23a5be9
2021-09-13 21:29:14 +00:00
Liz Kammer
04e0a1551d Merge "Split local/absolute include into attributes" 2021-09-13 21:21:09 +00:00
Yi Kong
87fade8059 Merge "Remove unused-but-set-{variable,parameter} from ClangUnknownCflags" am: 861441fa36 am: 910cf32f49 am: d5b3d17fe1 am: f16f02a3a6 am: fc497c0913
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824620

Change-Id: Ic9db27be94061461d7789b5b1c1a0d94754ad730
2021-09-13 20:03:16 +00:00
Yi Kong
910cf32f49 Merge "Remove unused-but-set-{variable,parameter} from ClangUnknownCflags" am: 861441fa36
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824620

Change-Id: Ieec9bdef68bb233e125e49d633803b39f200c81d
2021-09-13 19:07:01 +00:00
Yi Kong
861441fa36 Merge "Remove unused-but-set-{variable,parameter} from ClangUnknownCflags" 2021-09-13 18:54:15 +00:00
Liz Kammer
1d74f09f79 Merge "bp2build: Split export_{includes,system_includes}" am: 15c90f5fe1 am: dd34331163 am: e25c407eaf am: 0cbe7addee am: 91f8230fa9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1822559

Change-Id: Icd8e4f746f2dce6e1f5a3497cb75234f560a639a
2021-09-13 13:22:41 +00:00