xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/gcc-main.c (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
11debfc3dSmrg /* "main" for the compiler driver.
2*8feb0f0bSmrg    Copyright (C) 1987-2020 Free Software Foundation, Inc.
31debfc3dSmrg 
41debfc3dSmrg This file is part of GCC.
51debfc3dSmrg 
61debfc3dSmrg GCC is free software; you can redistribute it and/or modify it under
71debfc3dSmrg the terms of the GNU General Public License as published by the Free
81debfc3dSmrg Software Foundation; either version 3, or (at your option) any later
91debfc3dSmrg version.
101debfc3dSmrg 
111debfc3dSmrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
121debfc3dSmrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
131debfc3dSmrg FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
141debfc3dSmrg for more details.
151debfc3dSmrg 
161debfc3dSmrg You should have received a copy of the GNU General Public License
171debfc3dSmrg along with GCC; see the file COPYING3.  If not see
181debfc3dSmrg <http://www.gnu.org/licenses/>.  */
191debfc3dSmrg 
201debfc3dSmrg /* This source file contains "main" for the compiler driver.
211debfc3dSmrg    All of the real work is done within gcc.c; we implement "main"
221debfc3dSmrg    in here for the "gcc" binary so that gcc.o can be used in
231debfc3dSmrg    libgccjit.so.  */
241debfc3dSmrg 
251debfc3dSmrg #include "config.h"
261debfc3dSmrg #include "system.h"
271debfc3dSmrg #include "coretypes.h"
281debfc3dSmrg #include "tm.h"
291debfc3dSmrg #include "xregex.h"
301debfc3dSmrg #include "obstack.h"
311debfc3dSmrg #include "intl.h"
321debfc3dSmrg #include "prefix.h"
33c0a68be4Smrg #include "opt-suggestions.h"
341debfc3dSmrg #include "gcc.h"
351debfc3dSmrg 
361debfc3dSmrg /* Implement the top-level "main" within the driver in terms of
371debfc3dSmrg    driver::main (implemented in gcc.c).  */
381debfc3dSmrg 
391debfc3dSmrg extern int main (int, char **);
401debfc3dSmrg 
411debfc3dSmrg int
main(int argc,char ** argv)421debfc3dSmrg main (int argc, char **argv)
431debfc3dSmrg {
441debfc3dSmrg   driver d (false, /* can_finalize */
451debfc3dSmrg 	    false); /* debug */
461debfc3dSmrg 
471debfc3dSmrg   return d.main (argc, argv);
481debfc3dSmrg }
49