commit | 8bf0501a514a371111b9da6256add22b27e64041 | [log] [tgz] |
---|---|---|
author | Pranav Tilak <pranav.vinaytilak@amd.com> | Wed Jul 16 14:21:22 2025 +0530 |
committer | Pranav Tilak <Pranav.VinayTilak@amd.com> | Fri Aug 08 11:51:13 2025 +0000 |
tree | 87272d2f0a943c0d60e51d2d6258e496b19766ee | |
parent | 89f8576ef6fb44d2a74c34e03967fc9170885785 [diff] |
fix(libtl): evaluate condition for boolean A literal 0 shall not be used as a null pointer constant. In these cases, pointer variables were being implicitly compared using if (ptr) syntax. The condition is now explicitly checked using if (ptr != NULL) to ensure clarity and compliance with the rule. Change-Id: Ia1a793925fa519e09a1ddd7eaf43cabb4617c94f Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
The Transfer List Library (LibTL) implements the Firmware Handoff specification, providing a streamlined interface for managing transfer lists. LibTL offers a user-friendly interface for:
The library supports building with host tools such as Clang and GCC, and cross compilation with the Aarch64 GNU compiler.
Tool | Minimum Version |
---|---|
Clang-Format | 14 |
CMake | 3.15 |
To configure the project with the default settings (using GCC as the host compiler), run:
cmake -B build
Then, to compile the project and produce libtl.a
in the build/
directory:
cmake --build build
To cross-compile the project (e.g., for AArch64), specify the appropriate tool using the CC
option when configuring the project:
CC=aarch64-none-elf-gcc cmake -B build -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY cmake --build build
You can specify the build mode using the CMAKE_BUILD_TYPE
option. Supported modes include:
Debug
– Full debug info with no optimization.Release
– Optimized build without debug info.RelWithDebInfo
– Optimized build with debug info.MinSizeRel
– Optimized for minimum size.APIs for specific projects can be conditionally included in the static library using the PROJECT_API
option.
Tests for LibTL are provided in the folder test
, to configure the project for test builds, run:
cmake -B build -DTARGET_GROUP=test cmake --build build
Then, to run the tests with ctest
, use:
ctest --test-dir build/