4949 #include < rapidjson/writer.h>
5050#endif
5151
52- extern std::string lcompilers_unique_ID ;
52+ extern std::string lcompilers_unique_ID_separate_compilation ;
5353
5454namespace {
5555
@@ -1843,6 +1843,7 @@ int main(int argc, char *argv[])
18431843 bool print_rtl_dir = false ;
18441844 bool separate_compilation = false ;
18451845 bool to_jit = false ;
1846+ bool disable_warnings = false ;
18461847
18471848 std::string arg_fmt_file;
18481849 // int arg_fmt_indent = 4;
@@ -1909,7 +1910,7 @@ int main(int argc, char *argv[])
19091910 app.add_flag (" --symtab-only" , compiler_options.symtab_only , " Only create symbol tables in ASR (skip executable stmt)" );
19101911 app.add_flag (" --time-report" , time_report, " Show compilation time report" );
19111912 app.add_flag (" --static" , static_link, " Create a static executable" );
1912- app.add_flag (" --no-warnings" , compiler_options. no_warnings , " Turn off all warnings" );
1913+ app.add_flag (" --no-warnings" , disable_warnings , " Turn off all warnings" );
19131914 app.add_flag (" --no-error-banner" , compiler_options.no_error_banner , " Turn off error banner" );
19141915 app.add_option (" --backend" , arg_backend, " Select a backend (llvm, cpp, x86, wasm, wasm_x86, wasm_x64)" )->capture_default_str ();
19151916 app.add_flag (" --enable-bounds-checking" , compiler_options.bounds_checking , " Turn on index bounds checking" );
@@ -1968,7 +1969,7 @@ int main(int argc, char *argv[])
19681969 app.require_subcommand (0 , 1 );
19691970 CLI11_PARSE (app, argc, argv);
19701971
1971- lcompilers_unique_ID = separate_compilation ? LCompilers::get_unique_ID (): " " ;
1972+ lcompilers_unique_ID_separate_compilation = separate_compilation ? LCompilers::get_unique_ID (): " " ;
19721973
19731974
19741975 if ( compiler_options.po .fast && compiler_options.bounds_checking ) {
@@ -1988,6 +1989,10 @@ int main(int argc, char *argv[])
19881989 compiler_options.po .enable_cpython = true ;
19891990 }
19901991
1992+ if (disable_warnings) {
1993+ compiler_options.show_warnings = false ;
1994+ }
1995+
19911996 if (arg_version) {
19921997 std::string version = LFORTRAN_VERSION;
19931998 std::cout << " LPython version: " << version << std::endl;
0 commit comments