@@ -366,20 +366,18 @@ ASR::Module_t* load_module(Allocator &al, SymbolTable *symtab,
366
366
} else {
367
367
if ( !is_compilation_needed (infile) ) {
368
368
mod1 = load_pycfile (al, input, false );
369
- fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
370
- LFORTRAN_ASSERT (asr_verify (*mod1));
371
- compile_module = false ;
372
369
} else {
373
370
infile.pop_back ();
374
- std::string cmd = " lpython -c --disable-main " + infile;
375
- system (cmd.c_str ());
376
- bool found = set_module_path (infile0c, rl_path, infile,
377
- path_used, input, ltypes, enum_py);
378
- mod1 = load_pycfile (al, input, false );
379
- fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
380
- LFORTRAN_ASSERT (asr_verify (*mod1));
381
- compile_module = false ;
371
+ mod1 = compile_module_till_asr (al, rl_path, infile, loc, err);
372
+ // std::string cmd = "lpython -c --disable-main " + infile;
373
+ // system(cmd.c_str());
374
+ // bool found = set_module_path(infile0c, rl_path, infile,
375
+ // path_used, input, ltypes, enum_py);
376
+ // mod1 = load_pycfile(al, input, false);
382
377
}
378
+ fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
379
+ LFORTRAN_ASSERT (asr_verify (*mod1));
380
+ compile_module = false ;
383
381
}
384
382
385
383
if ( enum_py ) {
@@ -392,12 +390,12 @@ ASR::Module_t* load_module(Allocator &al, SymbolTable *symtab,
392
390
if (ltypes) return nullptr ;
393
391
394
392
if ( compile_module ) {
395
- // mod1 = compile_module_till_asr(al, rl_path, infile, loc, err);
396
- std::string cmd = " lpython -c --disable-main " + infile;
397
- system (cmd.c_str ());
398
- bool found = set_module_path (infile0c, rl_path, infile,
399
- path_used, input, ltypes, enum_py);
400
- mod1 = load_pycfile (al, input, false );
393
+ mod1 = compile_module_till_asr (al, rl_path, infile, loc, err);
394
+ // std::string cmd = "lpython -c --disable-main " + infile;
395
+ // system(cmd.c_str());
396
+ // bool found = set_module_path(infile0c, rl_path, infile,
397
+ // path_used, input, ltypes, enum_py);
398
+ // mod1 = load_pycfile(al, input, false);
401
399
fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
402
400
LFORTRAN_ASSERT (asr_verify (*mod1));
403
401
}
0 commit comments