[flang] bootstrapping and cross-compilation build flang with openmp will error out in cmake configure
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Error Info:
```
Configuring done(40.8s)
CMake Error at cmake/modules/AddLLVM.cmake:2121 (add dependencies):
The dependency target "libomp-mod" of target "check-all" does not exist.
Call Stack(most recent call first):cmake/modules/AddLLVM.cmake:2162(add lit target)
CMakeLists.txt:1409(umbrella lit testsuite end)
CMake Error at CMakeLists.txt:1415(add dependencies):
The dependency target "libomp-mod" of target "test-depends" does not exist
CMake Error at cmake/modules/AddLLVM.cmake:2121(add dependencies):
The dependency target "libomp-mod" of target "check-flang" does not exist
Call Stack(most recent call first):
cmake/modules/AddLLVM.cmake:2188(add lit target)
/llvm-project/flang/test/CMakeLists.txt:107 (add_lit_testsuite)
```
CMakeCache:
```
set(LLVM_ENABLE_PROJECTS "flang;clang;clang-tools-extra;lld" CACHE STRING "")
set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind;openmp" CACHE STRING "")
set(LLVM_TARGETS_TO_BUILD "RISCV" CACHE STRING "")
set(LLVM_DEFAULT_TARGET_TRIPLE "riscv64-unknown-linux-gnu" CACHE STRING "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "")
set(LLVM_BUILTIN_TARGETS "riscv64-unknown-linux-gnu")
set(BUILTINS_riscv64-unknown-linux-gnu_CMAKE_SYSTEM_NAME "Linux" CACHE STRING "")
set(LLVM_RUNTIME_TARGETS "riscv64-unknown-linux-gnu")
set(LLVM_RUNTIME_TARGETS "riscv64-unknown-linux-gnu")
set(RUNTIME_riscv64-unknown-linux-gnu_CMAKE_SYSTEM_NAME "Linux" CACHE STRING "")
```
sysroot and compile flag is omit
Version of llvm-project:
`commit 69890718e273fd9d53324de3bdbb8279a322a99a (origin/release/21.x, release/21.x)`
Contributor guide
Research direction
Start with cmake/modules/AddLLVM.cmake around lines 2121-2188, then inspect CMakeLists.txt around lines 1409-1415 and flang/test/CMakeLists.txt around line 107. Reproduce the bootstrapping and cross-compilation configure using the provided CMakeCache settings; done means configuration completes without missing libomp-mod dependency targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100