@@ -91,15 +91,7 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
9191 tweaked_ecs_path , tweaked_ecs_deps_path = None , None
9292 if targetdirs is not None :
9393 tweaked_ecs_path , tweaked_ecs_deps_path = targetdirs
94- # make sure easyconfigs all feature the same toolchain (otherwise we *will* run into trouble)
95- toolchains = nub (['%(name)s/%(version)s' % ec ['ec' ]['toolchain' ] for ec in easyconfigs ])
96- if len (toolchains ) > 1 :
97- raise EasyBuildError ("Multiple toolchains featured in easyconfigs, --try-X not supported in that case: %s" ,
98- toolchains )
99- # Toolchain is unique, let's store it
100- source_toolchain = easyconfigs [- 1 ]['ec' ]['toolchain' ]
10194 modifying_toolchains_or_deps = False
102- target_toolchain = {}
10395 src_to_dst_tc_mapping = {}
10496 revert_to_regex = False
10597
@@ -117,6 +109,16 @@ def tweak(easyconfigs, build_specs, modtool, targetdirs=None):
117109 revert_to_regex = True
118110
119111 if not revert_to_regex :
112+ # make sure easyconfigs all feature the same toolchain (otherwise we *will* run into trouble)
113+ toolchains = nub (['%(name)s/%(version)s' % ec ['ec' ]['toolchain' ] for ec in easyconfigs ])
114+ if len (toolchains ) > 1 :
115+ raise EasyBuildError ("Multiple toolchains featured in easyconfigs, "
116+ "--try-X not supported in that case: %s" ,
117+ toolchains )
118+ # Toolchain is unique, let's store it
119+ source_toolchain = easyconfigs [- 1 ]['ec' ]['toolchain' ]
120+ target_toolchain = {}
121+
120122 # we're doing something that involves the toolchain hierarchy;
121123 # obtain full dependency graph for specified easyconfigs;
122124 # easyconfigs will be ordered 'top-to-bottom' (toolchains and dependencies appearing first)
0 commit comments