[llvm-bugs] [Bug 38016] New: clang-clshouldn't emit Wmsvc-not-found if -fuse-ld=lld is passed

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 2 06:54:11 PDT 2018


            Bug ID: 38016
           Summary: clang-clshouldn't emit Wmsvc-not-found if -fuse-ld=lld
                    is passed
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org

I'm using this cross-compiling script:

$ cat clang-cl.sh
bin/clang-cl -imsvc$SDK/ucrt -imsvc$SDK/um -imsvc$SDK/shared -imsvc$VC "$@"
/link /libpath:$SDK_LIB/ucrt/x86 /libpath:$SDK_LIB/um/x86 /libpath:$VC_LIB/x86

Building an empty binary:
$ cat empty.c
int main() {}
$ ./clang-cl.sh -fuse-ld=lld empty.c 
clang-7.0: warning: unable to find a Visual Studio installation; try running
Clang from a developer command prompt [-Wmsvc-not-found]

It works, but I get -Wmsvc-not-found (which with /WX is an error).

The warning is silly for two reasons:

1. It's emitted by MSVCToolChain::buildLinker() but we don't use that linker
with -fuse-lld

2. The warning text only makes sense on Windows hosts.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180702/df7dee71/attachment.html>

More information about the llvm-bugs mailing list