commit | 00edaa1747e33dacd6e56c22cd3eafbc4ac51bf0 | [log] [tgz] |
---|---|---|
author | Roland McGrath <mcgrathr@fuchsia.infra.roller.google.com> | Tue Sep 17 01:38:59 2024 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Sep 16 18:41:07 2024 -0700 |
tree | ba2b6f0757f95c182424c732f45e755bf027787f | |
parent | c761ec736894341cdfee163aef6f3749ef63b466 [diff] |
[roll] Roll fuchsia [ld][testing] Add test_elf_object() GN templates and API This replaces the old load-test-modules-info mechanism with a new mechanism that's formalized and exported by the testing library. The new scheme relies on metadata and generator targets for each linked ELF object, i.e. executable, shared library or loadable module. In the ld test modules (and ld-startup) these are wired up to make the ELF data extractable. These all roll up to producing a "load set", which is a collection of the objects in the dependency graph of a root module or executable. These are represented by ld::TestElfObject and ld::TestElfLoadSet objects in the <lib/ld/testing/test-elf-object.h> API. Finally, instead of collecting all data for all modules, each test_elf_load_set() (e.g. test executable or root module) of interest can be explicitly referenced in a test_elf_source_set() target that is where the generated constinit initializer code gets generated and compiled. The source_set() for an individual gtest case that needs ELF data about a certain load set depends on a test_elf_source_set() written specifically to collect only the test_elf_load_set() data that's actually needed. The new ld::TestElfObject type is designed to be constinit. The ld::TestElfLoadSet type is not constinit because every one is registered for lookup by name in tests. But it has simple constructor arguments so the generated initializer calls won't be very large. Moreover, the new scheme avoids including unnecessary TestElfLoadSet and uses a separate TU for each fine-grained test_elf_source_set() so they can be broken up down even to one TestElfLoadSet per TU if desired. Original-Bug: 335737373 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1107153 Original-Revision: da36163f82a7ed2a5c50fc04e8cf332c780436dc GitOrigin-RevId: 3cd5bf38e1d65fea160466610fa795116e73dd74 Change-Id: I86106d4106b05940b79046bf58add48a81ac1f6c
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.