about summary refs log tree commit diff homepage
path: root/runtime/klee-libc/CMakeLists.txt
blob: bd23ba9363ad2034d75903dcd0453f4f7ed61f7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#===------------------------------------------------------------------------===#
#
#                     The KLEE Symbolic Virtual Machine
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#

set(LIB_PREFIX "RuntimeKLEELibc")
set(SRC_FILES
        __cxa_atexit.c
        abort.c
        atexit.c
        atoi.c
        bcmp.c
        calloc.c
        fortify-klibc.c
        htonl.c
        memchr.c
        mempcpy.c
        putchar.c
        stpcpy.c
        strcat.c
        strchr.c
        strcmp.c
        strcoll.c
        strcpy.c
        strlen.c
        strncmp.c
        strncpy.c
        strrchr.c
        strtol.c
        strtoul.c
        tolower.c
        toupper.c
        )

# Add __NO_INLINE__ to prevent glibc from using inline definitions of some
# builtins (i.e. putchar and atoi).
set(ADDITIONAL_CC_FLAGS
        -D__NO_INLINE__
        -std=gnu89
        )

# Build it
include("${CMAKE_SOURCE_DIR}/cmake/compile_bitcode_library.cmake")
prefix_with_path("${SRC_FILES}" "${CMAKE_CURRENT_SOURCE_DIR}/" prefixed_files)

add_bitcode_library_targets("${LIB_PREFIX}" "${prefixed_files}" "${ADDITIONAL_CC_FLAGS}" "")