blob: 25b99e5380dc07a6507b347d29cd115999554ea2 [file] [log] [blame]
akmhoquefa8ee9b2014-03-14 09:06:24 -05001#! /usr/bin/env python
2# encoding: utf-8
3# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
5import sys
6from waflib.Tools import ar,d
7from waflib.Configure import conf
8@conf
9def find_ldc2(conf):
10 conf.find_program(['ldc2'],var='D')
11 out=conf.cmd_and_log([conf.env.D,'-version'])
12 if out.find("based on DMD v2.")==-1:
13 conf.fatal("detected compiler is not ldc2")
14@conf
15def common_flags_ldc2(conf):
16 v=conf.env
17 v['D_SRC_F']=['-c']
18 v['D_TGT_F']='-of%s'
19 v['D_LINKER']=v['D']
20 v['DLNK_SRC_F']=''
21 v['DLNK_TGT_F']='-of%s'
22 v['DINC_ST']='-I%s'
23 v['DSHLIB_MARKER']=v['DSTLIB_MARKER']=''
24 v['DSTLIB_ST']=v['DSHLIB_ST']='-L-l%s'
25 v['DSTLIBPATH_ST']=v['DLIBPATH_ST']='-L-L%s'
26 v['LINKFLAGS_dshlib']=['-L-shared']
27 v['DHEADER_ext']='.di'
28 v['DFLAGS_d_with_header']=['-H','-Hf']
29 v['D_HDR_F']='%s'
30 v['LINKFLAGS']=[]
31 v['DFLAGS_dshlib']=['-relocation-model=pic']
32def configure(conf):
33 conf.find_ldc2()
34 conf.load('ar')
35 conf.load('d')
36 conf.common_flags_ldc2()
37 conf.d_platform_flags()