s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disco...
[Samba/gebeck_regimport.git] / buildtools / wafadmin / Tools / gdc.py
blob4d2a3216edd5a11cb9830a67b593968d0f82b6cb
1 #!/usr/bin/env python
2 # encoding: utf-8
3 # Carlos Rafael Giani, 2007 (dv)
5 import sys
6 import Utils, ar
7 from Configure import conftest
9 @conftest
10 def find_gdc(conf):
11 conf.find_program('gdc', var='D_COMPILER', mandatory=True)
13 @conftest
14 def common_flags_gdc(conf):
15 v = conf.env
17 # _DFLAGS _DIMPORTFLAGS
19 # for mory info about the meaning of this dict see dmd.py
20 v['DFLAGS'] = []
22 v['D_SRC_F'] = ''
23 v['D_TGT_F'] = ['-c', '-o', '']
24 v['DPATH_ST'] = '-I%s' # template for adding import paths
26 # linker
27 v['D_LINKER'] = v['D_COMPILER']
28 v['DLNK_SRC_F'] = ''
29 v['DLNK_TGT_F'] = ['-o', '']
31 v['DLIB_ST'] = '-l%s' # template for adding libs
32 v['DLIBPATH_ST'] = '-L%s' # template for adding libpaths
34 # debug levels
35 v['DLINKFLAGS'] = []
36 v['DFLAGS_OPTIMIZED'] = ['-O3']
37 v['DFLAGS_DEBUG'] = ['-O0']
38 v['DFLAGS_ULTRADEBUG'] = ['-O0']
40 v['D_shlib_DFLAGS'] = []
41 v['D_shlib_LINKFLAGS'] = ['-shared']
43 v['DHEADER_ext'] = '.di'
44 v['D_HDR_F'] = '-fintfc -fintfc-file='
46 def detect(conf):
47 conf.find_gdc()
48 conf.check_tool('ar')
49 conf.check_tool('d')
50 conf.common_flags_gdc()
51 conf.d_platform_flags()