add a panic for unimplemented initializer creation
[cparser] / driver / firm_cmdline.c
index 955813d..c7f563b 100644 (file)
 #include <libfirm/firm.h>
 #include <libfirm/be.h>
 
+#ifdef _WIN32
+#define DEFAULT_OS OS_SUPPORT_WIN32
+#else
+#define DEFAULT_OS OS_SUPPORT_LINUX
+#endif
+
 /* optimization settings */
 struct a_firm_opt firm_opt = {
   /* enabled         = */ TRUE,
@@ -56,7 +62,7 @@ struct a_firm_opt firm_opt = {
   /* vrfy            = */ FIRM_VERIFICATION_ON,
   /* check_all       = */ FALSE,
   /* lower           = */ TRUE,
-  /* os_support      = */ OS_SUPPORT_LINUX,
+  /* os_support      = */ DEFAULT_OS,
   /* honor_restrict  = */ TRUE,
   /* lower_bitfields = */ TRUE,
   /* pic             = */ FALSE,
@@ -239,7 +245,9 @@ static const struct params {
   { X("stat-pattern"),           &firm_dump.stat_pattern,    1, "misc: Firm statistic calculates most used pattern" },
   { X("stat-dag"),               &firm_dump.stat_dag,        1, "misc: Firm calculates DAG statistics" },
   { X("firm-asm"),               &firm_dump.gen_firm_asm,    1, "misc: output Firm assembler" },
-  { X("win32"),                  &firm_opt.os_support,       OS_SUPPORT_MINGW, "misc: generate MinGW code" },
+  { X("win32"),                  &firm_opt.os_support,       OS_SUPPORT_WIN32, "misc: generate Win32 code" },
+  { X("mac"),                    &firm_opt.os_support,       OS_SUPPORT_MACHO, "misc: generate MacOS code" },
+  { X("linux"),                  &firm_opt.os_support,       OS_SUPPORT_LINUX, "misc: generate Linux-ELF code" },
   { X("ycomp"),                  &firm_opt.ycomp_dbg,        1, "misc: enable yComp debugger extension" },
   { X("ycomp-host=<hostname>"),  NULL,                       0, "misc: yComp host" },
   { X("ycomp-port=<port>"),      NULL,                       0, "misc: yComp port" },
@@ -371,12 +379,6 @@ int firm_option(const char *opt)
 #endif /* FIRM_BACKEND */
         return res;
       }
-#ifdef FIRM_BACKEND
-      /* OS option must be set to the backend */
-      else if (firm_options[i].flag == &firm_opt.os_support)
-        firm_be_option(firm_opt.os_support == OS_SUPPORT_MINGW ?
-          "ia32-gasmode=mingw" : "ia32-gasmode=linux");
-#endif /* FIRM_BACKEND */
       break;
     }
   }