use compiler target to determine whether to use 64 bit windows assembler, not the...
[ardour.git] / libs / ardour / wscript
index 6026816bcb1207b4f9c7b1ceab8fc5da87fca573..ac5dc1850393fe13e1aba66366f2a2a85c397a54 100644 (file)
@@ -408,13 +408,12 @@ def build(bld):
             obj.source += [ 'sse_functions_xmm.cc', 'sse_functions.s' ]
         elif bld.env['build_target'] == 'x86_64':
             obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit.s' ]
-        
-        if bld.env['build_target'] == 'mingw':
-                import platform as PLATFORM
-                u = PLATFORM.uname ()
-                cpu = u[4]
-                if re.search ("(x86_64|AMD64)", cpu) != None:
-                        obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit_win.s' ]
+        elif bld.env['build_target'] == 'mingw':
+               # usability of the 64 bit windows assembler depends on the compiler target,
+               # not the build host, which in turn can only be inferred from the name
+               # of the compiler. 
+               if re.search ('/x86_64/', str(conf.env['CC'])):
+                       obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit_win.s' ]
 
     # i18n
     if bld.is_defined('ENABLE_NLS'):