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
https://android-review.googlesource.com/c/platform/build/soong/+/1820496/1/scripts/manifest_check.py#361
caused a regression wrt to statusfile creation. Specifically it inverted
the logic used to create the status file. This file is used in
dexpreopt, thereby affecting all odex files
Test: In internal git, m <an_odex_file>. File size is restored to
pre-regression value
Bug: 199921980
Bug: 200329228
Change-Id: If1e61ac8e2b95455dacc6e7b9431c8f6e1f339b3
When a module depends on the compose runtime add a -Xplugin argument
to the kotlinc flags that enables the compose compiler plugin.
Bug: 196351110
Test: TestKotlinCompose
Change-Id: I423a3c4d12df42804a24b672a40a165bc8dd165f
output file.
PathRelativeToTop should give an unambiguous path that can be used for
matching, as opposed to Rel().
Test: `m nothing` with a test with an invalid Output() call
Change-Id: I6d501df6acb0a1700f1480bd4250320f69278c39
This CL splits the metric count into handcrafted, generated, and
unconverted modules.
Test: CI
Test: m bp2build, the metrics reported are identical.
Change-Id: I80e3d2fd2989222bd40b6433b4a1924b4943d0ba
duplicate module names.
We were using the value receiver on AddConvertedModule before, which
didn't actually mutate the internal slice state.
Test: Run bp2build-progress.py
Change-Id: Ic60f8f6214a91dc129abf62c57dd0b85efffb283
Can be a more convenient alternative than specifying the full subdir
concatenation of the variants. E.g. common arch and os variations don't
have to be hardcoded.
Test: `m nothing` with https://r.android.com/1801128
Change-Id: Ic2966e109d61dfee6a2b4fcbcbf8f73274babca9
Under load sometimes the 1 millisecond timeouts are not run before
a 1 second sleep finishes, or `echo foo` is not run before a 1
second timeoutt. Increase the long sleeps and timeouts to 10 seconds.
This doesn't affect normal test runtime as the command should timeout
after 1 millisecond.
Bug: 199207577
Test: Test_runWithTimeout
Change-Id: I31166850a473b9cde37906a62d026580e7a7bd3f
This arg provides the ability to pass sources to the metalava
invocations that are part of a java_sdk_library without affecting
the runtime library.
This is useful in various scenarios, e.g.: when javadoc in some source
files affects the metalava behavior. For example, the javadoc-generation
javadoc tags @paramDoc, @returnDoc etc. Passing these as a library does
not work because class files do not contain javadoc.
Bug: 186197911
Test: manually inspect module stub src for doc enhancements
Merged-In: I2ce98f891283514e1896c52d9335550c1f5435fb
Change-Id: I2ce98f891283514e1896c52d9335550c1f5435fb
compat layer.
The list of converted modules is used for tracking bp2build progress.
The module_name_to_label aliases weren't really adding much value to
mixed builds, so let's drop the feature for now and simplify the code.
Test: CI
Test: USE_BAZEL_ANALYSIS=1 m droid
Change-Id: I3269344cfe6d1c72c108d66c6e820bc0ec19bb34
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
When TARGET_BUILD_APPS is set then TARGET_BUILD_USE_PREBUILT_SDKS=true
which causes all java_sdk_library_import modules to be treated as
prefer:true.
That breaks the build when the systemserverclasspath_fragment's content
property references a source java_sdk_library module that has a
corresponding java_sdk_library_import prebuilt module.
This fixes the issue by marking the dependency from the
systemserverclasspath_fragment to the source module as one that must
not be replaced with a reference to the prebuilt module.
Test: - update art prebuilts to include service-art
m TARGET_BUILD_APPS=Calendar apps_only
- fails before, works afterwards
Bug: 199116972
Change-Id: Ia2d8ce7bb7e644336a42c901f7fb8ea50fd67909
Adds a test case to TestJavaStableSdkVersion for the case where a
module uses sdk_version: "core_platform" but is in the list of modules
that can use the legacy version.
This required storing the lookup map in the Config to allow it to be
customized for the test.
Bug: 180399951
Test: m nothing
Change-Id: I404705c3fd8a559649c6ab2624856cf78f49f85c
Makes it adhere to the go standard practice of prefixing documentation
comments with the name of the type/func/method.
Bug: 195754365
Test: m nothing
Change-Id: Idf3fe827edc9b6d67d12a99a4b27539ac938ea95
This reverts commit 92346c4832.
Reason for revert: Fixed build error.
The build error is fixed by ag/15841934. This CL remains unchanged. This
CL will be submitted AFTER ag/15841934 is submitted.
Bug: 200024131
Test: 1. Patch this CL and ag/15841934 into internal master.
2. sudo vendor/google/build/build_test.bash
Change-Id: I5f2b8357846fc7dda56e25ebe6ffb095e8047ec8
* 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