Permalink
Browse files

Use "dll" instead of "so" on cygwin.

  • Loading branch information...
1 parent 1470c8b commit f5648343baf657386a533d280f7017570277b853 @hiyuh hiyuh committed with Apr 11, 2012
Showing with 11 additions and 1 deletion.
  1. +6 −1 src/link.c
  2. +5 −0 src/rt/jit.c
View
@@ -153,7 +153,12 @@ static void link_shared(tree_t top)
link_arg_f("%s", SYSTEM_CC);
link_arg_f("-shared");
link_arg_f("-o");
- link_output(top, "so"); // TODO: different on OS X, etc.
+ // TODO: different on OS X, etc.
+#if defined __CYGWIN__
+ link_output(top, "dll");
+#else
+ link_output(top, "so");
+#endif
link_output(top, "s");
link_exec();
View
@@ -155,7 +155,12 @@ void jit_init(ident_t top)
char bc_fname[64], so_fname[64];;
snprintf(bc_fname, sizeof(bc_fname), "_%s.bc", istr(final));
+ // TODO: different on OS X, etc.
+#if defined __CYGWIN__
+ snprintf(so_fname, sizeof(so_fname), "_%s.dll", istr(final));
+#else
snprintf(so_fname, sizeof(so_fname), "_%s.so", istr(final));
+#endif
char bc_path[PATH_MAX], so_path[PATH_MAX];
lib_realpath(lib_work(), bc_fname, bc_path, sizeof(bc_path));

0 comments on commit f564834

Please sign in to comment.