-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add global option to set default toolchain option of "debug", and enable it by default #4688
base: 5.0.x
Are you sure you want to change the base?
Conversation
…iler object. This needs to be deferred due to how easybuild will need to be able to import the class before build_option is ready. The command line option has been changed to a flag, as optparse can't deal with bool types.
OK the optparser thing won't permit setting bools in any way. Listing options they get converted to strings, which is ugly to work with, and optparse doesn't support Also, due to how classes are sneakily initialized by EB, the static class variables aren't always defined, so, they might be |
@@ -392,6 +392,7 @@ def override_options(self): | |||
'debug-lmod': ("Run Lmod modules tool commands in debug module", None, 'store_true', False), | |||
'default-opt-level': ("Specify default optimisation level", 'choice', 'store', DEFAULT_OPT_LEVEL, | |||
Compiler.COMPILER_OPT_FLAGS), | |||
'default-debug-symbols': ("Sets default value of debug toolchain option", None, 'store_true', True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe retain-debug-symbols-by-default
is a better name for this configuration option?
Enabling it by default makes sense I think, there should be no fallout of that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I won't insist, though I find the wording of "retain" a bit strange, reads to me that we were intentionally stripping them out.
@@ -82,7 +82,7 @@ class Compiler(Toolchain): | |||
'loose': (False, "Loose precision"), | |||
'veryloose': (False, "Very loose precision"), | |||
'verbose': (False, "Verbose output"), | |||
'debug': (False, "Enable debug"), | |||
'debug': (None, "Enable or disables debug symbols"), # refers to default-debug-symbols build option by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'debug': (None, "Enable or disables debug symbols"), # refers to default-debug-symbols build option by default | |
# default value for 'debug' toolchain option is determined by retain-debug-symbols-by-default configuration option | |
'debug': (None, "Retain debug symbols"), |
@@ -175,6 +175,10 @@ def set_variables(self): | |||
|
|||
def _set_compiler_toolchainoptions(self): | |||
"""Set the compiler related toolchain options""" | |||
# Initialize default value of debug symbols based on global build option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Initialize default value of debug symbols based on global build option | |
# Initialize default value of 'debug' toolchain option based on global configuration option option |
Also defaults to "true" as was discussed for 5.0.x.
Those concerned with disk space can consider switching this back to false.
Disclaimer: It's getting late and I'm really not sure if i can get away with inserting the default value of "debug" in the compiler option map like that. Not sure if build_option is guaranteed to be initialized when that static dict is defined.