The xilink error "Assertion failed (shared/driver/drvutils.c, line 312)" occurs with Intel® oneAPI DPC++\C++ Compiler 2021.4 release and is reproducible on Windows* only.
The issue does not depend on the code the user is linking and happens due to the bug with the processing of directory information when discovering the clang binary. The directory structure for the Intel® Classic Compiler (icl) is different than that of the LLVM* compiler and there are some improper expectations as to where the compiler binary is found.
As a workaround you can copy a file clang.exe (by default it is located in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin) to the folder with xilink (for x64 configuration it is in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\intel64).
This bug should be fixed in Intel® oneAPI 2022.1 release.