summaryrefslogtreecommitdiff
path: root/linkerconfig
AgeCommit message (Collapse)Author
2025-03-13Change CommonModuleInfoProvider to a pointer. Yu Liu
Bug: 358427516 Test: Manually verified genereated ninja and mk files, unit tests. Change-Id: I53a6dd718232735decbeb93febfd269dd9449e86
2025-03-07Rename CommonModuleInfoKey to be consistent with others. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I1ce8bc782666586633ded9cfaf1b9590e3c0efde
2025-02-19Change depVisitor to use providers instead of type-asserting to Yu Liu
interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e
2025-02-12Don't panic in ModuleForTests and friends Colin Cross
Panicking in ModuleForTests and similar test helper functions was a mistake. Go's test runner stops running tests as soon as any test panics, which means debugging multiple tests panicking requires rerunning all the tests after fixing each panic to find the next one. Pass the *testing.T into ModuleForTests and friends so that it can call t.Fatalf instead. Test: all soong tests pass Change-Id: I5d0f2424eaf04fb795079e6d1e4b9469d8c7033c
2025-01-08Convert getLibsForLinkerConfig to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: Ib8020db0d1cf9e035ace52e2a893bb3df7975127
2024-12-13Make BuildLinkerConfig run in its own action Cole Faust
We should probably do this change for more parts of the filesystem RuleBuilder. Moving the linker config action out of the filesystem rulebuilder allows it to run in parallel with opther actions, and not rerun every time the filesystem is rebuilt. Bug: 384091387 Test: Presubmits Change-Id: Ic7305c555260fb5d9900c6c709b6c81dc0708d2b
2024-10-31Add linker.config.pb support to android_filesystem Spandan Das
As part of the mk->bp conversion, all modules and partitions will eventually be built with Soong. vendor.img (built with kati) uses some rules in build/make/core to install a /etc/linker.config.pb file. This CL adds this logic to `android_filesystem`. This soong module will eventually be used to build vendor.img There are two main inputs to linker.config.pb generation for vendor. 1. PRODUCT_VENDOR_LINKER_CONFIG_FRAGMENTS, a list of json files 2. List of stub libraries installed in vendor (1) will be passed to `android_filesystem` as `Linker_config_srcs`. (2) has a subtle difference between kati and soong implementation. Kati uses `SOONG_STUB_VENDOR_LIBRARIES` to determine the list of all vendor stub libraries in the tree, and then uses `--system $TARGET_OUT/vendor` to filter in the libraries which are actually installed. For the Soong implementation, this will be replaced with ctx.VisitDirectDeps, followed by child.HasStubVariants Test: go test ./filesystem Bug: 375686533 Change-Id: I6f9130d2aa866dcac9272b71939e40ed50a952ac
2024-09-18Add default_visibility for soong modules Cole Faust
So that we don't get surprise usages. Bug: 348717861 Test: m nothing Change-Id: I47319a727092c1bd936cca88f5713ee977a48b48
2024-08-27Force rebuild linker.config.pb even after a build error Justin Yun
After a build failure of linker.config.pb, we must manually remove the temp.pb file to resume the build again after fixing the error. By adding '--force' flag, the script will overwrite the existing temp.pb file. Bug: na Test: build after an error for linker.config.pb Change-Id: If51ba8291de49a7c0bed8771d702f61c904d3455
2024-08-16Remove more internal fields from ModuleBase. Yu Liu
Bug: 358425833 Test: Manual compare the generated ninja and mk files and CI. Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
2024-07-08LLNDK libraries can also provide libraries Kiyoung Kim
Current linker.config.pb puts libraries into the provide library list only if the library is stub (or defines stub). However, there are some LLNDK libraries which does not define stub, thus would be ignored from the providing libs list. This change adds libraries into the providing libs list if the library is LLNDK. Bug: 351227576 Test: linker.config.pb from aosp_cf_system_x86_64 contains LLNDK libraries as providing libs Change-Id: I23c02c9d05a5176dab34fe792029d6236790be56
2024-06-10PrebuildEtcModule no longer implements OutputFiles method mrziwang
In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. These module types are included in this change: linker_config llndk_libraries_txt sanitizer_libraries_txt java_sdk_library_xml vndksp_libraries_txt vndkcore_libraries_txt vndkprivate_libraries_txt vndkpublic_libraries_txt Test: CI Bug: 339477385 Change-Id: I35575bbad137df5ff8001db9a61ba5b3d13eaa6d
2024-03-25Update linker.config.pb based on package dependency Kiyoung Kim
Current linker.config.pb from the package is generated with auto-detected provide libs, but this misses require libs which can be detected from module dependency. This change adds extra require libs to linker.config.pb generated from system image so it can link with modules outside of system image. Bug: 324995772 Test: Link succeeded from Cuttlefish with soong defined system image Change-Id: I8563ec9ddce2a1648cc9ee55704c9483e137b710
2024-01-09"master" was renamed "main". Elliott Hughes
Test: N/A Change-Id: I86d5578eaac260e55a9583db7ab49812b4ba1f5d
2023-12-08Remove ConvertWithBp2build implementations Colin Cross
Remove the ConvertWithBp2build implementations from all the module types, along with the related code. Bug: 315353489 Test: m blueprint_tests Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-09-20Have ConvertWBp2build use Bp2buildMutatorContext Chris Parsons
This no-op refactoring facilitates some upcoming functional changes for "bp2build allowlist v2". The work requires that the bp2build conversion mutator be changed from a TopDown mutator to a BottomUp mutator. Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext makes it easier to make this functional change without touching tens of files and multiple projects. Bug: 285631638 Test: m bp2build Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
2023-06-16Provide reason for unconverted bp2build modules Chris Parsons
This also changes the expectation of ConvertWithBp2build. Each implementation must either create one or more Bazel target modules, or mark the module as unconvertible (with a specific reason). Manually verified no runtime hit in AOSP In AOSP, the metrics file size increases from 252K to 1.6M This changes some effective module counts in bp2build metrics: - Removes "package" modules from the module count list in metrics, as these will not be converted like regular modules. - Counts Handcrafted modules as being "unconverted", as bp2build is not responsible for them. Bug: 285631638 Test: Verified generated BUILD.bazel files are bit-for-bit identical with this change Test: Manually verified one case of each implemented reasonType Change-Id: I308dd451d8f28379b15671dae9f931bd0446f5c1
2023-02-28Remove OWNERS access for non-build team people to core build system Joe Onorato
Test: treehugger Change-Id: I0c318ddd7d78110327bbd849ed9aa3973c86de5d
2022-09-18Remove Python enables identical to global defaults. Krzysztof KosiƄski
Bug: 245854393 Test: presubmit Change-Id: Ia99d3fc9f1626891d45c55d679f4d8a049f9e1e8
2022-07-08Implement bp2build for linker_config Liz Kammer
Pair: agespino Bug: 211666695 Test: TODO Change-Id: I479bcd7c53b1c57563fb4277ec39ad70b16030b8
2022-03-15Don't export Soong path as a Make variable Colin Cross
Make is being changed to use the copy at LOCAL_BUILT_MODULE, the Soong path is no longer necessary. Test: m alllicensemetadata reportmissinglicenses Change-Id: I030539473a05e94bec1623ab54fbbcdf43d42cf3
2022-01-25Linkerconfig with namespace contribution Jooyung Han
APEX can contribute search paths to linker namespaces. Bug: 216208308 Test: linkerconfig_diff_test Change-Id: I3f9b85d7a491b9ac841b0e454c707b4d6c150654
2021-12-15Remove InstallBypassMake and ToMakePath Colin Cross
InstallBypassMake and ToMakePath are obsolete, remove them. Bug: 204136549 Test: m checkbuild Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
2021-04-21android_system_image that generates linker.config.pb Jiyong Park
android_system_image module type is a specialization of the android_filesystem module type. Currently, it adds a build rule for creating linker.config.pb from the information about all the other files in the filesystem and includes linker.config.pb to the filesystem as well. To do so, the filesystem module now provides a function pointer which subtype modules like android_system_image can implement to pass extra files that they want to package in the filesystem. In addition, the linkerconfig package is revised to make it possible to build linker.config.pb file outside of the package. Bug: 185391776 Test: m microdroid and inspect etc/linker.config.pb in it. Change-Id: Id89c40b519213062860d7306029b8413d8d36a2d
2021-04-15make linker_config OutputFileProducer Jooyung Han
so that they can be used in `srcs` of genrule. Bug: 181093750 Test: m Change-Id: Ia54554f1e81d766a970c9c4e02906ef9c0d85934
2021-04-15Allow uninstallable linker_config to be packaged Jooyung Han
Till now, linker_config has to be installable to be packaged. With this commit, packaging modules like filesystem now can include uninstallable linker_config. This can help when linker_config can conflict with other partitions e.g. system. Bug: 185391776 Test: build filesystem with uninstallable linker_config Change-Id: Ic2cece08be73749e6bd1f813152c67f8e3904c20
2021-03-29Convert linkerconfig package to use test fixtures Paul Duffin
Bug: 181070625 Test: m nothing Change-Id: Ic85e353ad8fa2aa324cd75d5bca8a1e31fd977a8
2021-02-22Merge "Add ctx to AndroidMkExtraEntriesFunc" Treehugger Robot
2021-02-19Add ctx to AndroidMkExtraEntriesFunc Colin Cross
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to access providers. Test: m checkbuild Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-06Add LOCAL_LICENSE_KINDS to build/soong Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp android/Android.bp android/soongconfig/Android.bp androidmk/Android.bp apex/Android.bp bazel/Android.bp bp2build/Android.bp bpf/Android.bp bpfix/Android.bp cc/Android.bp cc/config/Android.bp cc/libbuildversion/Android.bp cc/libbuildversion/tests/Android.bp cc/ndk_api_coverage_parser/Android.bp cc/ndkstubgen/Android.bp cc/symbolfile/Android.bp cmd/dep_fixer/Android.bp cmd/diff_target_files/Android.bp cmd/extract_apks/Android.bp cmd/extract_jar_packages/Android.bp cmd/extract_linker/Android.bp cmd/fileslist/Android.bp cmd/host_bionic_inject/Android.bp cmd/javac_wrapper/Android.bp cmd/merge_zips/Android.bp cmd/multiproduct_kati/Android.bp cmd/path_interposer/Android.bp cmd/pom2bp/Android.bp cmd/pom2mk/Android.bp cmd/sbox/Android.bp cmd/soong_build/Android.bp cmd/soong_env/Android.bp cmd/soong_ui/Android.bp cmd/zip2zip/Android.bp cmd/zipsync/Android.bp cuj/Android.bp dexpreopt/Android.bp dexpreopt/dexpreopt_gen/Android.bp env/Android.bp etc/Android.bp filesystem/Android.bp finder/Android.bp finder/cmd/Android.bp genrule/Android.bp jar/Android.bp java/Android.bp java/config/Android.bp kernel/Android.bp linkerconfig/Android.bp linkerconfig/proto/Android.bp makedeps/Android.bp partner/Android.bp phony/Android.bp python/Android.bp python/tests/Android.bp remoteexec/Android.bp rust/Android.bp rust/config/Android.bp scripts/Android.bp sdk/Android.bp sh/Android.bp shared/Android.bp symbol_inject/Android.bp symbol_inject/cmd/Android.bp sysprop/Android.bp tradefed/Android.bp ui/build/Android.bp ui/logger/Android.bp ui/metrics/Android.bp ui/metrics/proc/Android.bp ui/status/Android.bp ui/terminal/Android.bp ui/tracer/Android.bp xml/Android.bp zip/Android.bp zip/cmd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: finder/fs/Android.bp third_party/zip/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2020-12-04Merge "Add linkerconfig to Runtime APEX" Kiyoung Kim
2020-12-03Merge "Pass pctx and ctx to NewRuleBuilder" Colin Cross
2020-12-02Add linkerconfig to Runtime APEX Kiyoung Kim
Add linkerconfig to Runtime APEX module. Bug: 165769179 Test: Cuttlefish boot succeeded Change-Id: I31c4bfa2ce88b64d7100f227ec289416db253b13
2020-12-01Pass pctx and ctx to NewRuleBuilder Colin Cross
Enable the RuleBuilder and RuleBuilderCommand methods to access the BuilderContext by passing it to NewRuleBuilder instead of RuleBuilder.Build. Test: genrule_test.go Test: rule_builder_test.go Test: m checkbuild Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
2020-12-01Generate system stub library list at build time Kiyoung Kim
List of stub libraries from system (and bionic APEX) is currently managed in static file. This change generates the list at build time and adds to the system config so linkerconfig can use it. Bug: 172889962 Test: Build cuttlefish and confirmed list is generated in /system/etc/linker.config.pb Change-Id: Ie0400e9d1098b0de19c6a7c25f261384aadde0a3
2020-11-12Pass Config to NewTestContext instead of ctx.Register Colin Cross
Prepare for using Config when adding singletons by passing Config to NewTestContext and NewContext instead of to ctx.Register. This will enable a followup change to store SingletonMakeVarsProviders registered on the Context in the Config, which is necessary to run multiple tests in parallel without data races. Test: all soong tests Change-Id: Id229629a4e42ff4487d317241673837726c075fc
2020-11-03Add new properties in linker config format - provideLibs and requireLibs Kiyoung Kim
Add new properties 'provideLibs' and 'requireLibs' to the linker config format so these properties can be used from configuration for system image. Bug: 168262631 Test: cuttlefish & crosshatch boot succeeded Change-Id: Ic496813f7d550aed9afee13e445aa69f56419550
2020-10-15Handle new filetype 'linker_config' Kiyoung Kim
Handle new filetype 'linker_config' which is configuration for linkerconfig in json type and convert into protobuf in build time. Bug: 169634881 Test: Build succeeded and cuttlefish boot succeeded Change-Id: I56555fc738e6d6600d15a191a24f79a2ee747f52