[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


https://bugs.llvm.org/show_bug.cgi?id=38016

            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/bash
TC=$HOME/src/chrome/src/third_party/depot_tools/win_toolchain
MS=$TC/vs_files/5454e45bf3764c03d3fc1024b3bf5bc41e3ab62c
SDK=$MS/win_sdk/Include/10.0.17134.0
VC=$MS/VC/Tools/MSVC/14.14.26428/include
SDK_LIB=$MS/win_sdk/Lib/10.0.17134.0
VC_LIB=$MS/VC/Tools/MSVC/14.14.26428/lib
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