Module: wine Branch: master Commit: d292c7ec74a88b2de46dcde8ca89ab93a41bc1ea URL: https://gitlab.winehq.org/wine/wine/-/commit/d292c7ec74a88b2de46dcde8ca89ab9...
Author: Brendan Shanks bshanks@codeweavers.com Date: Tue Jan 30 10:39:59 2024 -0800
winebuild: Refactor find_tool().
---
tools/winebuild/utils.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 5e0e2194f10..8d7c4c9afc2 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -244,12 +244,10 @@ struct strarray find_tool( const char *name, const char * const *names ) names++; }
- if (!file) - { - if (cc_command.count) file = find_clang_tool( cc_command, name ); - if (!file && !(file = find_binary( "llvm", name ))) - file = find_clang_tool( empty_strarray, strmake( "llvm-%s", name )); - } + if (!file && cc_command.count) file = find_clang_tool( cc_command, name ); + if (!file) file = find_binary( "llvm", name ); + if (!file) file = find_clang_tool( empty_strarray, strmake( "llvm-%s", name )); + if (!file) fatal_error( "cannot find the '%s' tool\n", name );
strarray_add( &ret, file );