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

Brad King via flang-commits flang-commits at lists.llvm.org
Thu Nov 16 08:08:06 PST 2023


bradking wrote:

I tried this locally, but it doesn't quite work:

```
>flang-new foo.f90
... fatal error LNK1276: invalid directive 'clang_rt.builtins-x86_64.lib' found; does not start with '/'
```

The directives appear in the object file with an extra space:

```
>flang-new -c foo.f90
>grep -ai defaultlib foo.o
 /DEFAULTLIB: clang_rt.builtins-x86_64.lib /DEFAULTLIB: libcmt /DEFAULTLIB: Fortran_main.static.lib /DEFAULTLIB: FortranRuntime.static.lib /DEFAULTLIB: FortranDecimal.static.lib.text
```

There should not be a space after `/DEFAULTLIB:` before the library name.


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


More information about the flang-commits mailing list