-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should util/quickstart/setchplenv.bash use system LLVM when available? #20273
Comments
I suppose another possibility would be to add a sibling to |
To clarify, how does having [Related: should the user have a separate variable that says where to get the support libraries from given that it seems a little weird to say "LLVM=none" and then have the makefiles say "OK, I won't use LLVM [but will use your system|bundled support libraries without you being any the wiser]." |
Yes, currently.
Perhaps, but at least today,
That seems like a pretty good argument.
Yes if we wanted to try to expose these details to the user, we could have e.g. |
Thanks for confirming. To me, the approach we're sketching in the comment just above seems "obviously attractive" (by making things more explicit) and preferable to simply inferring That said, it also raises the more general question that hadn't occurred to me, taking build-time out of the equation: Since defaulting to the system LLVM doesn't really increase build-time relative to the C back-end, and could also arguably improve the user experience by not bringing differences between back-end C compilers into the equation, would it make sense to have quickstart default to CHPL_LLVM=system when available by the argument of "nothing lost, something potentially gained" (again, ignoring the build-time issues in the OP here). I think the reservations I have about that are:
The second gave me pause initially, but maybe inappropriately: After all, when users have problems, I don't think we often say "Oh, you're not using this precise quickstart configuration, so please do make these changes." We just help them with their bugs. And also, we're arguably better at debugging configurations that are more like the preferred configuration than the quickstart configuration... |
I've made an initial attempt at addressing this in PR #20396. |
Add CHPL_LLVM_SUPPORT and adjust quickstart Follow-up to PR #19565. This PR takes two steps to improve the situation after PR #19565. First, it adds `CHPL_LLVM_SUPPORT` as a `printchplenv` variable. This variable indicates where to get the LLVM Support Library (which is currently required to build the compiler). It can be `bundled` or `system`. See issue #20380. On the name of this variable, I wondered if `CHPL_LLVM_SUPPORT_LIBRARY` would be a better name? `CHPL_LLVM_SUPPORT` could be interpreted as "does Chapel build with LLVM support" but that is what `CHPL_LLVM` does. On the other hand, since it appears in `printchplenv --all` within the `CHPL_LLVM` block, I think `CHPL_LLVM_SUPPORT` is OK. Second, it adjusts the quickstart scripts to set `CHPL_LLVM=system` if a compatible system LLVM is detected. See issue #20273. Reviewed by @daviditen - thanks! - [x] full local testing - [x] make check with CHPL_LLVM unset where no system LLVM exists produces "Please set the environment variable CHPL_LLVM to a supported value." error - [x] make check with CHPL_LLVM=none where no system LLVM exists - [x] make check with CHPL_LLVM=none where a system LLVM exists - [x] make check with CHPL_LLVM=bundled - [x] make check with CHPL_LLVM=system
Closing this issue because PR #20396 addressed it. |
This is potentially a tangent to what's discussed here, but should we change something in our test system as Probably, that's because we don't source the LLVM setup script before they run. But I feel like given the direction here, we should make these settings use system LLVM, too. I suspect that's the more common "quickstart" environment going forward. Edit: I wrote this comment, but then opened https://github.com/Cray/chapel-private/issues/4221 for it. |
Now that we are building the LLVM support library when CHPL_LLVM=none, I am finding that a quicker quickstart, for me personally, would set CHPL_LLVM=system. However if LLVM isn't installed, that's definitely not the right setting for quickstart. But
util/quickstart/setchplenv.bash
could run some of our chplenv Python code in order to determine if a system LLVM would be used and in that case leave CHPL_LLVM=system.Is that a good idea? Would we want to do it for other libraries?
Another way to think about this question is this: which is more important about quickstart - that it is quick? or that it is a consistent configuration across systems?
The text was updated successfully, but these errors were encountered: