llvm / llvm/llvm-project

[libc] Clean up string/memory util cmake

Open
#179,808 1 comment 0 reactions 0 assignees View on GitHub
cmake libc metaissue
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Four years ago I left myself a TODO to clean up the memory utils cmake: https://github.com/llvm/llvm-project/commit/bf0ded805ad0ee977d3462e3face546fad93d0ed
Today it's still not done.

TODO:

- [ ] Set up cmake files in each target-specific subfolder in https://github.com/llvm/llvm-project/tree/main/libc/src/string/memory_utils
- [ ] Add logic for cmake to include the correct target-specific folder
- [ ] wire up the `inline_*` header libraries to depend on the relevant target specific operations if available
- [ ] Remove the `memory_utils` header library, then find each place where it was used and add a more specific dependency.
- [ ] Create a proper `string_length` header library in https://github.com/llvm/llvm-project/blob/main/libc/src/string/CMakeLists.txt
- [ ] wire that up to the correct cmake dependencies once they exist.

Contributor guide

Open the contributing guide

Research direction

Read the existing CMake setup under libc/src/string/memory_utils and libc/src/string/CMakeLists.txt, then review the linked historical TODO commit. Trace current users of the memory_utils header library and target-specific operations. Done means the target folders and dependencies are wired as listed, string_length has its own header library, and the obsolete memory_utils library is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.