llvm / llvm/llvm-project

Flang and OpenMP cannot be enabled at the same time in the main branch

Open
#174,126 3 comments 0 reactions 0 assignees View on GitHub
build-problem flang openmp platform:windows
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

On the Windows platform, when using MSVC to compile, if both `openmp` and `flang` are specified in `LLVM_ENABLE_PROJECTS`, an error occurs during the build:
```bash
ninja: error: 'projects/openmp/runtime/src/omp_lib.F90', needed by 'include/flang/omp_lib.mod', missing and no known rule to make it
```

If I remove either `openmp` or `flang` from `LLVM_ENABLE_PROJECTS`, it can build successfully in either case.

```bash
git log -1
commit c2c787c16f5d0b78decc46b963214283465b6342 (HEAD -> main, origin/main, origin/HEAD)
Author: Narayan
AuthorDate: 2026-01-01 10:22:55 +0800
Commit: GitHub
CommitDate: 2026-01-01 10:22:55 +0800

[LLVMABI] Implement the ABI Typesystem (#158329)
...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.