I’m trying to figure out how to build compiler-rt 3.5.0 with Visual Studio 2013. In an autotools build or cmake on Linux, I believe putting the compiler-rt sources under llvm/projects is enough to build them automatically. Do I need to do anything specific to get the same with MSVC? I've tried setting -DLLVM_BUILD_EXTERNAL_COMPILER_RT either ON or OFF, but can't find any evidence of compiler-rt getting built. If I build compiler-rt separately, pointing it to an installed LLVM build with -DLLVM_CONFIG_PATH, the only thing that ends up in the install result is the sanitizer headers. Should this be working, or is it still under construction? When I tried with LLVM 3.3 I was getting a bunch of syntax errors from MSVC in compiler-rt, so presumably it wasn't yet MSVC-compatible at that time. Has the MSVC build just been disabled somewhere to avoid this? Thanks, Tony
Please pardon the top posting (mobile devices make this hard). This should work for x86 targets theoretically. There is an outstanding patch that I need to tweak for windows support via make and clang. It uses the MSVC environment for the x86 targets and the Itanium environment for ARM (due to assembly). Creating a custom VS solution should allow you to do this I believe. On Monday, September 22, 2014, Tony Kelman <kelman at berkeley.edu> wrote:> I’m trying to figure out how to build compiler-rt 3.5.0 with Visual Studio > 2013. In an autotools build or cmake on Linux, I believe putting the > compiler-rt sources under llvm/projects is enough to build them > automatically. Do I need to do anything specific to get the same with MSVC? > I've tried setting -DLLVM_BUILD_EXTERNAL_COMPILER_RT either ON or OFF, > but can't find any evidence of compiler-rt getting built. If I build > compiler-rt separately, pointing it to an installed LLVM build with > -DLLVM_CONFIG_PATH, the only thing that ends up in the install result is > the sanitizer headers. Should this be working, or is it still under > construction? When I tried with LLVM 3.3 I was getting a bunch of syntax > errors from MSVC in compiler-rt, so presumably it wasn't yet > MSVC-compatible at that time. Has the MSVC build just been disabled > somewhere to avoid this? > > Thanks, > Tony > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Saleem Abdulrasool compnerd (at) compnerd (dot) org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140922/f7f812c4/attachment.html>
I know we build at least lib/sanitizer_common and lib/asan. I don't know about lib/builtins. On Mon, Sep 22, 2014 at 8:09 PM, Tony Kelman <kelman at berkeley.edu> wrote:> I’m trying to figure out how to build compiler-rt 3.5.0 with Visual Studio > 2013. In an autotools build or cmake on Linux, I believe putting the > compiler-rt sources under llvm/projects is enough to build them > automatically. Do I need to do anything specific to get the same with MSVC? > I've tried setting -DLLVM_BUILD_EXTERNAL_COMPILER_RT either ON or OFF, > but can't find any evidence of compiler-rt getting built. If I build > compiler-rt separately, pointing it to an installed LLVM build with > -DLLVM_CONFIG_PATH, the only thing that ends up in the install result is > the sanitizer headers. Should this be working, or is it still under > construction? When I tried with LLVM 3.3 I was getting a bunch of syntax > errors from MSVC in compiler-rt, so presumably it wasn't yet > MSVC-compatible at that time. Has the MSVC build just been disabled > somewhere to avoid this? > > Thanks, > Tony > > _______________________________________________ > 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/20140922/d8641206/attachment.html>
Thanks Reid and Saleem.> Creating a custom VS solution should allow you to do this I believe.I’d prefer to limit my interactions with Visual Studio to cmake and the command line if at all possible. The difference in LLVM's build time was striking, going through the GUI vs not.> I know we build at least lib/sanitizer_common and lib/asan. I don't know > about lib/builtins.I think builtins should have what I'm looking for here. I was able to get Julia to a working REPL with an MSVC build, but some uses of int128 intrinsics are crapping out. -Tony