@@ -357,20 +357,18 @@ ASR::Module_t* load_module(Allocator &al, SymbolTable *symtab,
357
357
} else {
358
358
if ( !is_compilation_needed (infile) ) {
359
359
mod1 = load_pycfile (al, input, false );
360
- fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
361
- LFORTRAN_ASSERT (asr_verify (*mod1));
362
- compile_module = false ;
363
360
} else {
364
361
infile.pop_back ();
365
- std::string cmd = " lpython -c --disable-main " + infile;
366
- system (cmd.c_str ());
367
- bool found = set_module_path (infile0c, rl_path, infile,
368
- path_used, input, ltypes, enum_py);
369
- mod1 = load_pycfile (al, input, false );
370
- fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
371
- LFORTRAN_ASSERT (asr_verify (*mod1));
372
- compile_module = false ;
362
+ mod1 = compile_module_till_asr (al, rl_path, infile, loc, err);
363
+ // std::string cmd = "lpython -c --disable-main " + infile;
364
+ // system(cmd.c_str());
365
+ // bool found = set_module_path(infile0c, rl_path, infile,
366
+ // path_used, input, ltypes, enum_py);
367
+ // mod1 = load_pycfile(al, input, false);
373
368
}
369
+ fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
370
+ LFORTRAN_ASSERT (asr_verify (*mod1));
371
+ compile_module = false ;
374
372
}
375
373
376
374
if ( enum_py ) {
@@ -382,12 +380,12 @@ ASR::Module_t* load_module(Allocator &al, SymbolTable *symtab,
382
380
if (ltypes) return nullptr ;
383
381
384
382
if ( compile_module ) {
385
- // mod1 = compile_module_till_asr(al, rl_path, infile, loc, err);
386
- std::string cmd = " lpython -c --disable-main " + infile;
387
- system (cmd.c_str ());
388
- bool found = set_module_path (infile0c, rl_path, infile,
389
- path_used, input, ltypes, enum_py);
390
- mod1 = load_pycfile (al, input, false );
383
+ mod1 = compile_module_till_asr (al, rl_path, infile, loc, err);
384
+ // std::string cmd = "lpython -c --disable-main " + infile;
385
+ // system(cmd.c_str());
386
+ // bool found = set_module_path(infile0c, rl_path, infile,
387
+ // path_used, input, ltypes, enum_py);
388
+ // mod1 = load_pycfile(al, input, false);
391
389
fix_external_symbols (*mod1, *ASRUtils::get_tu_symtab (symtab));
392
390
LFORTRAN_ASSERT (asr_verify (*mod1));
393
391
}
0 commit comments