Permalink
Browse files

Merge pull request #1864 from WalterBright/fix8130

fix Issue 8130 - Memory corruption because without *.def file DMD compil...
  • Loading branch information...
andralex committed Apr 8, 2013
2 parents 2e1547d + efef6e9 commit 3c2e4506f118ce6a9c8f6134123acafa47dec7c2
Showing with 6 additions and 6 deletions.
  1. +2 −4 src/mars.c
  2. +4 −2 src/msc.c
View
@@ -369,9 +369,7 @@ Usage:\n\
-quiet suppress unnecessary messages\n\
-release compile release version\n\
-run srcfile args... run resulting program, passing args\n"
#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
" -shared generate shared library\n"
#endif
" -shared generate shared library (DLL)\n"
" -unittest compile in unit tests\n\
-v verbose\n\
-version=level compile in version code >= level\n\
@@ -572,14 +570,14 @@ int tryMain(size_t argc, char *argv[])
else if (p[4])
goto Lerror;
}
#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
else if (strcmp(p + 1, "shared") == 0
#if TARGET_OSX
// backwards compatibility with old switch
|| strcmp(p + 1, "dylib") == 0
#endif
)
global.params.dll = 1;
#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS
else if (strcmp(p + 1, "fPIC") == 0)
global.params.pic = 1;
#endif
View
@@ -1,6 +1,6 @@
// Compiler implementation of the D programming language
// Copyright (c) 1999-2012 by Digital Mars
// Copyright (c) 1999-2013 by Digital Mars
// All Rights Reserved
// written by Walter Bright
// http://www.digitalmars.com
@@ -71,7 +71,9 @@ void backend_init()
bool exe;
#if TARGET_WINDOS
exe = false;
if (params->run)
if (params->dll)
;
else if (params->run)
exe = true; // EXE file only optimizations
else if (params->link && !global.params.deffile)
exe = true; // EXE file only optimizations

0 comments on commit 3c2e450

Please sign in to comment.