Defining CMake variables from the command-line or from another CMake project,
such as `-DCMAKE_C_FLAGS= -DCMAKE_CXX_FLAGS=`, caused a link failure as ESP
CMake was unable to set its proper compilation flags.
Additional CMake compiler flags can now be provided by another project.
* Closes https://github.com/espressif/esp-idf/issues/7507
This is an experimental feature intended at the moment for ESP-IDF
developers only.
If IDF_TOOLCHAIN=clang environment variable or CMake variable is set,
use toolchain-clang-esp32xx.cmake instead of toolchain-esp32xx.cmake.
These changes aren't sufficient to actually build any IDF project with
clang; subsequent commits add a few workarounds required to do this.
Toolchain files are added for esp32 and esp32s2, which are the targets
supported in our llvm-project fork at the moment.