|
33 | 33 | * Damian Alvarez (Forschungszentrum Juelich GmbH) |
34 | 34 | """ |
35 | 35 | from easybuild.tools import systemtools |
36 | | -from easybuild.tools.build_log import EasyBuildError, print_warning |
| 36 | +from easybuild.tools.build_log import EasyBuildError |
37 | 37 | from easybuild.tools.config import build_option |
38 | 38 | from easybuild.tools.toolchain.constants import COMPILER_VARIABLES |
39 | 39 | from easybuild.tools.toolchain.toolchain import Toolchain |
@@ -299,7 +299,7 @@ def _set_compiler_flags(self): |
299 | 299 | extraflags = self.options.option(extra) |
300 | 300 | if not extraflags or extraflags[0] != '-': |
301 | 301 | raise EasyBuildError("toolchainopts %s: '%s' must start with a '-'." % (extra, extraflags)) |
302 | | - self.variables.nappend_el(var, extraflags[1:]) |
| 302 | + self.variables.nappend_el(var, extraflags) |
303 | 303 |
|
304 | 304 | def _set_optimal_architecture(self, default_optarch=None): |
305 | 305 | """ |
@@ -356,8 +356,8 @@ def _set_optimal_architecture(self, default_optarch=None): |
356 | 356 | optarch = self.COMPILER_OPTIMAL_ARCHITECTURE_OPTION[(self.arch, self.cpu_family)] |
357 | 357 |
|
358 | 358 | if optarch is not None: |
359 | | - if not optarch.startswith('-'): |
360 | | - print_warning(f'Specifying optarch "{optarch}" without initial dash is deprecated in EasyBuild 5.') |
| 359 | + if optarch and not optarch.startswith('-'): |
| 360 | + self.log.deprecated(f'Specifying optarch "{optarch}" without initial dash is deprecated.', '6.0') |
361 | 361 | # Add flags for backwards compatibility |
362 | 362 | optarch = '-' + optarch |
363 | 363 |
|
|
0 commit comments