I think both of the situations are basically the same with basically the same outcomes - if the user picks the "correct" build target (either through the default or explicitly), they're happy, if not, they're unhappy. Each one of these hurdles is a place where people can get frustrated and give up. The downside to the developer situation is that they waste a few hours doing a build that they can't debug, then they have to track down someone willing to tell them what they've done wrong, and then they have to do another build that will take even longer. I think you're hand-waving away the burden this adds to folks new to the community. I agree that it might be hard to guess "right" but the consequences are different and more confusing for people that are just getting started with LLVM. The downside for a developer cloning and building a release build is often not utter confusion and sending questions in discord / discourse, but just rebuild with debug turned on. The downside for a user doing a debug build by default is that they very often run out of RAM and diskspace because the debug build is bigger and more RAM hungry when not using a decent linker. Without some measurements of how users are getting to the source in the first place, I don't think we can reasonably pick a default for all situations and call it better than the current one. If they're snagging source from the release downloads page, they're probably not doing active development with that and would want a release build of some kind and the current behavior is a burden/surprise/annoyance. If people are doing a git clone of the main branch, I think they're more often developers and would want a debug build and switching to release will be a burden/surprise/annoyance. Personally, I think the default depends entirely on who is doing the download and from where. So I wouldn't think this would be an issue if we went this route. I predominately use the MSVC built-in cmake support these days, and that has a separate way to set CMAKE_BUILD_TYPE that always defaults to *something* as best I can tell (it seems to set it to Debug, but I don't know if that's because of our CMake settings or not). I'd have to test against the patch that turns it into an error to know for sure. Not sure if that could cause issues for multi-configuration users (if that's at all possible in LLVM), maybe can chime in (assuming that you use the Visual Studio generator)? If we can't resolve the targeted audience, what about erroring out when CMAKE_BUILD_TYPE isn't defined?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |