File tree 1 file changed +7
-16
lines changed
1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -456,22 +456,13 @@ def _parse_my_own_version_from_module_dot_bazel(ctx):
456
456
def _extension_impl (ctx ):
457
457
toolchain = None
458
458
for module in ctx .modules :
459
- if module .is_root :
460
- if not module .tags .toolchain :
461
- pass
462
- elif len (module .tags .toolchain ) == 1 :
463
- toolchain = module .tags .toolchain [0 ]
464
- else :
465
- _fail ("The root module may not specify multiple `toolchain` " +
466
- "tags. Found %r `toolchain` tags specified." % (
467
- len (module .tags .toolchain ),
468
- ))
469
- elif module .tags .toolchain :
470
- _fail ("A non-root module may not specify any `toolchain` tags. " +
471
- "Found %r `toolchain` tags specified by module %r." % (
472
- len (module .tags .toolchain ),
473
- module .name ,
474
- ))
459
+ if not module .is_root or not module .tags .toolchain :
460
+ continue
461
+ toolchain = module .tags .toolchain [0 ]
462
+ if len (module .tags .toolchain ) >= 2 :
463
+ print ("The root module specified two or more `toolchain` tags. " +
464
+ "Using only the first of %r `toolchain` tags specified." % (
465
+ len (module .tags .toolchain )))
475
466
if toolchain == None :
476
467
python_configure (
477
468
name = "local_config_python" ,
You can’t perform that action at this time.
0 commit comments