llvm-capstone/libc/CMakeLists.txt
Siva Chandra Reddy e5a743c4f6 Add implementations of POSIX mmap and munmap functions.
Summary:
A set of of linux x86_64 internal syscall helpers have also been added.

This change does not try to be perfect with respect to OS and machine
abstractions. A TODO note has been added at places where such abstractions
would help and make the arrangement scalable and cleaner. Addressing the
TODOs and building such abstractions is not in the scope of this change.
It is hoped that follow up changes cleaning up the problem areas and
addressing the TODOs will better illustrate the need for the changes.

This change also does not try to imitate mmap and munmap implementations
of other libcs. The idea here is to put in the bare minimum required to
obtain a working mmap and munmap, and then add the rest of the
functionality on an as needed basis.

Reviewers: abrachet, phosek, stanshebs, theraven

Subscribers: mgorny, MaskRay, jfb, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D71634
2019-12-23 14:04:02 -08:00

27 lines
729 B
CMake

cmake_minimum_required(VERSION 3.4.3)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
# The top-level source directory of libc.
set(LIBC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# The top-level directory in which libc is being built.
set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
# Path libc/scripts directory.
set(LIBC_BUILD_SCRIPTS_DIR "${LIBC_SOURCE_DIR}/utils/build_scripts")
set(LIBC_TARGET_OS ${CMAKE_SYSTEM_NAME})
string(TOLOWER ${LIBC_TARGET_OS} LIBC_TARGET_OS)
set(LIBC_TARGET_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
include(CMakeParseArguments)
include(LLVMLibCRules)
add_subdirectory(src)
add_subdirectory(config)
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(utils)