I successfully built LLVM (v9.0.1), However, and in order to build flang, the configuration of flang-driver with:
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/FLANG/flang-driver -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
– The C compiler identification is GNU 7.4.0
– The CXX compiler identification is GNU 7.4.0
– Looking for os_signpost_interval_begin
– Looking for os_signpost_interval_begin - not found
– Found PythonInterp: /usr/bin/python2.7 (found version “2.7.17”)
– Looking for sys/resource.h
– Looking for sys/resource.h - found
– Clang version: 9.0.1
– Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
– Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
CMake Error at examples/analyzer-plugin/CMakeLists.txt:2 (add_llvm_loadable_module):
Unknown CMake command “add_llvm_loadable_module”.
– Configuring incomplete, errors occurred!
See also “/home/ubuntu/FLANG/flang-driver/build/CMakeFiles/CMakeOutput.log”.
See also “/home/ubuntu/FLANG/flang-driver/build/CMakeFiles/CMakeError.log”.
The error add_llvm_loadable_module seems to always occur even changing directories or other details. The logs do not clarify anything for me but I could post them if it’d help (they’re a bit long). Any suggestions on what is the orgin of the problem or how to fix it would be welcomed.