Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM Compiler Toolchain extension does not support Visual Studio 2019 #41635

Closed
KarstenH mannequin opened this issue Jun 16, 2019 · 8 comments
Closed

LLVM Compiler Toolchain extension does not support Visual Studio 2019 #41635

KarstenH mannequin opened this issue Jun 16, 2019 · 8 comments
Labels
bugzilla Issues migrated from bugzilla packaging wontfix Issue is real, but we can't or won't fix it. Not invalid

Comments

@KarstenH
Copy link
Mannequin

KarstenH mannequin commented Jun 16, 2019

Bugzilla Link 42290
Resolution WONTFIX
Resolved on Jun 26, 2019 16:28
Version unspecified
OS Windows NT
CC @zmodem

Extended Description

On my Windows 10 system with Visual Studio Enterprise 2019 version 16.1.3, the LLVM Compiler Toolchain extension version 1.0.359557 does not install the .props and .targets and .xml files to the folder "MSBuild\Microsoft\VC\v160" where platform toolsets are specified for VS 2019.
Instead, it installs to the folder "Common7\IDE\VC\VCTargets" where platform toolsets are specified for VS 2017. As a result, there is no LLVM platform toolset available in project properties.
I have tried multiple times, including the complete uninstallation and reinstallation of VS and the extension.
After manually copying all 7 files from the wrong folder to the correct folder it works.
With VS 2019, Microsoft seems to have changed the folder where platform toolsets are specified. In this case, the extension has not yet been adapted to this change.

@zmodem
Copy link
Collaborator

zmodem commented Jun 17, 2019

Sorry about this. I bumped the manifest to claim VS2019 support because it worked on my machine, but it seems it only works if VS2017 is also installed.

I've added a note about this to the extension description at https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain

Nobody is really maintaining this extension. If you'd be interested in trying to write patches to fix this, I can help test and get them committed.

@KarstenH
Copy link
Mannequin Author

KarstenH mannequin commented Jun 18, 2019

I think the following Microsoft Developer Community bug report for VS 2019 addresses this issue:
https://developercommunity.visualstudio.com/content/problem/498941/vsix-vctargets-install-root-still-points-to-old-lo.html

Looking at the source code of the extension, I think the file "llvm.csproj" needs to be fixed as follows in order to support VS 2019:

  1. In the "InstallRoot" element exchange the word "VCTargets" with "MSBuild" (seven changes in total)
  2. If the "VSIXSubPath" element (right below the "InstallRoot" element) exists, then prepend "Microsoft\VC\v160" to its path, else add the "VSIXSubPath" element with the path "Microsoft\VC\v160" (right below the "InstallRoot" element)

These are all of the necessary changes:

true MSBuild Microsoft\VC\v160\1033 true MSBuild Microsoft\VC\v160 true MSBuild Microsoft\VC\v160 true MSBuild Microsoft\VC\v160\Platforms\x64\PlatformToolsets\llvm true MSBuild Microsoft\VC\v160\Platforms\x64\PlatformToolsets\llvm true MSBuild Microsoft\VC\v160\Platforms\Win32\PlatformToolsets\llvm true MSBuild Microsoft\VC\v160\Platforms\Win32\PlatformToolsets\llvm

But I must admit that I have never written an extension, so I might be wrong or this might be just part of the full solution.

@zmodem
Copy link
Collaborator

zmodem commented Jun 19, 2019

Hmm, but we'd also like the extension to keep working with VS 2017.

All in all, since we unfortunately don't have anyone maintaining the extension, and as MS is adding their own llvm/clang toolset in VS 2019, I've updated the extension manifest to no longer claim 2019 support and linked to MS' blog post from the extension description.

@KarstenH
Copy link
Mannequin Author

KarstenH mannequin commented Jun 19, 2019

If I understand the Microsoft post correctly, clang/LLVM support is currently for CMake based projects only, not for MSBuild based projects. They write "Support for MSBuild based C++ projects is on the roadmap and will be available soon in a future release". But what does "soon" mean? There seem to be quite some people who want this extension in VS 2019 now (see Q & A).
So why not offer two extensions? One for VS before 2017 and earlier, and one for 2019.

@zmodem
Copy link
Collaborator

zmodem commented Jun 21, 2019

If I understand the Microsoft post correctly, clang/LLVM support is
currently for CMake based projects only, not for MSBuild based projects.
They write "Support for MSBuild based C++ projects is on the roadmap and
will be available soon in a future release". But what does "soon" mean?

I think soon means the next preview, but I'm not sure.

There seem to be quite some people who want this extension in VS 2019 now
(see Q & A).
So why not offer two extensions? One for VS before 2017 and earlier, and one
for 2019.

The problem is that we don't even have anyone maintaining the current extension. So publishing another one doesn't seem like a good idea.

@KarstenH
Copy link
Mannequin Author

KarstenH mannequin commented Jun 22, 2019

The problem is that we don't even have anyone maintaining the current
extension. So publishing another one doesn't seem like a good idea.
Since no one maintains the extension, yet it is still available, I have to assume that its development is considered complete (just like VS 2017).

An additional extension for VS 2019 is considered complete, too, and declared obsolete with the Microsoft release. If there is anything to maintain in the meantime, you can instead hint at that "soon" Microsoft release. This is certainly not optimal, but still better than no extension at all. And if there was nothing to maintain in the meantime, it would be a temporary solution that just works.

There is also an alternative. It is very simple to make the extension work by just copying seven files from the wrong folder to the correct folder. Please see the post from the user "powerchord" (me) in the "Rating & Review" section. You could offer this solution in the "Overview" section to complement your hint at the Microsoft release. This, too, is certainly not optimal, but again better than nothing.

I see it this way: people want to use clang/LLVM in VS 2019 now and not "soon", maybe for very reasonable reasons (C++ conformance issues and still a lot of bugs in MSVC). If you asked them if they would accept a temporary unmaintained yet very probably working solution, I think no one would answer "no". I, too, was in this situation and was happy to have found the manual solution from above. Not only for my personal projects, but especially for the projects at work.

@zmodem
Copy link
Collaborator

zmodem commented Jun 25, 2019

I see it this way: people want to use clang/LLVM in VS 2019 now and not
"soon", maybe for very reasonable reasons (C++ conformance issues and still
a lot of bugs in MSVC). If you asked them if they would accept a temporary
unmaintained yet very probably working solution, I think no one would answer
"no". I, too, was in this situation and was happy to have found the manual
solution from above. Not only for my personal projects, but especially for
the projects at work.

Anyone can publish that extension though, but someone has to do the work and we don't have anyone working on it at the moment.

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 26, 2019

See https://github.com/zufuliu/llvm-utils

If you going to install into v160 folder, please possible consider install into v150 and ARM64 folder too.

It seems in order to build this extension (which just copy some files), the huge? Visual Studio SDK need to be installed.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Quuxplusone Quuxplusone added the wontfix Issue is real, but we can't or won't fix it. Not invalid label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla packaging wontfix Issue is real, but we can't or won't fix it. Not invalid
Projects
None yet
Development

No branches or pull requests

3 participants