@@ -261,9 +261,9 @@ def compile_scc_to_ir(
261261 # Switch to lower abstraction level IR.
262262 lower_ir (fn , compiler_options )
263263 # Calculate implicit module dependencies (needed for librt)
264- capsule_deps = find_implicit_capsule_dependencies (fn )
265- if capsule_deps is not None :
266- module .implicit_imports .update (capsule_deps )
264+ capsules = find_implicit_capsule_dependencies (fn )
265+ if capsules is not None :
266+ module .capsules .update (capsules )
267267 # Perform optimizations.
268268 do_copy_propagation (fn , compiler_options )
269269 do_flag_elimination (fn , compiler_options )
@@ -609,7 +609,7 @@ def generate_c_for_modules(self) -> list[tuple[str, str]]:
609609 ext_declarations .emit_line ("#include <CPy.h>" )
610610 if self .compiler_options .depends_on_librt_internal :
611611 ext_declarations .emit_line ("#include <librt_internal.h>" )
612- if any ("librt.base64" in mod .implicit_imports for mod in self .modules .values ()):
612+ if any ("librt.base64" in mod .capsules for mod in self .modules .values ()):
613613 ext_declarations .emit_line ("#include <librt_base64.h>" )
614614
615615 declarations = Emitter (self .context )
@@ -1041,7 +1041,7 @@ def emit_module_exec_func(
10411041 emitter .emit_line ("if (import_librt_internal() < 0) {" )
10421042 emitter .emit_line ("return -1;" )
10431043 emitter .emit_line ("}" )
1044- if "librt.base64" in module .implicit_imports :
1044+ if "librt.base64" in module .capsules :
10451045 emitter .emit_line ("if (import_librt_base64() < 0) {" )
10461046 emitter .emit_line ("return -1;" )
10471047 emitter .emit_line ("}" )
0 commit comments