Skip to content

Commit

Permalink
Merge pull request #6250 from LemonBoy/manglelin
Browse files Browse the repository at this point in the history
Fix issue 922 - Don't mangle exported symbol names on linux.
  • Loading branch information
WalterBright committed Nov 15, 2016
2 parents 59d32f4 + fdde441 commit 0152061
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tocsym.d
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,12 @@ Symbol *toImport(Symbol *sym)
import core.stdc.stdlib : alloca;
char *id = cast(char *) alloca(6 + strlen(n) + 1 + type_paramsize(sym.Stype).sizeof*3 + 1);
int idlen;
if (sym.Stype.Tmangle == mTYman_std && tyfunc(sym.Stype.Tty))
if (config.exe != EX_WIN32 && config.exe != EX_WIN64)
{
id = n;
idlen = cast(int)strlen(n);
}
else if (sym.Stype.Tmangle == mTYman_std && tyfunc(sym.Stype.Tty))
{
if (config.exe == EX_WIN64)
idlen = sprintf(id,"__imp_%s",n);
Expand Down

0 comments on commit 0152061

Please sign in to comment.