diff options
author | Brad King <brad.king@kitware.com> | 2023-12-04 22:15:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-12-06 14:42:07 (GMT) |
commit | 1c07758ca2ee8dfbd43ca582d16f36a97177b24c (patch) | |
tree | 9a6d0cbc6746a206e36456dc1f64584db0dd965d /Modules | |
parent | 7b49183f72e92832ff607f407b8bfd23506c8aca (diff) | |
download | CMake-1c07758ca2ee8dfbd43ca582d16f36a97177b24c.zip CMake-1c07758ca2ee8dfbd43ca582d16f36a97177b24c.tar.gz CMake-1c07758ca2ee8dfbd43ca582d16f36a97177b24c.tar.bz2 |
CMakeParseImplicitLinkInfo: Exclude LLVMFlang program entry point for MSVC
As of llvm-project `main` branch commit `86accd4e03` (2023-12-04),
LLVMFlang 18.0.0, when used to drive linking an executable, emits a MSVC
linker flag to use all object files from the `Fortran_main` library.
These object files are meant for use when linking the program entry
point, and so are not implicit link dependencies of Fortran libraries.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index b48eb43..0c92634 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -163,6 +163,8 @@ function(cmake_parse_implicit_link_info2 text log_var obj_regex) string(APPEND log " arg [${arg}] ==> ignore MSVC cl option\n") elseif(is_msvc AND "${arg}" MATCHES "^[-/][Ii][Mm][Pp][Ll][Ii][Bb]:") string(APPEND log " arg [${arg}] ==> ignore MSVC link option\n") + elseif(is_msvc AND "${arg}" MATCHES "^[-/][Ww][Hh][Oo][Ll][Ee][Aa][Rr][Cc][Hh][Ii][Vv][Ee]:Fortran_main") + string(APPEND log " arg [${arg}] ==> ignore LLVMFlang program entry point\n") elseif(is_msvc AND "${arg}" MATCHES "^(.*\\.[Ll][Ii][Bb])$") if(EXTRA_PARSE_COMPUTE_IMPLICIT_LIBS) set(lib "${CMAKE_MATCH_1}") |