lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] git commit: Regenerate charmonizer.c
Date Mon, 10 Mar 2014 20:37:57 GMT
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master c0cd0f60a -> 6393be873


Regenerate charmonizer.c

Add /MD flag on Windows.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/6393be87
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/6393be87
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/6393be87

Branch: refs/heads/master
Commit: 6393be87354ff742f6f812047ee944373ba10cc0
Parents: c0cd0f6
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Mon Mar 10 21:25:39 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Mar 10 21:25:39 2014 +0100

----------------------------------------------------------------------
 compiler/common/charmonizer.c | 18 +++++++++++-------
 runtime/common/charmonizer.c  | 18 +++++++++++-------
 2 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6393be87/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index d30d951..eb666e5 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -1836,16 +1836,20 @@ chaz_CFlags_set_warnings_as_errors(chaz_CFlags *flags) {
 void
 chaz_CFlags_compile_shared_library(chaz_CFlags *flags) {
     const char *string;
-    if (flags->style != CHAZ_CFLAGS_STYLE_GNU
-        || strcmp(chaz_OS_shared_lib_ext(), ".dll") == 0
-       ) {
-        return;
+    if (flags->style == CHAZ_CFLAGS_STYLE_MSVC) {
+        string = "/MD";
     }
-    if (chaz_OS_is_darwin()) {
-        string = "-fno-common";
+    else if (flags->style != CHAZ_CFLAGS_STYLE_GNU) {
+        const char *shlib_ext = chaz_OS_shared_lib_ext();
+        if (strcmp(shlib_ext, ".dylib") == 0) {
+            string = "-fno-common";
+        }
+        else if (strcmp(shlib_ext, ".so") == 0) {
+            string = "-fPIC";
+        }
     }
     else {
-        string = "-fPIC";
+        return;
     }
     chaz_CFlags_append(flags, string);
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/6393be87/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c
index 329499d..d0a6bc4 100644
--- a/runtime/common/charmonizer.c
+++ b/runtime/common/charmonizer.c
@@ -1836,16 +1836,20 @@ chaz_CFlags_set_warnings_as_errors(chaz_CFlags *flags) {
 void
 chaz_CFlags_compile_shared_library(chaz_CFlags *flags) {
     const char *string;
-    if (flags->style != CHAZ_CFLAGS_STYLE_GNU
-        || strcmp(chaz_OS_shared_lib_ext(), ".dll") == 0
-       ) {
-        return;
+    if (flags->style == CHAZ_CFLAGS_STYLE_MSVC) {
+        string = "/MD";
     }
-    if (chaz_OS_is_darwin()) {
-        string = "-fno-common";
+    else if (flags->style != CHAZ_CFLAGS_STYLE_GNU) {
+        const char *shlib_ext = chaz_OS_shared_lib_ext();
+        if (strcmp(shlib_ext, ".dylib") == 0) {
+            string = "-fno-common";
+        }
+        else if (strcmp(shlib_ext, ".so") == 0) {
+            string = "-fPIC";
+        }
     }
     else {
-        string = "-fPIC";
+        return;
     }
     chaz_CFlags_append(flags, string);
 }


Mime
View raw message