Shift the implementation of setThreadName out of the header
[folly.git] / folly / Makefile.am
1 if FOLLY_TESTMAIN
2 MAYBE_INIT = init
3 endif
4
5 if EXCEPTION_TRACER
6 MAYBE_EXCEPTION_TRACER = experimental/exception_tracer
7 endif
8
9 SUBDIRS = . experimental $(MAYBE_INIT) test io/test experimental/io/test \
10           $(MAYBE_EXCEPTION_TRACER)
11
12 ACLOCAL_AMFLAGS = -I m4
13
14 CLEANFILES =
15
16
17 noinst_PROGRAMS = generate_fingerprint_tables
18 generate_fingerprint_tables_SOURCES = build/GenerateFingerprintTables.cpp
19 generate_fingerprint_tables_LDADD = libfollybase.la
20
21 noinst_LTLIBRARIES = \
22         libfollybasesse42.la \
23         libfollybase.la
24
25 lib_LTLIBRARIES = \
26         libfolly.la \
27         libfollybenchmark.la
28
29 follyincludedir = $(includedir)/folly
30
31 nobase_follyinclude_HEADERS = \
32         ApplyTuple.h \
33         Arena.h \
34         Arena-inl.h \
35         Array.h \
36         Assume.h \
37         AtomicBitSet.h \
38         AtomicHashArray.h \
39         AtomicHashArray-inl.h \
40         AtomicHashMap.h \
41         AtomicHashMap-inl.h \
42         AtomicIntrusiveLinkedList.h \
43         AtomicLinkedList.h \
44         AtomicStruct.h \
45         AtomicUnorderedMap.h \
46         Baton.h \
47         Benchmark.h \
48         Bits.h \
49         CachelinePadded.h \
50         CallOnce.h \
51         Checksum.h \
52         Chrono.h \
53         ClockGettimeWrappers.h \
54         ConcurrentSkipList.h \
55         ConcurrentSkipList-inl.h \
56         ContainerTraits.h \
57         Conv.h \
58         CppAttributes.h \
59         CpuId.h \
60         CPortability.h \
61         detail/AtomicHashUtils.h \
62         detail/AtomicUnorderedMapUtils.h \
63         detail/AtomicUtils.h \
64         detail/BitIteratorDetail.h \
65         detail/BitsDetail.h \
66         detail/CacheLocality.h \
67         detail/CachelinePaddedImpl.h \
68         detail/ChecksumDetail.h \
69         detail/DiscriminatedPtrDetail.h \
70         detail/FileUtilDetail.h \
71         detail/FingerprintPolynomial.h \
72         detail/Futex.h \
73         detail/GroupVarintDetail.h \
74         detail/IPAddress.h \
75         detail/IPAddressSource.h \
76         detail/Malloc.h \
77         detail/MemoryIdler.h \
78         detail/MPMCPipelineDetail.h \
79         detail/RangeCommon.h \
80         detail/RangeSse42.h \
81         detail/Sleeper.h \
82         detail/SlowFingerprint.h \
83         detail/SocketFastOpen.h \
84         detail/StaticSingletonManager.h \
85         detail/Stats.h \
86         detail/ThreadLocalDetail.h \
87         detail/TryDetail.h \
88         detail/TurnSequencer.h \
89         detail/UncaughtExceptionCounter.h \
90         Demangle.h \
91         DiscriminatedPtr.h \
92         DynamicConverter.h \
93         dynamic.h \
94         dynamic-inl.h \
95         Enumerate.h \
96         EvictingCacheMap.h \
97         Exception.h \
98         ExceptionString.h \
99         ExceptionWrapper.h \
100         ExceptionWrapper-inl.h \
101         Executor.h \
102         Expected.h \
103         experimental/AsymmetricMemoryBarrier.h \
104         experimental/AtomicSharedPtr.h \
105         experimental/detail/AtomicSharedPtr-detail.h \
106         experimental/AutoTimer.h \
107         experimental/Bits.h \
108         experimental/BitVectorCoding.h \
109         experimental/DynamicParser.h \
110         experimental/DynamicParser-inl.h \
111         experimental/ExecutionObserver.h \
112         experimental/EliasFanoCoding.h \
113         experimental/EnvUtil.h \
114         experimental/EventCount.h \
115         experimental/Instructions.h \
116         experimental/bser/Bser.h \
117         experimental/exception_tracer/ExceptionAbi.h \
118         experimental/exception_tracer/ExceptionCounterLib.h \
119         experimental/exception_tracer/ExceptionTracer.h \
120         experimental/exception_tracer/ExceptionTracerLib.h \
121         experimental/exception_tracer/StackTrace.h \
122         experimental/FunctionScheduler.h \
123         experimental/FutureDAG.h \
124         experimental/io/FsUtil.h \
125         experimental/JemallocNodumpAllocator.h \
126         experimental/JSONSchema.h \
127         experimental/LockFreeRingBuffer.h \
128         experimental/NestedCommandLineApp.h \
129         experimental/observer/detail/Core.h \
130         experimental/observer/detail/GraphCycleDetector.h \
131         experimental/observer/detail/ObserverManager.h \
132         experimental/observer/detail/Observer-pre.h \
133         experimental/observer/Observable.h \
134         experimental/observer/Observable-inl.h \
135         experimental/observer/Observer.h \
136         experimental/observer/Observer-inl.h \
137         experimental/observer/SimpleObservable.h \
138         experimental/observer/SimpleObservable-inl.h \
139         experimental/ProgramOptions.h \
140         experimental/ReadMostlySharedPtr.h \
141         experimental/symbolizer/Elf.h \
142         experimental/symbolizer/Elf-inl.h \
143         experimental/symbolizer/ElfCache.h \
144         experimental/symbolizer/Dwarf.h \
145         experimental/symbolizer/LineReader.h \
146         experimental/symbolizer/SignalHandler.h \
147         experimental/symbolizer/StackTrace.h \
148         experimental/symbolizer/Symbolizer.h \
149         experimental/Select64.h \
150         experimental/StringKeyedCommon.h \
151         experimental/StringKeyedMap.h \
152         experimental/StringKeyedSet.h \
153         experimental/StringKeyedUnorderedMap.h \
154         experimental/StringKeyedUnorderedSet.h \
155         experimental/TestUtil.h \
156         experimental/TLRefCount.h \
157         experimental/TupleOps.h \
158         FBString.h \
159         FBVector.h \
160         File.h \
161         FileUtil.h \
162         Fingerprint.h \
163         FixedString.h \
164         folly-config.h \
165         Foreach.h \
166         FormatArg.h \
167         FormatTraits.h \
168         Format.h \
169         Format-inl.h \
170         futures/Barrier.h \
171         futures/DrivableExecutor.h \
172         futures/Future-pre.h \
173         futures/helpers.h \
174         futures/Future.h \
175         futures/Future-inl.h \
176         futures/FutureException.h \
177         futures/FutureSplitter.h \
178         futures/InlineExecutor.h \
179         futures/ManualExecutor.h \
180         futures/OpaqueCallbackShunt.h \
181         futures/Promise-inl.h \
182         futures/Promise.h \
183         futures/QueuedImmediateExecutor.h \
184         futures/ScheduledExecutor.h \
185         futures/SharedPromise.h \
186         futures/SharedPromise-inl.h \
187         futures/ThreadWheelTimekeeper.h \
188         futures/Timekeeper.h \
189         futures/detail/Core.h \
190         futures/detail/FSM.h \
191         futures/detail/Types.h \
192         futures/test/TestExecutor.h \
193         gen/Base.h \
194         gen/Base-inl.h \
195         gen/Combine.h \
196         gen/Combine-inl.h \
197         gen/Core.h \
198         gen/Core-inl.h \
199         gen/File.h \
200         gen/File-inl.h \
201         gen/Parallel.h \
202         gen/Parallel-inl.h \
203         gen/ParallelMap.h \
204         gen/ParallelMap-inl.h \
205         gen/String.h \
206         gen/String-inl.h \
207         GroupVarint.h \
208         Hash.h \
209         IPAddress.h \
210         IPAddressV4.h \
211         IPAddressV6.h \
212         IPAddressException.h \
213         Indestructible.h \
214         IndexedMemPool.h \
215         init/Init.h \
216         IntrusiveList.h \
217         io/Compression.h \
218         io/Cursor.h \
219         io/Cursor-inl.h \
220         io/IOBuf.h \
221         io/IOBufQueue.h \
222         io/RecordIO.h \
223         io/RecordIO-inl.h \
224         io/TypedIOBuf.h \
225         io/ShutdownSocketSet.h \
226         io/async/AsyncPipe.h \
227         io/async/AsyncTimeout.h \
228         io/async/AsyncTransport.h \
229         io/async/AsyncUDPServerSocket.h \
230         io/async/AsyncUDPSocket.h \
231         io/async/AsyncServerSocket.h \
232         io/async/AsyncSignalHandler.h \
233         io/async/AsyncSocket.h \
234         io/async/AsyncSocketBase.h \
235         io/async/AsyncSSLSocket.h \
236         io/async/AsyncSocketException.h \
237         io/async/DecoratedAsyncTransportWrapper.h \
238         io/async/DelayedDestructionBase.h \
239         io/async/DelayedDestruction.h \
240         io/async/EventBase.h \
241         io/async/EventBaseLocal.h \
242         io/async/EventBaseManager.h \
243         io/async/EventBaseThread.h \
244         io/async/EventFDWrapper.h \
245         io/async/EventHandler.h \
246         io/async/EventUtil.h \
247         io/async/NotificationQueue.h \
248         io/async/HHWheelTimer.h \
249         io/async/ssl/OpenSSLPtrTypes.h \
250         io/async/ssl/OpenSSLUtils.h \
251         io/async/ssl/SSLErrors.h \
252         io/async/ssl/TLSDefinitions.h \
253         io/async/Request.h \
254         io/async/SSLContext.h \
255         io/async/ScopedEventBaseThread.h \
256         io/async/TimeoutManager.h \
257         io/async/VirtualEventBase.h \
258         io/async/WriteChainAsyncTransportWrapper.h \
259         io/async/test/AsyncSSLSocketTest.h \
260         io/async/test/AsyncSocketTest2.h \
261         io/async/test/BlockingSocket.h \
262         io/async/test/MockAsyncSocket.h \
263         io/async/test/MockAsyncServerSocket.h \
264         io/async/test/MockAsyncSSLSocket.h \
265         io/async/test/MockAsyncTransport.h \
266         io/async/test/MockAsyncUDPSocket.h \
267         io/async/test/MockTimeoutManager.h \
268         io/async/test/ScopedBoundPort.h \
269         io/async/test/SocketPair.h \
270         io/async/test/TestSSLServer.h \
271         io/async/test/TimeUtil.h \
272         io/async/test/UndelayedDestruction.h \
273         io/async/test/Util.h \
274         json.h \
275         Lazy.h \
276         LifoSem.h \
277         Likely.h \
278         LockTraits.h \
279         LockTraitsBoost.h \
280         Logging.h \
281         MacAddress.h \
282         MallctlHelper.h \
283         Malloc.h \
284         MapUtil.h \
285         Math.h \
286         Memory.h \
287         MemoryMapping.h \
288         MicroSpinLock.h \
289         MicroLock.h \
290         MoveWrapper.h \
291         MPMCPipeline.h \
292         MPMCQueue.h \
293         Optional.h \
294         PackedSyncPtr.h \
295         Padded.h \
296         Partial.h \
297         PicoSpinLock.h \
298         Portability.h \
299         portability/Asm.h \
300         portability/Atomic.h \
301         portability/BitsFunctexcept.h \
302         portability/Builtins.h \
303         portability/Config.h \
304         portability/Constexpr.h \
305         portability/Dirent.h \
306         portability/Event.h \
307         portability/Fcntl.h \
308         portability/GFlags.h \
309         portability/GMock.h \
310         portability/GTest.h \
311         portability/IOVec.h \
312         portability/Libgen.h \
313         portability/Malloc.h \
314         portability/Math.h \
315         portability/Memory.h \
316         portability/OpenSSL.h \
317         portability/PThread.h \
318         portability/Sockets.h \
319         portability/Stdio.h \
320         portability/Stdlib.h \
321         portability/String.h \
322         portability/Syslog.h \
323         portability/SysFile.h \
324         portability/SysMembarrier.h \
325         portability/SysMman.h \
326         portability/SysResource.h \
327         portability/SysStat.h \
328         portability/SysSyscall.h \
329         portability/SysTime.h \
330         portability/SysTypes.h \
331         portability/SysUio.h \
332         portability/Time.h \
333         portability/TypeTraits.h \
334         portability/Windows.h \
335         portability/Unistd.h \
336         Preprocessor.h \
337         PriorityMPMCQueue.h \
338         ProducerConsumerQueue.h \
339         Random.h \
340         Random-inl.h \
341         Range.h \
342         RWSpinLock.h \
343         SafeAssert.h \
344         ScopeGuard.h \
345         SharedMutex.h \
346         Shell.h \
347         Singleton.h \
348         Singleton-inl.h \
349         SingletonThreadLocal.h \
350         SmallLocks.h \
351         small_vector.h \
352         SocketAddress.h \
353         sorted_vector_types.h \
354         SparseByteSet.h \
355         SpinLock.h \
356         SpookyHashV1.h \
357         SpookyHashV2.h \
358         ssl/OpenSSLCertUtils.h \
359         ssl/OpenSSLHash.h \
360         ssl/OpenSSLVersionFinder.h \
361         ssl/SSLSession.h \
362         ssl/detail/SSLSessionImpl.h \
363         stats/BucketedTimeSeries-defs.h \
364         stats/BucketedTimeSeries.h \
365         stats/Histogram-defs.h \
366         stats/Histogram.h \
367         stats/MultiLevelTimeSeries-defs.h \
368         stats/MultiLevelTimeSeries.h \
369         stats/TimeseriesHistogram-defs.h \
370         stats/TimeseriesHistogram.h \
371         stop_watch.h \
372         String.h \
373         String-inl.h \
374         Subprocess.h \
375         Synchronized.h \
376         test/FBStringTestBenchmarks.cpp.h \
377         test/FBVectorTestBenchmarks.cpp.h \
378         test/function_benchmark/benchmark_impl.h \
379         test/function_benchmark/test_functions.h \
380         test/SynchronizedTestLib.h \
381         test/SynchronizedTestLib-inl.h \
382         test/TestUtils.h \
383         ThreadCachedArena.h \
384         ThreadCachedInt.h \
385         ThreadId.h \
386         ThreadLocal.h \
387         ThreadName.h \
388         TimeoutQueue.h \
389         TokenBucket.h \
390         tracing/StaticTracepoint.h \
391         Traits.h \
392         Try-inl.h \
393         Try.h \
394         Unicode.h \
395         Function.h \
396         UncaughtExceptions.h \
397         Unit.h \
398         Uri.h \
399         Uri-inl.h \
400         Utility.h \
401         Varint.h \
402         VersionCheck.h
403
404 FormatTables.cpp: build/generate_format_tables.py
405         $(PYTHON) build/generate_format_tables.py
406 CLEANFILES += FormatTables.cpp
407
408 EscapeTables.cpp: build/generate_escape_tables.py
409         $(PYTHON) build/generate_escape_tables.py
410 CLEANFILES += EscapeTables.cpp
411
412 GroupVarintTables.cpp: build/generate_varint_tables.py
413         $(PYTHON) build/generate_varint_tables.py
414 CLEANFILES += GroupVarintTables.cpp
415
416 libfollybasesse42_la_SOURCES = \
417         detail/RangeSse42.cpp
418
419 libfollybase_la_SOURCES = \
420         Conv.cpp \
421         Demangle.cpp \
422         detail/RangeCommon.cpp \
423         EscapeTables.cpp \
424         Format.cpp \
425         FormatTables.cpp \
426         MallctlHelper.cpp \
427         portability/BitsFunctexcept.cpp \
428         StringBase.cpp \
429         String.cpp \
430         Unicode.cpp
431
432 libfolly_la_SOURCES = \
433         Assume.cpp \
434         Bits.cpp \
435         Checksum.cpp \
436         ClockGettimeWrappers.cpp \
437         detail/CacheLocality.cpp \
438         detail/IPAddress.cpp \
439         dynamic.cpp \
440         ExceptionWrapper.cpp \
441         Executor.cpp \
442         File.cpp \
443         FileUtil.cpp \
444         FingerprintTables.cpp \
445         futures/Barrier.cpp \
446         futures/Future.cpp \
447         futures/InlineExecutor.cpp \
448         futures/ManualExecutor.cpp \
449         futures/QueuedImmediateExecutor.cpp \
450         futures/ThreadWheelTimekeeper.cpp \
451         futures/test/TestExecutor.cpp \
452         detail/Futex.cpp \
453         detail/StaticSingletonManager.cpp \
454         detail/ThreadLocalDetail.cpp \
455         GroupVarint.cpp \
456         GroupVarintTables.cpp \
457         IPAddress.cpp \
458         IPAddressV4.cpp \
459         IPAddressV6.cpp \
460         LifoSem.cpp \
461         init/Init.cpp \
462         io/Compression.cpp \
463         io/Cursor.cpp \
464         io/IOBuf.cpp \
465         io/IOBufQueue.cpp \
466         io/RecordIO.cpp \
467         io/ShutdownSocketSet.cpp \
468         io/async/AsyncPipe.cpp \
469         io/async/AsyncTimeout.cpp \
470         io/async/AsyncUDPSocket.cpp \
471         io/async/AsyncServerSocket.cpp \
472         io/async/AsyncSignalHandler.cpp \
473         io/async/AsyncSocket.cpp \
474         io/async/AsyncSSLSocket.cpp \
475         io/async/EventBase.cpp \
476         io/async/EventBaseLocal.cpp \
477         io/async/EventBaseManager.cpp \
478         io/async/EventBaseThread.cpp \
479         io/async/EventHandler.cpp \
480         io/async/Request.cpp \
481         io/async/SSLContext.cpp \
482         io/async/ScopedEventBaseThread.cpp \
483         io/async/VirtualEventBase.cpp \
484         io/async/HHWheelTimer.cpp \
485         io/async/TimeoutManager.cpp \
486         io/async/test/ScopedBoundPort.cpp \
487         io/async/test/SocketPair.cpp \
488         io/async/test/TimeUtil.cpp \
489         io/async/ssl/OpenSSLUtils.cpp \
490         io/async/ssl/SSLErrors.cpp \
491         json.cpp \
492         detail/MemoryIdler.cpp \
493         detail/SocketFastOpen.cpp \
494         MacAddress.cpp \
495         MemoryMapping.cpp \
496         portability/Dirent.cpp \
497         portability/Fcntl.cpp \
498         portability/Libgen.cpp \
499         portability/Malloc.cpp \
500         portability/Memory.cpp \
501         portability/OpenSSL.cpp \
502         portability/PThread.cpp \
503         portability/Sockets.cpp \
504         portability/Stdio.cpp \
505         portability/Stdlib.cpp \
506         portability/String.cpp \
507         portability/SysFile.cpp \
508         portability/SysMembarrier.cpp \
509         portability/SysMman.cpp \
510         portability/SysResource.cpp \
511         portability/SysStat.cpp \
512         portability/SysTime.cpp \
513         portability/SysUio.cpp \
514         portability/Time.cpp \
515         portability/Unistd.cpp \
516         Random.cpp \
517         SafeAssert.cpp \
518         ScopeGuard.cpp \
519         SharedMutex.cpp \
520         Shell.cpp \
521         MicroLock.cpp \
522         Singleton.cpp \
523         SocketAddress.cpp \
524         SpookyHashV1.cpp \
525         SpookyHashV2.cpp \
526         ssl/OpenSSLCertUtils.cpp \
527         ssl/OpenSSLHash.cpp \
528         ssl/detail/SSLSessionImpl.cpp \
529         stats/Instantiations.cpp \
530         Subprocess.cpp \
531         ThreadCachedArena.cpp \
532         ThreadName.cpp \
533         TimeoutQueue.cpp \
534         Uri.cpp \
535         Version.cpp \
536         experimental/AsymmetricMemoryBarrier.cpp \
537         experimental/bser/Dump.cpp \
538         experimental/bser/Load.cpp \
539         experimental/DynamicParser.cpp \
540         experimental/EnvUtil.cpp \
541         experimental/FunctionScheduler.cpp \
542         experimental/io/FsUtil.cpp \
543         experimental/JemallocNodumpAllocator.cpp \
544         experimental/JSONSchema.cpp \
545         experimental/NestedCommandLineApp.cpp \
546         experimental/observer/detail/Core.cpp \
547         experimental/observer/detail/ObserverManager.cpp \
548         experimental/ProgramOptions.cpp \
549         experimental/Select64.cpp \
550         experimental/TestUtil.cpp
551
552 if HAVE_LINUX
553 nobase_follyinclude_HEADERS += \
554         experimental/io/HugePages.h
555 libfolly_la_SOURCES += \
556         experimental/io/HugePages.cpp
557 endif
558
559 if !HAVE_WEAK_SYMBOLS
560 libfollybase_la_SOURCES += detail/MallocImpl.cpp
561 endif
562
563 if HAVE_BOOST_CONTEXT
564 nobase_follyinclude_HEADERS += \
565         fibers/AddTasks.h \
566         fibers/AddTasks-inl.h \
567         fibers/AtomicBatchDispatcher.h \
568         fibers/AtomicBatchDispatcher-inl.h \
569         fibers/Baton.h \
570         fibers/Baton-inl.h \
571         fibers/BatchDispatcher.h \
572         fibers/BoostContextCompatibility.h \
573         fibers/detail/AtomicBatchDispatcher.h \
574         fibers/EventBaseLoopController.h \
575         fibers/EventBaseLoopController-inl.h \
576         fibers/Fiber.h \
577         fibers/Fiber-inl.h \
578         fibers/FiberManager.h \
579         fibers/FiberManager-inl.h \
580         fibers/FiberManagerInternal.h \
581         fibers/FiberManagerInternal-inl.h \
582         fibers/FiberManagerMap.h \
583         fibers/ForEach.h \
584         fibers/ForEach-inl.h \
585         fibers/GenericBaton.h \
586         fibers/GuardPageAllocator.h \
587         fibers/LoopController.h \
588         fibers/Promise.h \
589         fibers/Promise-inl.h \
590         fibers/Semaphore.h \
591         fibers/SimpleLoopController.h \
592         fibers/TimedMutex.h \
593         fibers/TimedMutex-inl.h \
594         fibers/TimeoutController.h \
595         fibers/traits.h \
596         fibers/WhenN.h \
597         fibers/WhenN-inl.h
598
599 libfolly_la_SOURCES += \
600         fibers/Baton.cpp \
601         fibers/detail/AtomicBatchDispatcher.cpp \
602         fibers/Fiber.cpp \
603         fibers/FiberManager.cpp \
604         fibers/FiberManagerMap.cpp \
605         fibers/GuardPageAllocator.cpp \
606         fibers/Semaphore.cpp \
607         fibers/TimeoutController.cpp
608 endif
609
610 libfollybasesse42_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
611 libfollybasesse42_la_CXXFLAGS = -msse4.2
612
613 libfollybase_la_LIBADD = libfollybasesse42.la
614 libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
615
616 libfolly_la_LIBADD = libfollybase.la
617 libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
618
619 FingerprintTables.cpp: generate_fingerprint_tables
620         ./generate_fingerprint_tables
621 CLEANFILES += FingerprintTables.cpp
622
623 libfollybenchmark_la_SOURCES = Benchmark.cpp
624 libfollybenchmark_la_LIBADD = libfolly.la
625 libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
626
627 # install pkg-config metadata file
628 pkgconfigdir = $(libdir)/pkgconfig
629 nodist_pkgconfig_DATA = libfolly.pc