Mikael Lyngvig
2012-May-23 21:50 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
Hi again, The Visual Studio getting started guide ( http://llvm.org/docs/GettingStartedVS.html) mentions the "llvm-lit" tool, but fails to mention these things: 1. Either you need to run it from bash or a similar Unix shell, as Windows does not recognize the extensionless Python script that it is. 2. Alternatively, you can invoke it using Python like this: python bin/llvm-lit test I know that the documentation says that I am to install GnuWin32 tools, but I strongly oppose that idea. We Windows people have our own tools and practices and I think the LLVM developers should open up to a more multi-platform approach than the current (Unix then, perhaps maybe, Windows) approach. CMake works brilliantly, though, so there are no issues in building neither the win32 or win64 versions of LLVM. As far as I can tell, I don't need the GnuWin32 tools at all. I can succesfully build and link a tiny "hello world" sample program without problems. I do have many Windows ports of Unix tools in my standard path, though, and perhaps that is the reason that the build succeds without GnuWin32. If I can help, please let me know. My angle to LLVM is this: I need a portable, multi-targeting code generator and optimizer, and I happen to prefer Windows as my platform. So, perhaps I can write or update some documentation on how to use LLVM on Windows. Sincerely, Mikael Lyngvig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120523/f261cdfa/attachment.html>
Duncan Sands
2012-May-24 08:46 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
Hi Mikael,> I know that the documentation says that I am to install GnuWin32 tools, but I > strongly oppose that idea. We Windows people have our own tools and practices > and I think the LLVM developers should open up to a more multi-platform approach > than the current (Unix then, perhaps maybe, Windows) approach.the problem is that very few LLVM developers use or know anything about Windows. The only way for this to change is for people who do know and care about Windows to step forward, work on improving Windows support, and contribute their Windows viewpoint to design discussions etc. Ciao, Duncan.
Nathan Jeffords
2012-May-24 15:18 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
To get windows to execute python scripts without the extension, add .PY to the PATHEXT environmental variable. Even though I grew up programming DOS and then windows, I personally quite like GnuWin32 as the windows command line is generally lacking. On Wed, May 23, 2012 at 2:50 PM, Mikael Lyngvig <mikael at lyngvig.org> wrote:> Hi again, > > The Visual Studio getting started guide ( > http://llvm.org/docs/GettingStartedVS.html) mentions the "llvm-lit" tool, > but fails to mention these things: > > 1. Either you need to run it from bash or a similar Unix shell, as > Windows does not recognize the extensionless Python script that it is. > 2. Alternatively, you can invoke it using Python like this: python > bin/llvm-lit test > > I know that the documentation says that I am to install GnuWin32 tools, > but I strongly oppose that idea. We Windows people have our own tools and > practices and I think the LLVM developers should open up to a more > multi-platform approach than the current (Unix then, perhaps maybe, > Windows) approach. CMake works brilliantly, though, so there are no issues > in building neither the win32 or win64 versions of LLVM. > > As far as I can tell, I don't need the GnuWin32 tools at all. I can > succesfully build and link a tiny "hello world" sample program without > problems. I do have many Windows ports of Unix tools in my standard path, > though, and perhaps that is the reason that the build succeds without > GnuWin32. > > If I can help, please let me know. My angle to LLVM is this: I need a > portable, multi-targeting code generator and optimizer, and I happen to > prefer Windows as my platform. So, perhaps I can write or update some > documentation on how to use LLVM on Windows. > > > Sincerely, > Mikael Lyngvig > > _______________________________________________ > 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/20120524/71b5697c/attachment.html>
Nathan Jeffords
2012-May-25 15:57 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
I checkout LLVM and clang from SVN, then use CMake to generate project files for Visual Studio 2010 (I started with 2008). The LLVM project compiles successfully and gives me all the tools including Clang. For a few tests, I compile C++ code with Clang which if I need to I link, I use MinGW's ld passing all the relevant object files and libraries including correctly ordering the start-up code and such. My project is C++ language front end using a CMake build script to generate a Visual Studio 2010 project. Within the CMake build script I specify each individual library I need to link against in the correct order. LLVM is written in C++ so it is the de facto interface. From what I understand the C bindings are not complete, but they are quite usable. this is the library section of my CMake build script for the final executable: ${PLATFORM_LIBS} #LLVMX86Disassembler #LLVMX86AsmParser LLVMX86AsmPrinter LLVMX86CodeGen LLVMX86Utils LLVMX86Desc LLVMX86Info LLVMSelectionDAG LLVMAsmPrinter #LLVMJIT #LLVMExecutionEngine LLVMCodeGen LLVMScalarOpts LLVMTransformUtils #LLVMipa LLVMAnalysis LLVMTarget LLVMMCParser LLVMMC LLVMCore LLVMSupport It took me a little while to get the ordering right the first time, but it has been pretty stable since then. On Fri, May 25, 2012 at 6:24 AM, Mikael Lyngvig <mikael at lyngvig.org> wrote:> So you are using Visual Studio?! I tried that path but ran into all sorts > of problems with unresolved symbols, when linking C++ code, even though I > experimentally linked in each and every LLVM library. I would be very > interested in hearing how you manage to use VS. Are you using the VS > libraries for a project of your own or are you only using them for working > on LLVM/Clang? Also, what language are you using: C or C++? I understood > from the mailing list that the C++ support is not mature enough for it to > be used succesfully. > > By the way, that shell script (llvm-config) is now a program (.exe) so it > is easy to use also on Windows. ><snip> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120525/348905ff/attachment.html>
Mikael Lyngvig
2012-May-25 16:32 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
Now I recall what the problem was that I had: My code makes use of the Win32 API and that means pulling in Windows.h, which again pulls in some headers that make use of the force_inline thingy, which is not supported under Windows yet. I guess if I stuck with portable code, I could probably use Clang for Windows. Once again, I have to visit the thinking box and figure out what to do. But thanks for the description of how to do this. It is surely going to save both me and others a lot of time. 2012/5/25 Nathan Jeffords <blunted2night at gmail.com>> I checkout LLVM and clang from SVN, then use CMake to generate project > files for Visual Studio 2010 (I started with 2008). The LLVM project > compiles successfully and gives me all the tools including Clang. For a few > tests, I compile C++ code with Clang which if I need to I link, I use > MinGW's ld passing all the relevant object files and libraries including > correctly ordering the start-up code and such. > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120525/8737aec5/attachment.html>
NAKAMURA Takumi
2012-May-27 09:17 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
2012/5/24 Mikael Lyngvig <mikael at lyngvig.org>:> I know that the documentation says that I am to install GnuWin32 tools, but > I strongly oppose that idea. We Windows people have our own tools and > practices and I think the LLVM developers should open up to a more > multi-platform approach than the current (Unix then, perhaps maybe, Windows) > approach. CMake works brilliantly, though, so there are no issues in > building neither the win32 or win64 versions of LLVM. > > As far as I can tell, I don't need the GnuWin32 tools at all. I can > succesfully build and link a tiny "hello world" sample program without > problems. I do have many Windows ports of Unix tools in my standard path, > though, and perhaps that is the reason that the build succeds without > GnuWin32.Gnuwin32 is required, for now, when you run tests (check, check-all, clang-test). Then, you would not need to update your %PATH% to specify LLVM_LIT_TOOLS_DIR to CMake. Let me know if you know other (llvm|clang)-tests-compatible tools other than gnuwin32 (and msys). FYI, some clang/llvm tests are marked as "REQUIRES: shell". They rely on sh behavior and they are skipped if bash.exe is not found in your %PATH%.
Mikael Lyngvig
2012-May-27 09:45 UTC
[LLVMdev] Minor correction to the Visual Studio documentation
I most politely retract my statement about GnuWin32. I can see now, that I've some experience in building LLVM, that it is mandatory. So be it :-) However, I have been playing around with the idea of making stand-alone .NET tools to replace the GNU tools. But that approach only works on a small, limited number of platforms and .NET programs aren't exactly known to be overly fast. So I kneel before GnuWin32 :-) The only other set of tools I know for this purpose are the UnxUtils package, but I don't think it is being maintained actively anymore. So it is probably not usable. And, again, I spoke too early, knowing too little about the whole ordeal. Cheers, Mikael -- Love Thy Frog! 2012/5/27 NAKAMURA Takumi <geek4civic at gmail.com>> 2012/5/24 Mikael Lyngvig <mikael at lyngvig.org>: > > I know that the documentation says that I am to install GnuWin32 tools, > but > > I strongly oppose that idea. We Windows people have our own tools and > > practices and I think the LLVM developers should open up to a more > > multi-platform approach than the current (Unix then, perhaps maybe, > Windows) > > approach. CMake works brilliantly, though, so there are no issues in > > building neither the win32 or win64 versions of LLVM. > > > > As far as I can tell, I don't need the GnuWin32 tools at all. I can > > succesfully build and link a tiny "hello world" sample program without > > problems. I do have many Windows ports of Unix tools in my standard > path, > > though, and perhaps that is the reason that the build succeds without > > GnuWin32. > > Gnuwin32 is required, for now, when you run tests (check, check-all, > clang-test). > Then, you would not need to update your %PATH% to specify > LLVM_LIT_TOOLS_DIR to CMake. > > Let me know if you know other (llvm|clang)-tests-compatible tools > other than gnuwin32 (and msys). > > FYI, some clang/llvm tests are marked as "REQUIRES: shell". They rely > on sh behavior and they are skipped if bash.exe is not found in your > %PATH%. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120527/e0586df5/attachment.html>
Maybe Matching Threads
- [LLVMdev] Minor correction to the Visual Studio documentation
- [LLVMdev] Fwd: RFC: "Building with MinGW on Windows" (DOC, NEW)
- [LLVMdev] Fwd: RFC: "Building with MinGW on Windows" (DOC, NEW)
- [LLVMdev] Fwd: RFC: "Building with MinGW on Windows" (DOC, NEW)
- [LLVMdev] Fwd: RFC: "Building with MinGW on Windows" (DOC, NEW)