Revert submission 3207854-ensure-c-ndk-headers
Reason for revert: Droidmonitor created revert due to b/358445530.
Reverted changes: /q/submissionid:3207854-ensure-c-ndk-headers
Change-Id: I649941a4d063d76a1c6a8e58fb885da2c44331c0
https://github.com/android/ndk/issues/1920 recently reported a handful
of NDK headers where C-incompatible syntax had slipped in which wasn't
caught by review. This is also something that we often manually catch
in API review, but the manual inspection is, as can be seen from that
bug, error prone.
This check is pretty stupid. I've tried on other occasions to do a
more thorough check that would build each header using the same flags
as cc_library or similar would, but was never able to get that
working. This isn't as thorough, but that's maybe not such a bad
thing, since it saves on build time to only check on variant. In
practice the rudimentary approach I've taken here would have caught
every instance reported in the bug above, and probably all the other
cases that we'd previously caught in API review as well, so it's
definitely a step in the right direction if not good enough forever.
Bug: http://b/113359184
Test: m ndk
Change-Id: Id4e8cc511413acc61c4f625f25c3004d7439263c
This works around an incompatibility between coverage and the
-fdebug-info-for-profiling flag.
also moved -fdebug-info-for-profiling flag so that it is only applied to
the libraries that enabled AFDO.
Test: gzip -cd out/verbose.log.gz | grep debug-info-for-profiling
Bug: 345593672
Change-Id: I68493511da1e61091209d0ed1b2c86c7ba0e21f4
It doesn't need to be a Makefile variable exported from Soong as it's
hard-coded.
Bug: 353429422
Test: boot shiba with SANITIZE_TARGET=hwaddress
Change-Id: I4a98eaaf1002aa7aba5d5131ff251bdcbdd2e0ef
Update compiler to r536225 and the error: argument '-fno-relaxed-template-template-args' is deprecated arises.
Bug: b/341084395
Test: presubmit
Change-Id: If714f96e4537b5f8d695cd7c0d1cd0a8ddcbb96e
To support skipping ninja file writing during incremental build, we
add all the global rules/variable/pools from static sources because
when we restore from cache we don't have the build defs available to
build the globals. This means all the global rules and variables are
added blindly, so we need to exclude these darwin specific ones since
they will fail due to they depends on the tool that only exists on MAC.
Bug: 335718784
Test: local tests and CI
Change-Id: Ife835545f0f76ffaec77e48bdd89ab7384a1b995
Revert submission 3195358-ndk-libcxx
Reason for revert: Droidmonitor created revert due to b/356220894. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:3195358-ndk-libcxx
Change-Id: Ic9cd3d30637d5ac187d3fc80b34d45083f37064e
- Update output file names when using grpc plugin (grpc.pb instead of pb)
Change-Id: I702553713d1a667f90a5502291bd15b7cedd7eb7
Signed-off-by: Andrea Marchini <amarchini@google.com>
Remove old NDK libc++ Soong modules, and use libunwind instead of
ndk_libunwind.
Bug: http://b/332594828
Test: m nothing --no-skip-soong-tests
Test: m blueprint_tests
Change-Id: I6763a4dbba660240e47a4a2eb179382c0a0a9840
The libclang_rt.* prebuilt libraries have an autogenerated map.txt for
each arch. e.g.
```
$ ls prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan*map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-aarch64-android.map.txt prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-riscv64-android.map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-arm-android.map.txt prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-x86_64-android.map.txt
prebuilts/clang/host/linux-x86/clang-r530567/lib/clang/19/lib/linux/libclang_rt.asan-i686-android.map.txt
```
These map.txt files are currently a noop, but will be used to compile
stub srcs. In preparation for that, make stubs.symbol_file and
llndk.symbol_file arch variant
Test: m nothing # no diff in ninja file
Bug: 220898484
Change-Id: I7316546905c1327c764ee67a48c77a2a68465d77
The cmake snapshot scripts currently looks at the `cc.Module.compiler`
property to determine whether a cc_* module is a prebuilt. As part of
b/275273834. some cc_* prebuilt modules which provide APIs will have a
non-nil `compiler` to convert the API .txt file to stub .c files.
This CL updates the cmake generation script to ignore prebuilts using
the `IsPrebuilt` function rather than `cc.Module.compiler`
Bug: 275273834
Test: m nothing --no-skip-soong-tests
Change-Id: Id8ba22b1c5ad13fb31e75a407a25e97a8040d0b1
cc_prebuilt_library_shared does not currently support generating stubs
from API symbol_files, and therefore the symbol file was removed from
the module sdk snapshots in https://ag.corp.google.com/11394495
As part of b/275273834, the stubs will be generated from the API files
for cc_prebuilt_library_shared, so add the symbol file back to the
module sdk
Bug: 275273834
Test: m nothing --no-skip-soong-tests
Test: m art-module-sdk and verified the map.txt is copied to the zip
next to the Android.bp file
Change-Id: I9551e7b8a76ceb9db3ed0434d315b6839f5e3d54
Platform variants of module sdk libraries were marked as uninstallable
originally in https://r.android.com/1974259. This special case is no
longer necesssary - android.MutateApexTransition will call
MakeUninstallable on the platform variant on both the source and
prebuilt soong modules when the following conditions are met
- //apex_available:platform is not listed in apex_available (explicitly
or via the default implicit)
- the soong module is included in an apex that exists in the tree
(listed in native_shared_libs)
Since MakeUninstallable is set by apex specific mutators, the relevant
unit test has been moved to the apex package. The Android.bp of the test
has also been extended with an apex that includes the shared library.
Test: m nothing --no-skip-soong-tests
Test: no diff in out/soong/Android-$product.mk
Test: added prebuilt_libdexfile to art's apex_contributions locally, no
diff in out/soong/Android-$product.mk
Bug: 220898484
Change-Id: I43a324882d486451bb921028853508d7ec3d76bf
* changes:
Convert sdk mutator to TransitionMutator
Convert link mutator to TransitionMutator
Convert version mutator to TransitionMutator
Convert python_version mutator to TransitionMutator
Convert rust_libraries and rust_stdlinkage mutators to TransitionMutators
The current logic enforces a device arch match and omits a module
altogether if none is found. To collect a more comprehensive list
of cc deps for IDE (ASfP) project setup, we introduce a fallback
that defaults to an arbitrary (first-processed) variant.
Bug: 322369312
Test: refreshmod
Change-Id: Ic5e1fd39e569735ff90b5c71ab1395632cca9af7
Reapply after fixing existing build and test failures.
This reverts commit 8e2c5c22be.
Bug: 342023558
Test: presubmit
Change-Id: I4d36bab7015f401e7580c6287b7f94ffa25c74fc
Revert submission 2695387-host-tests-Og
Reason for revert: Droidmonitor triggered revert due to build breakage in b/353353713. Will be verifying through ABTD before submission.
Reverted changes: /q/submissionid:2695387-host-tests-Og
Change-Id: Ia8c75f9476f52dfce959c424bdf6b483bdf95c9f
We need to add stubs to it to produce a correct linker config for the
ART debug APEX in eng builds.
We should be able to clean up all the ART exceptions when the debug
APEX is removed. Add a TODO reference to the ticket tracking that.
Test: See the other CL in the topic.
Bug: 349767294
Change-Id: Ida7ea96ccc3e29c2899d5ec12c4e8c8ae983a355
Add an IsAddingDependency method to IncomingTransitionContext that
returns true if IncomingTransition is called after the transition
has already won while adding a new dependency. This will be used
as part of the transition mutators to support an apex use case where
incoming dependencies during the initial apex mutator need to be
rewritten onto the platform variant for modules that don't support
the apex, but a later call to OtherModuleDependencyVariantExists
must not rewrite the requested apex variation onto the platform
variant.
This should be used sparingly, all uses will have to be removed in
order to support creating variants on demand.
Bug: 319288033
Test: TestIsAddingDependency
Flag: EXEMPT refactor
Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
Setting sanitize and stl to nil in a mutator isn't valid, if any other
mutator creates a variant then the factory method will be called again
to create the new variants and will reset sanitize and stl to non-nil.
Add a property to sanitize and check it everywhere that checked for
sanitize != nil, and set the Stl property.
Bug: 319288033
Test: all soong tests pass
Flag: EXEMPT refactor
Change-Id: If99d5fa0f088ee4a73cc7dccdab4268618a6009f
This reverts commit b4f05f1a05.
Reason for revert: <Potential culprit for b/352458178 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>
Change-Id: Idf6c69296c6537e8011c2ce5fcbdf45a29154acf
This reverts commit cbf426fa50.
Reason for revert: Droidmonitor triggered revert due to build breakage in b/352395522. Will be verifying through ABTD before submission.
Change-Id: I214aa6e2a707ed22aac901db988a33affc37e269
This helps to reduce build artifact size significantly, by 1.33GB for
`m cts` in the `out` directory on aosp-main. This should also make them
a lot faster to run.
Also turns off unused-result warning. This analysis is not run on -O0,
leaving behind a ton of code that triggers this warning. Since it is not
an important warning for tests anyway, turn it off by default for tests.
Right now, -Og is just an alias for -O1 in Clang. If the debuggability
is affected due to this change, we can identify and disable the relevant
optimization pass in -Og.
Change-Id: I84383cbc05a53d89c322ecb3679320f1338542e6
Bug: 294796809
Test: presubmit