I've come across a couple errors when building LLVM 2.1 in VC++ 2005. 1) CodeGen/RegisterCoalescer.cpp is not included in the project 2) System/Win32/DynamicLibrary.inc - ELM_Callback is declared with a PSTR ModuleName argument. This causes a compile error - the callback typedef specifies PCSTR. Also, I'd like to suggest adding the following to config.h, to eliminate the spurious deprecation warnings: #define _CRT_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #define _CRT_NONSTDC_NO_WARNINGS And moving #include "llvm/Config/config.h" in all the files above any other includes, so those will have the proper effect. Finally, is the JIT considered stable under Windows? -- Cory Nelson
On Wed, 7 Nov 2007, Cory Nelson wrote:> I've come across a couple errors when building LLVM 2.1 in VC++ 2005.You might want to try LLVM SVN. I believe Hartmut has made several improvements.> Also, I'd like to suggest adding the following to config.h, to > eliminate the spurious deprecation warnings: > > #define _CRT_SECURE_NO_WARNINGS > #define _SCL_SECURE_NO_WARNINGS > #define _CRT_NONSTDC_NO_WARNINGS > > And moving #include "llvm/Config/config.h" in all the files above any > other includes, so those will have the proper effect.If LLVM SVN doesn't have these improvements, please consider sending in a patch, thanks!> Finally, is the JIT considered stable under Windows?Yes, several groups are using it. -Chris -- http://nondot.org/sabre/ http://llvm.org/
Cory,> I've come across a couple errors when building LLVM 2.1 in VC++ 2005. > > 1) CodeGen/RegisterCoalescer.cpp is not included in the projectI didn't update the build system for a week or so. I'll try to squeeze it in asap.> 2) System/Win32/DynamicLibrary.inc - ELM_Callback is declared > with a PSTR ModuleName argument. This causes a compile error > - the callback typedef specifies PCSTR.I never ran into this problem. How can I reproduce this?> Also, I'd like to suggest adding the following to config.h, > to eliminate the spurious deprecation warnings: > > #define _CRT_SECURE_NO_WARNINGS > #define _SCL_SECURE_NO_WARNINGS > #define _CRT_NONSTDC_NO_WARNINGSI thought to have added it to the project files. If there are place where it's missing, please provide a patch.> And moving #include "llvm/Config/config.h" in all the files > above any other includes, so those will have the proper effect.You lost me here, could you elaorate, please? Regards Hartmut
> Also, I'd like to suggest adding the following to config.h, to > eliminate the spurious deprecation warnings: > > #define _CRT_SECURE_NO_WARNINGS > #define _SCL_SECURE_NO_WARNINGS > #define _CRT_NONSTDC_NO_WARNINGS > > > And moving #include "llvm/Config/config.h" in all the files above any > > other includes, so those will have the proper effect.Can we guard those defines like so? #if defined _MSC_VER && _MSC_VER >= 1300 #if !defined _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #if !defined _SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #endif #if !defined _CRT_NONSTDC_NO_WARNINGS #define _CRT_NONSTDC_NO_WARNINGS #endif #endif That way I don't get a warning when I include an LLVM header in a file that already happens to define these. Thanks, Jaap Suter
> I've come across a couple errors when building LLVM 2.1 in VC++ 2005. > > 1) CodeGen/RegisterCoalescer.cpp is not included in the project > 2) System/Win32/DynamicLibrary.inc - ELM_Callback is declared > with a PSTR ModuleName argument. This causes a compile error > - the callback typedef specifies PCSTR. > > Also, I'd like to suggest adding the following to config.h, > to eliminate the spurious deprecation warnings: > > #define _CRT_SECURE_NO_WARNINGS > #define _SCL_SECURE_NO_WARNINGS > #define _CRT_NONSTDC_NO_WARNINGSEverything should be fine now. Regards Hartmut
Seemingly Similar Threads
- [LLVMdev] [PATCH] LLVM 3.0 broken in lib/Support/Windows/DynamicLibrary.inc
- [LLVMdev] LLVM 2.1 with VC++
- [LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
- [LLVMdev] LLVM 2.1 with VC++
- [LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?