[Openmp-commits] [llvm] [openmp] [flang-rt][openmp] Add file-level dependencies for builtin mod files (PR #204260)

Sairudra More via Openmp-commits openmp-commits at lists.llvm.org
Tue Jun 23 09:19:35 PDT 2026


Saieiei wrote:

Hi, I may be seeing a Unix Makefiles-generator issue after this change.

With an offload/flang-rt runtime build using:

```text
LLVM_ENABLE_RUNTIMES=compiler-rt;flang-rt;openmp;offload
LLVM_RUNTIME_TARGETS=default;amdgcn-amd-amdhsa
LIBOMPTARGET_DEVICE_ARCHITECTURES=gfx908
Generator: Unix Makefiles
```

the build fails while building `flang_rt.mod.cuda.builtins`:

```text
make[5]: *** No rule to make target 'modules/./__fortran_builtins.o',
needed by 'flang_rt.mod.cuda.builtins.dir/__cuda_builtins.f90.o'. Stop.
```

>From the generated Makefiles, the cuda builtins target depends on `modules/./__fortran_builtins.o`, but the rule that produces/touches that file appears to live in the separate `flang_rt.mod.fortran.builtins` target's `build.make`. Since Unix Makefiles uses recursive per-target makefiles, the cuda target's sub-make does not seem to see that producer rule.

I also tried a small Ninja probe for the same target, and Ninja successfully built `flang_rt.mod.cuda.builtins`, so this seems specific to the Unix Makefiles generator.

Is Unix Makefiles still expected to work for this flang-rt/offload configuration, or should this configuration now require Ninja?


https://github.com/llvm/llvm-project/pull/204260


More information about the Openmp-commits mailing list