3 # Thomas Nagy, 2016-2018 (ita)
5 from waflib import Utils
6 from waflib.Configure import conf
9 def d_platform_flags(self):
11 Sets the extensions dll/so for d programs and libraries
15 v.DEST_OS = Utils.unversioned_sys_platform()
16 binfmt = Utils.destos_to_binfmt(self.env.DEST_OS)
18 v.dprogram_PATTERN = '%s.exe'
19 v.dshlib_PATTERN = 'lib%s.dll'
20 v.dstlib_PATTERN = 'lib%s.a'
21 elif binfmt == 'mac-o':
22 v.dprogram_PATTERN = '%s'
23 v.dshlib_PATTERN = 'lib%s.dylib'
24 v.dstlib_PATTERN = 'lib%s.a'
26 v.dprogram_PATTERN = '%s'
27 v.dshlib_PATTERN = 'lib%s.so'
28 v.dstlib_PATTERN = 'lib%s.a'
39 import tango.stdc.stdio;
53 """Detection string for the D standard library"""
56 def check_dlibrary(self, execute=True):
58 Detects the kind of standard library that comes with the compiler,
59 and sets conf.env.DLIBRARY to tango, phobos1 or phobos2
61 ret = self.check_cc(features='d dprogram', fragment=DLIB, compile_filename='test.d', execute=execute, define_ret=True)
63 self.env.DLIBRARY = ret.strip()