-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributelibc
Description
We need to create a remap_file_pages
wrapper for linux targets, see https://www.man7.org/linux/man-pages/man2/remap_file_pages.2.html.
This requires:
- implement the entrypoint header similar to
libc/src/sys/mman/mmap.h
- modify
libc/src/sys/mman/CMakeLists.txt
accordingly
- modify
- implement the entrypoint similar to
libc/src/sys/mman/linux/mmap.cpp
- modify
libc/src/sys/mman/linux/CMakeLists.txt
accordingly
- modify
- add in the header spec
- modify
functions
section inlibc/newhdrgen/yaml/sys/mman.yaml
- modify
SysMMan
section inlibc/spec/linux.td
- modify
- add in test
- similar to
libc/test/src/sys/mman/linux/mmap_test.cpp
- modify
libc/test/src/sys/mman/linux/CMakeLists.txt
accordingly
- similar to
Misc:
- How to build libc for dev: https://libc.llvm.org/full_host_build.html
- Code style and dev guide: https://libc.llvm.org/dev/index.html
If you use vscode, sample settings are as the following (optional settings are useful in speeding up the compilation):
{
"cmake.sourceDirectory": "${workspaceFolder}/runtimes",
"cmake.configureSettings": {
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
"LLVM_ENABLE_RUNTIMES": [
"libc",
"compiler-rt"
],
"LLVM_LIBC_FULL_BUILD": true,
"LLVM_USE_LINKER": "lld", // optional: requires installing lld
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache", // optional: requires installing sccache first
"CMAKE_C_COMPILER_LAUNCHER": "sccache", // optional: requires installing sccache first
"CMAKE_CXX_COMPILER": "/usr/bin/clang++",
"CMAKE_C_COMPILER": "/usr/bin/clang",
"LLVM_LIBC_INCLUDE_SCUDO": true,
"COMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC": true,
"COMPILER_RT_BUILD_GWP_ASAN": false,
"COMPILER_RT_SCUDO_STANDALONE_BUILD_SHARED": false,
"LIBC_USE_NEW_HEADER_GEN": true
},
"cmake.generator": "Ninja", // optional: requires installing Ninja
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"clangd.arguments": [
"--header-insertion=never"
]
}
Metadata
Metadata
Assignees
Labels
good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributelibc