[libc] Extend add_object rule to handle helper object libraries.
[lldb.git] / libc / src / signal / linux / CMakeLists.txt
1
2 add_entrypoint_object(
3   raise
4   SRCS
5     raise.cpp
6   HDRS
7     signal.h
8     ../raise.h
9   DEPENDS
10     sys_syscall_h
11     linux_syscall_h
12     signal_h
13 )
14
15 add_object_library(
16   __restore
17   SRCS
18     __restore.cpp
19   COMPILE_OPTIONS
20     -fomit-frame-pointer
21     -O3
22     -Wframe-larger-than=0
23     -Werror
24     -Wno-attributes
25     # asan creates asan.module_ctor which uses stack space, causing warinngs.
26     -fno-sanitize=address
27   DEPENDS
28     linux_syscall_h
29     sys_syscall_h
30 )
31
32 add_entrypoint_object(
33   sigaction
34   SRCS
35     sigaction.cpp
36   HDRS
37     signal.h
38     ../sigaction.h
39   DEPENDS
40     __restore
41     sys_syscall_h
42     linux_syscall_h
43     signal_h
44 )
45
46 add_entrypoint_object(
47   sigprocmask
48   SRCS
49     sigprocmask.cpp
50   HDRS
51     signal.h
52     ../sigprocmask.h
53   DEPENDS
54     sys_syscall_h
55     linux_syscall_h
56     __errno_location
57     signal_h
58 )
59
60 add_entrypoint_object(
61   sigemptyset
62   SRCS
63     sigemptyset.cpp
64   HDRS
65     signal.h
66     ../sigemptyset.h
67   DEPENDS
68     __errno_location
69     errno_h
70     signal_h
71 )
72
73 add_entrypoint_object(
74   sigaddset
75   SRCS
76     sigaddset.cpp
77   HDRS
78     signal.h
79     ../sigaddset.h
80   DEPENDS
81     __errno_location
82     errno_h
83     signal_h
84 )
85
86 add_entrypoint_object(
87   signal
88   SRCS
89     signal.cpp
90   HDRS
91     signal.h
92     ../signal.h
93   DEPENDS
94     sigaction
95     signal_h
96 )