I replaced all instances of "$(Platform)" with "x64" for the x64 .props file and it still fails, so it looks like that guess was wrong as well. Regards, Eric On 9/29/14, 2:11 PM, Eric Mader wrote:> Quoting doesn't seem to make a difference. Strangely, the Win32 > toolset seems to work. (Where "work" means that clang runs and > produces a bunch of strange errors ;-) > > The only difference I see between the two .props files is that one > passes "-m86" to the compiler and the other one passes "-m64". > > They both reference $(Platform), so I wonder if maybe $(Platform) > isn't getting set correctly? The platform name in the project is "x64" > which seems right... > > Regards, > Eric > > On 9/29/14, 12:40 PM, Rafael Auler wrote: >> Your install dir has a whitespace. Have you tried quoting? e.g. >> <LLVMInstallDir>"C:\Program Files (x86)\LLVM"</LLVMInstallDir> >> >> Best regards, >> Rafael Auler >> >> On Mon, Sep 29, 2014 at 7:38 PM, Eric Mader <emader at gmx.us >> <mailto:emader at gmx.us>> wrote: >> >> I changed tooset-vs2013.props to this: >> >> <Project >> xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >> <http://schemas.microsoft.com/developer/msbuild/2003>> >> <Import >> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props')"/> >> <Import >> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props')"/> >> >> <PropertyGroup> >> <LLVMInstallDir>C:\Program Files (x86)\LLVM</LLVMInstallDir> >> <ExecutablePath>"$(LLVMInstallDir)\msbuild-bin";$(ExecutablePath)</ExecutablePath> >> <LibraryPath>$(LLVMInstallDir)\lib\clang\3.6.0\lib\windows;$(LibraryPath)</LibraryPath> >> </PropertyGroup> >> >> <ItemDefinitionGroup> >> <ClCompile> >> <!-- Set the value of _MSC_VER to claim for compatibility --> >> <AdditionalOptions>-m64 -fmsc-version=1800 >> %(AdditionalOptions)</AdditionalOptions> >> </ClCompile> >> </ItemDefinitionGroup> >> </Project> >> >> It still doesn't work... Is there something else I need to change? >> >> Regards, >> Eric >> >> >> On 9/29/14, 10:41 AM, Rafael Auler wrote: >>> Open the file toolset-vs2013.props and you'll understand what's >>> happening and where the path is set. It tries to fetch the LLVM >>> installation path from the Windows registry. Just fix this >>> (maybe editing your registry or editing the .props file, >>> whatever suits you best). >>> >>> On Mon, Sep 29, 2014 at 5:33 PM, Eric Mader <emader at gmx.us >>> <mailto:emader at gmx.us>> wrote: >>> >>> I copied the x64 toolsets by hand and now when I try to >>> compile a file, I get an error message saying that the build >>> tools for llvm-2013 cannot be found. I guess that this is >>> because the installer didn't correctly add the LLVM tools to >>> $PATH. How can I correctly add the LLVM tools to the path? >>> >>> Regards, >>> Eric >>> >>> >>> On 9/29/14, 10:22 AM, Eric Mader wrote: >>>> Ah, OK. I did find the install.bat script and ran it in a >>>> command shell w/ admin access. I have VS 2010 and VS 2013 >>>> installed. The script reported that it copied 6 files. >>>> Poking around, I noticed that it wrote toolsets only for >>>> win32. (vs2010, vs2013, vs2113_xp) Looking at the script, >>>> it seems like it should write x64 toolsets too. I'll try >>>> copying the x64 toolsets by hand to see what happens >>>> >>>> Regards, >>>> Eric Mader >>>> >>>> On 9/29/14, 9:38 AM, Rafael Auler wrote: >>>>> I was not necessarily asking you to build, but just to >>>>> check your installation folder and see whether you have >>>>> "tools/msbuild/install.bat" there because I don't know if >>>>> the Windows installer puts this there. However, if you >>>>> want to build outside VS, I recommend mingw-w64. If you >>>>> have any difficulties about the VS build process though, >>>>> feel free to ask questions :-) >>>>> >>>>> Usually, to build LLVM on a Windows system from scratch >>>>> (with VS installed), I would just install git for windows, >>>>> which already installs a lot of important GNU tools, and >>>>> ask to put everything in my path. Then I would install >>>>> CMake and put this in my path. Afterwards, open a shell >>>>> with VS paths, create a build folder, run CMake -G"Visual >>>>> Studio ...<yourversion>" and then "msbuild <name of >>>>> project>". A lot of people prefer to use ninja instead of >>>>> msbuild, though, but you must install ninja and use CMake >>>>> -GNinja instead. >>>>> >>>>> On Mon, Sep 29, 2014 at 4:29 PM, Eric Mader <emader at gmx.us >>>>> <mailto:emader at gmx.us>> wrote: >>>>> >>>>> I was hoping to not have to build LLVM myself, >>>>> especially on Windows. Can anybody help me with the >>>>> Windows installer? >>>>> >>>>> Failing that, I find the directions for how to compile >>>>> on Windows hard to follow? Can I build using Cygwin? >>>>> >>>>> Regards, >>>>> Eric >>>>> >>>>> >>>>> On 9/29/14, 8:11 AM, Rafael Auler wrote: >>>>>> I'm not sure about the Windows installer, but if you >>>>>> build and install LLVM for Windows from the source >>>>>> code, you should be able to go to the installation >>>>>> folder, find a subfolder named "tools/msbuild" and >>>>>> run the "install.bat" script. This should make your >>>>>> LLVM toolset appear in VS. >>>>>> >>>>>> On Mon, Sep 29, 2014 at 2:52 PM, Eric Mader >>>>>> <emader at gmx.us <mailto:emader at gmx.us>> wrote: >>>>>> >>>>>> I’m trying to install >>>>>> LLVM-3.6.0-r218288-win32.exe on Windows 7 >>>>>> Ultimate x64. The install doesn’t complain, but >>>>>> the toolset doesn’t show up in either Visual >>>>>> Studio 2013 or Visual Studio 2010. Also I >>>>>> selected the choices to add LLVM to the path for >>>>>> every user and put an LLVM icon on the desktop. >>>>>> Neither of this happened. Can anyone tell me how >>>>>> to get this to work? >>>>>> >>>>>> Regards, >>>>>> Eric Mader >>>>>> _______________________________________________ >>>>>> LLVM Developers mailing list >>>>>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> >>>>>> http://llvm.cs.uiuc.edu >>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140929/fe1ec6db/attachment.html>
Which strange errors? If you are trying to build a C++ project, remember that Clang does not yet support exception handling and you should disable them. To do this, you should go to Project Properties and navigate to Configuration Properties, C/C++, Command Line, Additional Options and put /GR- /D_HAS_EXCEPTIONS=0 there. If it builds a 32-bit binary, it should succeed with 64-bit, since the toolset is exactly the same, with the difference of the parameters passed to clang-cl.exe. On Mon, Sep 29, 2014 at 9:26 PM, Eric Mader <emader at gmx.us> wrote:> I replaced all instances of "$(Platform)" with "x64" for the x64 .props > file and it still fails, so it looks like that guess was wrong as well. > > Regards, > Eric > > > On 9/29/14, 2:11 PM, Eric Mader wrote: > > Quoting doesn't seem to make a difference. Strangely, the Win32 toolset > seems to work. (Where "work" means that clang runs and produces a bunch of > strange errors ;-) > > The only difference I see between the two .props files is that one passes > "-m86" to the compiler and the other one passes "-m64". > > They both reference $(Platform), so I wonder if maybe $(Platform) isn't > getting set correctly? The platform name in the project is "x64" which > seems right... > > Regards, > Eric > > On 9/29/14, 12:40 PM, Rafael Auler wrote: > > Your install dir has a whitespace. Have you tried quoting? e.g. <LLVMInstallDir>"C:\Program > Files (x86)\LLVM"</LLVMInstallDir> > > Best regards, > Rafael Auler > > On Mon, Sep 29, 2014 at 7:38 PM, Eric Mader <emader at gmx.us> wrote: > >> I changed tooset-vs2013.props to this: >> >> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >> <http://schemas.microsoft.com/developer/msbuild/2003>> >> <Import >> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props')"/> >> <Import >> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props')"/> >> >> <PropertyGroup> >> <LLVMInstallDir>C:\Program Files (x86)\LLVM</LLVMInstallDir> >> >> <ExecutablePath>"$(LLVMInstallDir)\msbuild-bin";$(ExecutablePath)</ExecutablePath> >> >> <LibraryPath>$(LLVMInstallDir)\lib\clang\3.6.0\lib\windows;$(LibraryPath)</LibraryPath> >> </PropertyGroup> >> >> <ItemDefinitionGroup> >> <ClCompile> >> <!-- Set the value of _MSC_VER to claim for compatibility --> >> <AdditionalOptions>-m64 -fmsc-version=1800 >> %(AdditionalOptions)</AdditionalOptions> >> </ClCompile> >> </ItemDefinitionGroup> >> </Project> >> >> It still doesn't work... Is there something else I need to change? >> >> Regards, >> Eric >> >> >> On 9/29/14, 10:41 AM, Rafael Auler wrote: >> >> Open the file toolset-vs2013.props and you'll understand what's happening >> and where the path is set. It tries to fetch the LLVM installation path >> from the Windows registry. Just fix this (maybe editing your registry or >> editing the .props file, whatever suits you best). >> >> On Mon, Sep 29, 2014 at 5:33 PM, Eric Mader <emader at gmx.us> wrote: >> >>> I copied the x64 toolsets by hand and now when I try to compile a file, >>> I get an error message saying that the build tools for llvm-2013 cannot be >>> found. I guess that this is because the installer didn't correctly add the >>> LLVM tools to $PATH. How can I correctly add the LLVM tools to the path? >>> >>> Regards, >>> Eric >>> >>> >>> On 9/29/14, 10:22 AM, Eric Mader wrote: >>> >>> Ah, OK. I did find the install.bat script and ran it in a command shell >>> w/ admin access. I have VS 2010 and VS 2013 installed. The script reported >>> that it copied 6 files. Poking around, I noticed that it wrote toolsets >>> only for win32. (vs2010, vs2013, vs2113_xp) Looking at the script, it seems >>> like it should write x64 toolsets too. I'll try copying the x64 toolsets by >>> hand to see what happens >>> >>> Regards, >>> Eric Mader >>> >>> On 9/29/14, 9:38 AM, Rafael Auler wrote: >>> >>> I was not necessarily asking you to build, but just to check your >>> installation folder and see whether you have "tools/msbuild/install.bat" >>> there because I don't know if the Windows installer puts this there. >>> However, if you want to build outside VS, I recommend mingw-w64. If you >>> have any difficulties about the VS build process though, feel free to ask >>> questions :-) >>> >>> Usually, to build LLVM on a Windows system from scratch (with VS >>> installed), I would just install git for windows, which already installs a >>> lot of important GNU tools, and ask to put everything in my path. Then I >>> would install CMake and put this in my path. Afterwards, open a shell with >>> VS paths, create a build folder, run CMake -G"Visual Studio >>> ...<yourversion>" and then "msbuild <name of project>". A lot of people >>> prefer to use ninja instead of msbuild, though, but you must install ninja >>> and use CMake -GNinja instead. >>> >>> On Mon, Sep 29, 2014 at 4:29 PM, Eric Mader <emader at gmx.us> wrote: >>> >>>> I was hoping to not have to build LLVM myself, especially on Windows. >>>> Can anybody help me with the Windows installer? >>>> >>>> Failing that, I find the directions for how to compile on Windows hard >>>> to follow? Can I build using Cygwin? >>>> >>>> Regards, >>>> Eric >>>> >>>> >>>> On 9/29/14, 8:11 AM, Rafael Auler wrote: >>>> >>>> I'm not sure about the Windows installer, but if you build and install >>>> LLVM for Windows from the source code, you should be able to go to the >>>> installation folder, find a subfolder named "tools/msbuild" and run the >>>> "install.bat" script. This should make your LLVM toolset appear in VS. >>>> >>>> On Mon, Sep 29, 2014 at 2:52 PM, Eric Mader <emader at gmx.us> wrote: >>>> >>>>> I’m trying to install LLVM-3.6.0-r218288-win32.exe on Windows 7 >>>>> Ultimate x64. The install doesn’t complain, but the toolset doesn’t show up >>>>> in either Visual Studio 2013 or Visual Studio 2010. Also I selected the >>>>> choices to add LLVM to the path for every user and put an LLVM icon on the >>>>> desktop. Neither of this happened. Can anyone tell me how to get this to >>>>> work? >>>>> >>>>> Regards, >>>>> Eric Mader >>>>> _______________________________________________ >>>>> LLVM Developers mailing list >>>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140929/85e3c345/attachment.html>
Thanks for all the help. Comments inline below. Regards, Eric On 9/29/14, 2:35 PM, Rafael Auler wrote:> Which strange errors? If you are trying to build a C++ project, > remember that Clang does not yet support exception handling and you > should disable them. To do this, you should go to Project Properties > and navigate to Configuration Properties, C/C++, Command Line, > Additional Options and put /GR- /D_HAS_EXCEPTIONS=0 there.The errors I'm seeing look like this: 1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\algorithm:6: 1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory:6: 1> In file included from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory0:909: 1> In file included from C:\Program Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\intrin.h:34: 1> In file included from C:\Program Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\x86intrin.h:29: 1> In file included from C:\Program Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\immintrin.h:28: 1>C:\Program Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\mmintrin.h(52,40): error : cannot initialize a parameter of type '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of 2 'int' values) with an rvalue of type '__v2si' (aka 'int') 1> return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0); 1> ^~~~~~~~~~~ I'm porting a bunch of code from MacOS X (using Xcode) to Windows. I suppose it's possible I haven't set some preprocessor variable correctly, but looking at the LLVM include files in the chain, they don't seem to depend on any preprocessor variables.> If it builds a 32-bit binary, it should succeed with 64-bit, since the > toolset is exactly the same, with the difference of the parameters > passed to clang-cl.exe.D'oh! Just worked out that when I hand-installed the x64 toolset, I didn't rename the .props and .targets files to "toolset.props" and "toolset.targets" per install.bat. Now I get the same compilation errors I that I saw for Win32. (Progress!) On Mon, Sep 29, 2014 at 9:26 PM, Eric Mader <emader at gmx.us <mailto:emader at gmx.us>> wrote:> > I replaced all instances of "$(Platform)" with "x64" for the x64 > .props file and it still fails, so it looks like that guess was > wrong as well. > > Regards, > Eric > > > On 9/29/14, 2:11 PM, Eric Mader wrote: >> Quoting doesn't seem to make a difference. Strangely, the Win32 >> toolset seems to work. (Where "work" means that clang runs and >> produces a bunch of strange errors ;-) >> >> The only difference I see between the two .props files is that >> one passes "-m86" to the compiler and the other one passes "-m64". >> >> They both reference $(Platform), so I wonder if maybe $(Platform) >> isn't getting set correctly? The platform name in the project is >> "x64" which seems right... >> >> Regards, >> Eric >> >> On 9/29/14, 12:40 PM, Rafael Auler wrote: >>> Your install dir has a whitespace. Have you tried quoting? e.g. >>> <LLVMInstallDir>"C:\Program Files (x86)\LLVM"</LLVMInstallDir> >>> >>> Best regards, >>> Rafael Auler >>> >>> On Mon, Sep 29, 2014 at 7:38 PM, Eric Mader <emader at gmx.us >>> <mailto:emader at gmx.us>> wrote: >>> >>> I changed tooset-vs2013.props to this: >>> >>> <Project >>> xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >>> <http://schemas.microsoft.com/developer/msbuild/2003>> >>> <Import >>> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Microsoft.Cpp.$(Platform).v120.props')"/> >>> <Import >>> Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props"Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\v120\Toolset.props')"/> >>> >>> <PropertyGroup> >>> <LLVMInstallDir>C:\Program Files (x86)\LLVM</LLVMInstallDir> >>> <ExecutablePath>"$(LLVMInstallDir)\msbuild-bin";$(ExecutablePath)</ExecutablePath> >>> <LibraryPath>$(LLVMInstallDir)\lib\clang\3.6.0\lib\windows;$(LibraryPath)</LibraryPath> >>> </PropertyGroup> >>> >>> <ItemDefinitionGroup> >>> <ClCompile> >>> <!-- Set the value of _MSC_VER to claim for >>> compatibility --> >>> <AdditionalOptions>-m64 -fmsc-version=1800 >>> %(AdditionalOptions)</AdditionalOptions> >>> </ClCompile> >>> </ItemDefinitionGroup> >>> </Project> >>> >>> It still doesn't work... Is there something else I need to >>> change? >>> >>> Regards, >>> Eric >>> >>> >>> On 9/29/14, 10:41 AM, Rafael Auler wrote: >>>> Open the file toolset-vs2013.props and you'll understand >>>> what's happening and where the path is set. It tries to >>>> fetch the LLVM installation path from the Windows registry. >>>> Just fix this (maybe editing your registry or editing the >>>> .props file, whatever suits you best). >>>> >>>> On Mon, Sep 29, 2014 at 5:33 PM, Eric Mader <emader at gmx.us >>>> <mailto:emader at gmx.us>> wrote: >>>> >>>> I copied the x64 toolsets by hand and now when I try to >>>> compile a file, I get an error message saying that the >>>> build tools for llvm-2013 cannot be found. I guess that >>>> this is because the installer didn't correctly add the >>>> LLVM tools to $PATH. How can I correctly add the LLVM >>>> tools to the path? >>>> >>>> Regards, >>>> Eric >>>> >>>> >>>> On 9/29/14, 10:22 AM, Eric Mader wrote: >>>>> Ah, OK. I did find the install.bat script and ran it >>>>> in a command shell w/ admin access. I have VS 2010 >>>>> and VS 2013 installed. The script reported that it >>>>> copied 6 files. Poking around, I noticed that it wrote >>>>> toolsets only for win32. (vs2010, vs2013, vs2113_xp) >>>>> Looking at the script, it seems like it should write >>>>> x64 toolsets too. I'll try copying the x64 toolsets by >>>>> hand to see what happens >>>>> >>>>> Regards, >>>>> Eric Mader >>>>> >>>>> On 9/29/14, 9:38 AM, Rafael Auler wrote: >>>>>> I was not necessarily asking you to build, but just >>>>>> to check your installation folder and see whether you >>>>>> have "tools/msbuild/install.bat" there because I >>>>>> don't know if the Windows installer puts this there. >>>>>> However, if you want to build outside VS, I recommend >>>>>> mingw-w64. If you have any difficulties about the VS >>>>>> build process though, feel free to ask questions :-) >>>>>> >>>>>> Usually, to build LLVM on a Windows system from >>>>>> scratch (with VS installed), I would just install git >>>>>> for windows, which already installs a lot of >>>>>> important GNU tools, and ask to put everything in my >>>>>> path. Then I would install CMake and put this in my >>>>>> path. Afterwards, open a shell with VS paths, create >>>>>> a build folder, run CMake -G"Visual Studio >>>>>> ...<yourversion>" and then "msbuild <name of >>>>>> project>". A lot of people prefer to use ninja >>>>>> instead of msbuild, though, but you must install >>>>>> ninja and use CMake -GNinja instead. >>>>>> >>>>>> On Mon, Sep 29, 2014 at 4:29 PM, Eric Mader >>>>>> <emader at gmx.us <mailto:emader at gmx.us>> wrote: >>>>>> >>>>>> I was hoping to not have to build LLVM myself, >>>>>> especially on Windows. Can anybody help me with >>>>>> the Windows installer? >>>>>> >>>>>> Failing that, I find the directions for how to >>>>>> compile on Windows hard to follow? Can I build >>>>>> using Cygwin? >>>>>> >>>>>> Regards, >>>>>> Eric >>>>>> >>>>>> >>>>>> On 9/29/14, 8:11 AM, Rafael Auler wrote: >>>>>>> I'm not sure about the Windows installer, but if >>>>>>> you build and install LLVM for Windows from the >>>>>>> source code, you should be able to go to the >>>>>>> installation folder, find a subfolder named >>>>>>> "tools/msbuild" and run the "install.bat" >>>>>>> script. This should make your LLVM toolset >>>>>>> appear in VS. >>>>>>> >>>>>>> On Mon, Sep 29, 2014 at 2:52 PM, Eric Mader >>>>>>> <emader at gmx.us <mailto:emader at gmx.us>> wrote: >>>>>>> >>>>>>> I’m trying to install >>>>>>> LLVM-3.6.0-r218288-win32.exe on Windows 7 >>>>>>> Ultimate x64. The install doesn’t complain, >>>>>>> but the toolset doesn’t show up in either >>>>>>> Visual Studio 2013 or Visual Studio 2010. >>>>>>> Also I selected the choices to add LLVM to >>>>>>> the path for every user and put an LLVM icon >>>>>>> on the desktop. Neither of this happened. >>>>>>> Can anyone tell me how to get this to work? >>>>>>> >>>>>>> Regards, >>>>>>> Eric Mader >>>>>>> _______________________________________________ >>>>>>> LLVM Developers mailing list >>>>>>> LLVMdev at cs.uiuc.edu >>>>>>> <mailto:LLVMdev at cs.uiuc.edu> >>>>>>> http://llvm.cs.uiuc.edu >>>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >>> >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140929/6e425f91/attachment.html>