3 # Alex Rønne Petersen, 2012 (alexrp/Zor)
5 from waflib.Tools import ar, d
6 from waflib.Configure import conf
11 Finds the program *ldc2* and set the variable *D*
13 conf.find_program(['ldc2'], var='D')
15 out = conf.cmd_and_log(conf.env.D + ['-version'])
16 if out.find("based on DMD v2.") == -1:
17 conf.fatal("detected compiler is not ldc2")
20 def common_flags_ldc2(conf):
22 Sets the D flags required by *ldc2*
31 v.DLNK_TGT_F = '-of%s'
34 v.DSHLIB_MARKER = v.DSTLIB_MARKER = ''
35 v.DSTLIB_ST = v.DSHLIB_ST = '-L-l%s'
36 v.DSTLIBPATH_ST = v.DLIBPATH_ST = '-L-L%s'
38 v.LINKFLAGS_dshlib = ['-L-shared']
41 v.DFLAGS_d_with_header = ['-H', '-Hf']
45 v.DFLAGS_dshlib = ['-relocation-model=pic']
49 Configuration for *ldc2*
54 conf.common_flags_ldc2()
55 conf.d_platform_flags()