Debian Codegraph @

rpython/translator/platform/cygwin.py

raw symbols SCIP
1 """Support for Cygwin."""
2
3 import os
4 import sys
5 from rpython.translator.platform.posix import BasePosix
6
7 class BaseCygwin(BasePosix):
8 name = "cygwin"
9
10 # link_flags = tuple(
11 # ['-pthread',]
12 # + os.environ.get('LDFLAGS', '').split())
13 link_flags = tuple(
14 []
15 + os.environ.get('LDFLAGS', '').split())
16 extra_libs = ('-lrt',)
17 # cflags = tuple(
18 # ['-O3', '-pthread', '-fomit-frame-pointer',
19 # '-Wall', '-Wno-unused']
20 # + os.environ.get('CFLAGS', '').split())
21 cflags = tuple(
22 ['-O3', '-fomit-frame-pointer',
23 '-Wall', '-Wno-unused']
24 + os.environ.get('CFLAGS', '').split())
25 standalone_only = ()
26 shared_only = ('-fPIC',)
27 so_ext = 'dll'
28 exe_ext = 'exe'
29
30 def _args_for_shared(self, args, **kwds):
31 return ['-shared'] + args
32
33 def _include_dirs_for_libffi(self):
34 return self._pkg_config("libffi", "--cflags-only-I",
35 ['/usr/include/libffi'])
36
37 def _library_dirs_for_libffi(self):
38 return self._pkg_config("libffi", "--libs-only-L",
39 ['/usr/lib/libffi'])
40
41
42 class Cygwin(BaseCygwin):
43 shared_only = () # it seems that on 32-bit linux, compiling with -fPIC
44 # gives assembler that asmgcc is not happy about.
45
46 class Cygwin64(BaseCygwin):
47 pass