Skip to content
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

[Bug]: --print-chpl-settings does not pick up changes from the compiler arguments #25958

Open
jabraham17 opened this issue Sep 18, 2024 · 4 comments · May be fixed by #25962
Open

[Bug]: --print-chpl-settings does not pick up changes from the compiler arguments #25958

jabraham17 opened this issue Sep 18, 2024 · 4 comments · May be fixed by #25962

Comments

@jabraham17
Copy link
Member

Users currently have a number of ways to select compiler configurations with Chapel environment variables. They can set the environment variables, they can write a chplconfig file, or they can change the variable with a command line flag.

For example, CHPL_GMP=none chpl ... and chpl --gmp=none ... are equivanelt.

However, when printing out the current compiler configuration using --print-chpl-settings, these are not equivalent. CHPL_GMP=none chpl --print-chpl-settings shows the current compiler configuration with CHPL_GMP: none *, while chpl --gmp=none --print-chpl-settings shows whatever the default was.

This does not impact the correctness, as --gmp=none still works as far as selecting the right runtime build. But it can be confusing that --print-chpl-settings does not match.

@bradcray
Copy link
Member

I'm really curious what the source of this turns out to be (particularly if I'm responsible… 😬 )

@mppf
Copy link
Member

mppf commented Sep 18, 2024

The compiler has a map of such environment variables. However, it doesn't look like we setenv on all of them. We do setenv on a few specific ones in compiler/main/driver.cpp. I imagine we could setenv all of these within setChapelEnvs.

@jabraham17
Copy link
Member Author

Calling setenv in setChapelEnvs results in all environment variables being set explicitly, which means all environment variables have the little * after them when printed, making it meaningless. However, I think the adding setenv to setEnv should solve the problem, so setenv is only called when it is actually overriden

@mppf
Copy link
Member

mppf commented Sep 18, 2024

do us all a favor and rename setEnv so it's not confused with setenv :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants