@@ -51,21 +51,23 @@ def _maybe_macos(flags):
51
51
)
52
52
53
53
54
+ if sys .platform == 'win32' :
55
+ extra_link_args = []
56
+ elif platform .system () in {'Darwin' , 'FreeBSD' }:
57
+ extra_link_args = ['-fPIC' , '-lc++' ]
58
+ else :
59
+ extra_link_args = ['-fPIC' , '-lstdc++' ]
60
+
54
61
if system_sass :
55
62
flags = [
56
63
'-fPIC' , '-std=gnu++0x' , '-Wall' , '-Wno-parentheses' , '-Werror=switch' ,
57
64
]
58
65
_maybe_clang (flags )
59
66
_maybe_macos (flags )
60
67
61
- if platform .system () == 'FreeBSD' :
62
- link_flags = ['-fPIC' , '-lc++' ]
63
- else :
64
- link_flags = ['-fPIC' , '-lstdc++' ]
65
68
libraries = ['sass' ]
66
69
include_dirs = []
67
70
extra_compile_args = flags
68
- extra_link_args = link_flags
69
71
else :
70
72
LIBSASS_SOURCE_DIR = os .path .join ('libsass' , 'src' )
71
73
@@ -136,7 +138,6 @@ def _maybe_macos(flags):
136
138
msvc9compiler .get_build_version = lambda : 14.0
137
139
msvc9compiler .VERSION = 14.0
138
140
flags = ['/Od' , '/EHsc' , '/MT' ]
139
- link_flags = []
140
141
else :
141
142
flags = [
142
143
'-fPIC' , '-std=gnu++0x' , '-Wall' ,
@@ -172,23 +173,17 @@ def restore_cencode():
172
173
with open (cencode_path , 'w' ) as f :
173
174
f .write (cencode_body )
174
175
175
- if platform .system () == 'FreeBSD' :
176
- link_flags = ['-fPIC' , '-lc++' ]
177
- else :
178
- link_flags = ['-fPIC' , '-lstdc++' ]
179
-
180
176
libraries = []
181
177
include_dirs = [os .path .join ('.' , 'libsass' , 'include' )]
182
178
extra_compile_args = flags + [version_define ]
183
- extra_link_args = link_flags
184
179
185
180
sass_extension = Extension (
186
181
'_sass' ,
187
182
sorted (sources ),
188
183
include_dirs = include_dirs ,
189
184
depends = headers ,
190
185
extra_compile_args = extra_compile_args ,
191
- extra_link_args = link_flags ,
186
+ extra_link_args = extra_link_args ,
192
187
libraries = libraries ,
193
188
)
194
189
0 commit comments