tsan: explain why pthread_cond_init() interceptor is commented out
[blocksruntime.git] / lib / CMakeLists.txt
blobe77190473aa5c5b31a00263a7837fc5ddc068c77
1 # First, add the subdirectories which contain feature-based runtime libraries
2 # and several convenience helper libraries.
3 if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux")
4   # AddressSanitizer is supported on Linux and Mac OS X.
5   # Windows support is work in progress.
6   add_subdirectory(asan)
7   add_subdirectory(interception)
8   add_subdirectory(sanitizer_common)
9   add_subdirectory(ubsan)
10 endif()
11 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
12   # ThreadSanitizer and MemorySanitizer are supported on Linux only.
13   add_subdirectory(tsan)
14   add_subdirectory(msan)
15 endif()
17 # FIXME: Add support for the profile library.
19 # The top-level lib directory contains a large amount of C code which provides
20 # generic implementations of the core runtime library along with optimized
21 # architecture-specific code in various subdirectories.
23 set(GENERIC_SOURCES
24   absvdi2.c
25   absvsi2.c
26   absvti2.c
27   adddf3.c
28   addsf3.c
29   addvdi3.c
30   addvsi3.c
31   addvti3.c
32   apple_versioning.c
33   ashldi3.c
34   ashlti3.c
35   ashrdi3.c
36   ashrti3.c
37   clear_cache.c
38   clzdi2.c
39   clzsi2.c
40   clzti2.c
41   cmpdi2.c
42   cmpti2.c
43   comparedf2.c
44   comparesf2.c
45   ctzdi2.c
46   ctzsi2.c
47   ctzti2.c
48   divdc3.c
49   divdf3.c
50   divdi3.c
51   divmoddi4.c
52   divmodsi4.c
53   divsc3.c
54   divsf3.c
55   divsi3.c
56   divti3.c
57   divxc3.c
58   enable_execute_stack.c
59   eprintf.c
60   extendsfdf2.c
61   ffsdi2.c
62   ffsti2.c
63   fixdfdi.c
64   fixdfsi.c
65   fixdfti.c
66   fixsfdi.c
67   fixsfsi.c
68   fixsfti.c
69   fixunsdfdi.c
70   fixunsdfsi.c
71   fixunsdfti.c
72   fixunssfdi.c
73   fixunssfsi.c
74   fixunssfti.c
75   fixunsxfdi.c
76   fixunsxfsi.c
77   fixunsxfti.c
78   fixxfdi.c
79   fixxfti.c
80   floatdidf.c
81   floatdisf.c
82   floatdixf.c
83   floatsidf.c
84   floatsisf.c
85   floattidf.c
86   floattisf.c
87   floattixf.c
88   floatundidf.c
89   floatundisf.c
90   floatundixf.c
91   floatunsidf.c
92   floatunsisf.c
93   floatuntidf.c
94   floatuntisf.c
95   floatuntixf.c
96   gcc_personality_v0.c
97   int_util.c
98   lshrdi3.c
99   lshrti3.c
100   moddi3.c
101   modsi3.c
102   modti3.c
103   muldc3.c
104   muldf3.c
105   muldi3.c
106   mulodi4.c
107   mulosi4.c
108   muloti4.c
109   mulsc3.c
110   mulsf3.c
111   multi3.c
112   mulvdi3.c
113   mulvsi3.c
114   mulvti3.c
115   mulxc3.c
116   negdf2.c
117   negdi2.c
118   negsf2.c
119   negti2.c
120   negvdi2.c
121   negvsi2.c
122   negvti2.c
123   paritydi2.c
124   paritysi2.c
125   parityti2.c
126   popcountdi2.c
127   popcountsi2.c
128   popcountti2.c
129   powidf2.c
130   powisf2.c
131   powitf2.c
132   powixf2.c
133   subdf3.c
134   subsf3.c
135   subvdi3.c
136   subvsi3.c
137   subvti3.c
138   trampoline_setup.c
139   truncdfsf2.c
140   ucmpdi2.c
141   ucmpti2.c
142   udivdi3.c
143   udivmoddi4.c
144   udivmodsi4.c
145   udivmodti4.c
146   udivsi3.c
147   udivti3.c
148   umoddi3.c
149   umodsi3.c
150   umodti3.c
151   )
153 if(CAN_TARGET_X86_64)
154   add_library(clang_rt.x86_64 STATIC
155     x86_64/floatdidf.c
156     x86_64/floatdisf.c
157     x86_64/floatdixf.c
158     x86_64/floatundidf.S
159     x86_64/floatundisf.S
160     x86_64/floatundixf.S
161     ${GENERIC_SOURCES}
162     )
163   set_target_properties(clang_rt.x86_64 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_X86_64_CFLAGS}")
164   add_clang_compiler_rt_libraries(clang_rt.x86_64)
165 endif()
166 if(CAN_TARGET_I386)
167   add_library(clang_rt.i386 STATIC
168     i386/ashldi3.S
169     i386/ashrdi3.S
170     i386/divdi3.S
171     i386/floatdidf.S
172     i386/floatdisf.S
173     i386/floatdixf.S
174     i386/floatundidf.S
175     i386/floatundisf.S
176     i386/floatundixf.S
177     i386/lshrdi3.S
178     i386/moddi3.S
179     i386/muldi3.S
180     i386/udivdi3.S
181     i386/umoddi3.S
182     ${GENERIC_SOURCES}
183     )
184   set_target_properties(clang_rt.i386 PROPERTIES COMPILE_FLAGS "-std=c99 ${TARGET_I386_CFLAGS}")
185   add_clang_compiler_rt_libraries(clang_rt.i386)
186 endif()