Skip to content

[flang][CMake] Add missing dependency to generate Fortran module files #91517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions llvm/runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ if(runtimes)
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
# TODO: This is a workaround until flang becomes a first-class project
# in llvm/CMakeList.txt. Until then, this line ensures that flang-new is
# built before "openmp" is built as a runtime project.
list(APPEND extra_deps "flang-new")
# built before "openmp" is built as a runtime project. Besides "flang-new"
# to build the compiler, we also need to add "module_files" to make sure
# that all .mod files are also properly build.
list(APPEND extra_deps "flang-new" "module_files")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment on why the module_files is required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the issue present only in out-of-tree builds? How did this work correctly in in-tree builds without this change?

endif()
foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)
if(TARGET ${dep})
Expand Down
Loading