From 3ce2cf937e3a5251ba7cb68c810883878c7917a9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 16 Oct 2023 21:15:25 +0200 Subject: [PATCH] Revert "wscript: drop unnecessary str() on configure variables" This reverts commit 615326be9b3ead774c8e399ffaa0879c1d8268ef 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 ``` --- libs/ardour/wscript | 2 +- libs/evoral/wscript | 2 +- wscript | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/ardour/wscript b/libs/ardour/wscript index a23657c49d..8d8cb5bf0e 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -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' ] diff --git a/libs/evoral/wscript b/libs/evoral/wscript index feef41f2ff..0f8e10b88d 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -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): diff --git a/wscript b/wscript index b64efdb391..3db6ebf626 100644 --- a/wscript +++ b/wscript @@ -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)")