#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,
/* 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,
{ 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" },
#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;
}
}