Building swift in Ubuntu saying clang isn't installed (even though it is)

I'm trying to build Swift from source using clang I also built, but the build script fails with the message:

ERROR: can't find clang (please install clang-3.5 or a later version)

Even though the build script correctly identifies clang compilers in the beginning of the build process:

C compiler on this system is: /home/augusto/Developer/llvm/build/bin/clang       
C++ compiler on this system is: /home/augusto/Developer/llvm/build/bin/clang++          

Do I have to pass any other flags so it correctly identifies my version of clang?

How are you selecting this locally built clang now, simply adding it to your PATH?

C compiler on this system is:

This is not a build-script message, but a CMake message before building CMake at the version Swift wants, as can be seen on the linux CI:

cmake --version
+ /home/build-user/cmake/bootstrap --no-qt-gui -- -DCMAKE_USE_OPENSSL=OFF
---------------------------------------------
CMake 3.19.6, Copyright 2000-2020 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc   
C++ compiler on this system is: g++    
Makefile processor on this system is: make

It doesn't imply anything for the Swift build-script finding your local clang.

You'll want to add your clang directory to your PATH or specify --host-cc and --host-cxx, if you want to build the Swift compiler with your clang. If you want to build the stdlib, corelibs, and other Swift tools with your clang also, there are other flags for that.