nobled
2010-Aug-03 12:43 UTC
[LLVMdev] [PATCH] MSVC: Allow choosing different CRT for different build types
Óscar Fuentes <ofv at wanadoo.es> wrote:> I'm a bit wary about this patch. So much complexity for so petty > feature... Maybe the right thing is to determine the scenarios where > people set LLVM_USE_CRT. Maybe all we need is to define another build > type that inherits from Release which uses the debug version of the CRT. > > Anyways, the patch have some issues: remove commented-out code, use the > `foreach' instead of `FOREACH', as in the rest of the code (same for > other keywords), either remove the user-configurable variable > LLVM_USE_CRT or exit with an error if the user sets it, add an extensive > comment about the motivation of the code and about how it achieves its > purpose. Maybe put it on a new file under cmake/modules for stuff > specific of Visual Studio.Sure; fixed-up version attached.> > But first I'll like to see if we can simplify the requirements. > > [snip]I'm not sure it's possible to simplify it too much--we still need the choice between dynamic and static CRT, too. Like Mesa/Gallium3d: by default CMake has LLVM compiled with the dynamically linked CRT, but Gallium needs a static CRT and right now it expects LLVM's Debug build to use /MTd and Release to use /MT. If we add a bunch of new build-types like DebugStatic, ReleaseStatic, ReleaseStaticDebug, etc for all the use cases, it seems like it'd end up just as complicated as having a separate option for each type. -------------- next part -------------- A non-text attachment was scrubbed... Name: add-build-config-crt-selection-v8.patch Type: text/x-patch Size: 4889 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100803/bb0f49e6/attachment.bin>
Óscar Fuentes
2010-Aug-03 15:04 UTC
[LLVMdev] [PATCH] MSVC: Allow choosing different CRT for different build types
nobled <nobled at dreamwidth.org> writes: [snip] Please move the new code to a new file named cmake/modules/WindowsCRTControl.cmake and include it from the top level CMakeLists when LLVM_ON_WIN32.
nobled
2010-Aug-04 20:36 UTC
[LLVMdev] [PATCH] MSVC: Allow choosing different CRT for different build types
Óscar Fuentes <ofv at wanadoo.es> wrote:> The following message is a courtesy copy of an article > that has been posted to gmane.comp.compilers.llvm.devel as well. > > nobled <nobled at dreamwidth.org> writes: > > [snip] > > Please move the new code to a new file named > cmake/modules/WindowsCRTControl.cmake and include it from the top level > CMakeLists when LLVM_ON_WIN32.Isn't it only ever used when "if (MSVC)" though, not on WIN32 in general? (I also refactored some logic with helper macros to try and make it more readable.) -------------- next part -------------- A non-text attachment was scrubbed... Name: add-build-config-crt-selection-v9.patch Type: text/x-patch Size: 5462 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100804/48a19e4e/attachment.bin>
Seemingly Similar Threads
- [LLVMdev] [PATCH] MSVC: Allow choosing different CRT for different build types
- [LLVMdev] [PATCH] MSVC: Allow choosing different CRT for different build types
- [LLVMdev] Linking to the LLVM shared library
- [LLVMdev] Linking to the LLVM shared library
- [LLVMdev] Linking to the LLVM shared library