13
0

Revert "wscript: drop unnecessary str() on configure variables"

This reverts commit 615326be9b because it
breaks windows builds.

```
File "/home/ardour/ardour-w64/wscript", line 1462, in configure
  set_compiler_flags (conf, Options.options)
File "/home/ardour/ardour-w64/wscript", line 522, in set_compiler_flags
  if re.search ('x86_64-w64', conf.env['CC']) is not None:
File "/usr/lib/python2.7/re.py", line 146, in search
  return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
```
This commit is contained in:
Robin Gareus 2023-10-16 21:15:25 +02:00
parent 1f7abff38b
commit 3ce2cf937e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 4 additions and 4 deletions

View File

@ -488,7 +488,7 @@ def build(bld):
# 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-w64', bld.env['CC']):
if re.search ('x86_64-w64', str(bld.env['CC'])):
obj.source += [ 'sse_functions_xmm.cc' ]
obj.source += [ 'sse_functions_64bit_win.s', 'sse_avx_functions_64bit_win.s' ]
avx_sources = [ 'sse_functions_avx.cc' ]

View File

@ -35,7 +35,7 @@ def configure(conf):
if Options.options.internal_shared_libs:
conf.define('INTERNAL_SHARED_LIBS', 1)
#autowaf.display_msg(conf, "Unit tests", conf.env['BUILD_TESTS'])
#autowaf.display_msg(conf, "Unit tests", str(conf.env['BUILD_TESTS']))
#print
def build(bld):

View File

@ -519,7 +519,7 @@ int main() { return 0; }''',
if conf.env['build_target'] == 'armhf' or conf.env['build_target'] == 'aarch64':
conf.define('ARM_NEON_SUPPORT', 1)
elif conf.env['build_target'] == 'mingw':
if re.search ('x86_64-w64', conf.env['CC']) is not None:
if re.search ('x86_64-w64', str(conf.env['CC'])) is not None:
conf.define ('FPU_AVX_FMA_SUPPORT', 1)
conf.define ('FPU_AVX512F_SUPPORT', 1)
elif conf.env['build_target'] == 'i386' or conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
@ -635,7 +635,7 @@ int main() { return 0; }''',
# 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-w64', conf.env['CC']) is not None:
if re.search ('x86_64-w64', str(conf.env['CC'])) is not None:
compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
if not build_host_supports_sse:
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")