gcc-main.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* "main" for the compiler driver.
  2. Copyright (C) 1987-2015 Free Software Foundation, Inc.
  3. This file is part of GCC.
  4. GCC is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  9. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  11. for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GCC; see the file COPYING3. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. /* This source file contains "main" for the compiler driver.
  16. All of the real work is done within gcc.c; we implement "main"
  17. in here for the "gcc" binary so that gcc.o can be used in
  18. libgccjit.so. */
  19. #include "config.h"
  20. #include "system.h"
  21. #include "coretypes.h"
  22. #include "tm.h"
  23. #include "xregex.h"
  24. #include "obstack.h"
  25. #include "intl.h"
  26. #include "prefix.h"
  27. #include "gcc.h"
  28. /* Implement the top-level "main" within the driver in terms of
  29. driver::main (implemented in gcc.c). */
  30. extern int main (int, char **);
  31. int
  32. main (int argc, char **argv)
  33. {
  34. driver d;
  35. return d.main (argc, argv);
  36. }