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: Compile object files for DLLs with /MD
Date Mon, 10 Mar 2014 20:37:18 GMT
Repository: lucy-charmonizer
Updated Branches:
  refs/heads/master 4132403c4 -> aa2afed33


Compile object files for DLLs with /MD

This is needed to pass CRT objects between DLLs and to safely malloc in
one DLL and free in another.

See http://msdn.microsoft.com/en-us/library/ms235460.aspx


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

Branch: refs/heads/master
Commit: aa2afed330ed96cab49582240af13cb5be3514df
Parents: 4132403
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Mon Mar 10 21:32:06 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Mar 10 21:32:06 2014 +0100

----------------------------------------------------------------------
 src/Charmonizer/Core/CFlags.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/aa2afed3/src/Charmonizer/Core/CFlags.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/CFlags.c b/src/Charmonizer/Core/CFlags.c
index f526a7d..a4965dc 100644
--- a/src/Charmonizer/Core/CFlags.c
+++ b/src/Charmonizer/Core/CFlags.c
@@ -192,16 +192,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