-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathmormot.uses.inc
49 lines (39 loc) · 1.5 KB
/
mormot.uses.inc
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
{
This file is a part of the Open Source Synopse mORMot framework 2,
licensed under a MPL/GPL/LGPL three license - see LICENSE.md
Content of this file should be part of the .dpr/.lpr main uses clauses,
to ensure proper cross-platform process.
}
{$ifdef FPC} // we may be on Delphi for Linux
// setup the expected memory manager
{$ifdef CPUX64} // our x86_64 asm MM
{$ifdef FPC_X64MM}
mormot.core.fpcx64mm, // redirect to our optimized x86_64 asm Memory Manager
{$undef FPC_LIBCMM} // no fpclibcmm
{$endif FPC_X64MM}
{$endif CPUX64}
{$ifdef FPC_LIBCMM} // libc MM
{$ifdef LINUX}
mormot.core.fpclibcmm, // redirect to libc memory manager on LINUX
{$else}
cmem, // missing malloc_usable_size(): need size prefix
{$endif LINUX}
{$endif FPC_LIBCMM}
// setup the libc threads on POSIX
{$ifdef UNIX} // we may also be on Darwin / OSX
cthreads, // if you use threads: always needed for servers
{$endif UNIX}
// optional WideString manager: cwstring (or iosxwstr for Mac/Darwin)
{$else}
// enable FastMM4 on oldest versions of Delphi
{$ifdef CONDITIONALEXPRESSIONS}
{$if CompilerVersion <= 17} // Delphi 2006 (and up) have FastMM4 integrated
FastMM4,
{$ifend}
{$ifdef UNICODE}
{$warn DUPLICATE_CTOR_DTOR OFF} // global at .dpr level - see QC 100815
{$endif UNICODE}
{$else}
'Delphi 2-5 are not supported'
{$endif CONDITIONALEXPRESSIONS}
{$endif FPC}