This separates the selection of the image variations to depend upon
from the main target loop. Follow up changes will add additional
image variations.
Bug: 195754365
Test: m nothing
Change-Id: Ia1a61b1efbc96d92cb2faf1e2c4d1c5c752b8083
To support protos (and other srcs that generate sources), we need to
partition further. Separate out into a separate common function.
Bug: 200601772
Test: build/bazel/ci/bp2build.sh
Change-Id: I7bf4cd96fd9a9fca4ccb3c96f21a04303201f891
Soong supports export_.*_headers properties, the libraries contained in
this list must also be within a shared/static/whole_static/header libs
property. For bp2build, we eliminate this duplication. The libraries
not listed in an export_.*_headers property will migrate to an attribute
prepended with implementation_, those in export_.*_headers will not have
a prefix.
Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_libc.sh
Bug: 198241472
Change-Id: I3eb84c983ec5d241c8a568e411dfd5619d3184a7
We don't currently support propagation of OS in mixed builds, and our
host toolchains are not properly configured.
This allows us to continue to make progress on device OS until host is
supported.
Test: mixed_libc CI
Test: USE_BAZEL_ANALYSI=1 m adbd
Change-Id: I2bf8b3f9ca7928dd33bf2fb3d4fa067da0f593f3
Adds a native bridge trait that if required will cause a
cc_library_header module to generate a cc_prebuilt_library_headers with
native_bridge_supported: true. It will fail if the cc_library_header's
native bridge variant would produce native bridge specific properties,
distinct from the other architecture variants, in the generated
cc_prebuilt_library_headers.
Bug: 195754365
Test: m nothing
Change-Id: I282fbb9095de6c6af57cca4eb4260e2c6c2da8cc
Revert submission 1826231-native-test-path
Reason for revert: b/199996863
Bug: 199996863
Reverted Changes:
Ic106011a7:update build rules to use /data/local/tests/unrest...
Id727355ec:update build rules to use /data/local/tests/unrest...
Change-Id: Id53334a6169e58964ef86e78de738f29b32dd491
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
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
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
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
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
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
* 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
* 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
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
... 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
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
Previously these were expanded into copts, requiring making all includes
absolute and duplicating includes to account for potentially generated
files. We now can handle both of these properly on the Bazel side, so
let's clean up build files a bit.
Test: bp2build.sh
Change-Id: I6c6160738cd6c269408c6c7a37010654d84f3c9d
We turned this off in local tidy flags, but didn't disable it on global
tidy builds. Let's remove this for now, since the upkeep cost is large
on it, and it also is currently crashing in some cases.
Bug: http://b/199534745
Bug: http://b/194865868
Test: WITH_TIDY=1 m
Change-Id: Ife39ab4949c5baf825efff66326b276c6a2a59f4
* Tested with a clang-tidy wrapper that dumps TIDY_TIMEOUT.
Test: make WITH_TIDY=1 TIDY_TIMEOUT=42
Bug: 199451930
Change-Id: I86580225bad7487da786db2ba62c09bd99d70c67
The specification of exporting includes vs system includes has an impact
on inclusion sort order. Conflating the two caused some symbols to not
be resolved correctly.
Bug: 198403271
Test: build/bazel/ci/bp2build.sh
Test: USE_BAZEL_ANALYSIS=1 m libbacktrace_no_dex succeeds with libc++_*
modules removed from mixed build denylist (would fail otherwise)
Change-Id: I08aff253d8962dc678ed10214b1c171330e0fe19