winebuild: Refactor find_tool().

This commit is contained in:
Brendan Shanks 2024-01-30 10:39:59 -08:00 committed by Alexandre Julliard
parent b1ab51b508
commit d292c7ec74

View file

@ -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 );