-
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 dashes directly in compiler optimization flags #4698
base: 5.0.x
Are you sure you want to change the base?
Conversation
I finally found the place that actually adds the extra - It boils down to using FlagList, and possible CommandFlagList. I need to find a scenario where CommandFlagList was used withmore than a single argument, but it's all so very deeply hidden and obscured it's impossible to tell where the heck these are coming from. Tests indicate it works like
so i need to find a scenario where this actually used, to ensure i did fix it correctly. |
} | ||
|
||
COMPILER_CC = 'clang' | ||
COMPILER_CXX = 'clang++' | ||
COMPILER_C_UNIQUE_FLAGS = [] | ||
COMPILER_C_UNIQUE_OPTIONS = [] |
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.
Hmm, do we really need to change this?
We have to take into account that people may have their own/custom implementations of classes that derive from Compiler
, they will need to be adjusted accordingly (and we have no easy way to produce a clean error message there, I think)...
@@ -349,6 +349,11 @@ def _set_optimal_architecture(self, default_optarch=None): | |||
optarch = self.COMPILER_OPTIMAL_ARCHITECTURE_OPTION[(self.arch, self.cpu_family)] | |||
|
|||
if optarch is not None: | |||
if not optarch.startswith('-'): | |||
print_warning(f'Specifying optarch "{optarch}" without initial dash is deprecated in EasyBuild 5.') |
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.
use self.log.deprecated
here
@@ -3144,21 +3145,6 @@ def test_env_vars_external_module(self): | |||
expected = {} | |||
self.assertEqual(res, expected) | |||
|
|||
def test_get_flag(self): |
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.
Why is this test removed?
COMPILER_PREC_FLAGS = ['strict', 'precise', 'defaultprec', 'loose', 'veryloose'] # precision flags, ordered ! | ||
COMPILER_OPTIONS = ['debug', 'ieee', 'openmp', 'pic', 'shared', 'static', 'unroll', 'verbose'] # any compiler | ||
COMPILER_OPT_OPTIONS = ['noopt', 'lowopt', DEFAULT_OPT_LEVEL, 'opt'] # optimisation args, ordered ! | ||
COMPILER_PREC_OPTIONS = ['strict', 'precise', 'defaultprec', 'loose', 'veryloose'] # precision flags, ordered ! |
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.
Do we really need these renames from _FLAGS
to _OPTIONS
?
I'd say -O3
is a compiler flag as well as an option, there's no crystal clear definition there, so let's not cause any "pain" by renaming this (since it's not really internal)
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.
At the very least there should be a warning if COMPILER_PREC_FLAGS
(or any other *_FLAGS
being renamed) is still being used...
Fixes #4269
It was extremely difficult to read this code, partly because a bunch of variables like:
were, in fact, not flags, but options. I renamed these variables because it was so misleading. To add to this, we also have two COMPILER_FLAGS used for different things (neither of them are flags)