[clang] [flang] [flang] Add runtimes using --dependent-lib on MSVC targets (PR #72519)

Brad King via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 12:03:16 PST 2023


bradking wrote:

@DavidTruby that fixed it, thanks.  Nice work.  I've locally updated CMake to use `flang-new`'s MSVC runtime library selection flags (`-fms-runtime-lib={static,static_dbg,dll,dll_dbg}`).  It passes CMake's test suite, including the `MSVCRuntimeLibrary.Fortran` test that covers all four variants' preprocessor definitions and linking behavior.  Once this is merged I'll update CMake to use this feature for LLVMFlang 18.0 and above.

The only remaining issue I see after this is that the default `FortranRuntime.lib` library (and friends) are still installed even though they are only needed inside the llvm-project/flang build tree for testing.  Only the

    Fortran*.{static,static_dbg,dynamic,dynamic_dbg}.lib

variants should be installed.  That could be considered out-of-scope for this PR though and done in a follow-up instead.

Therefore I think this PR/commit can be marked as `Fixes: #68017`.


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


More information about the cfe-commits mailing list