Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/ddmd/dclass.d
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,10 @@ extern (C++) class ClassDeclaration : AggregateDeclaration
auto sc2 = super.newScope(sc);
if (isCOMclass())
{
if (global.params.isWindows)
sc2.linkage = LINKwindows;
else
{
/* This enables us to use COM objects under Linux and
* work with things like XPCOM
*/
sc2.linkage = LINKc;
}
/* This enables us to use COM objects under Linux and
* work with things like XPCOM
*/
sc2.linkage = Target.systemLinkage();
}
return sc2;
}
Expand Down
3 changes: 2 additions & 1 deletion src/ddmd/parse.d
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import ddmd.root.filename;
import ddmd.root.outbuffer;
import ddmd.root.rmem;
import ddmd.root.rootobject;
import ddmd.target;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, adding this line brings in the rest of the compiler, including the backend, as a dependency on this module. The parser was separate from most of the rest of the compiler in this PR: #6625.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm, you're too late.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erm, you're too late.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but that doesn't mean it can't be fixed now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I mean that the fix was done two days ago, and should have gone in yesterday.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently the Jenkins ci is broken and preventing auto merges. In any case you are making a claim that falls on deaf ears because the fix was already made available 24 hours ago.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind linking to the PR or commit that fixed this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to look at the PR and commit history to find the fix, but was unable to find it.

Copy link
Contributor

@jpf91 jpf91 May 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

import ddmd.tokens;

// How multiple declarations are parsed.
Expand Down Expand Up @@ -2193,7 +2194,7 @@ final class Parser(AST) : Lexer
}
else if (id == Id.System)
{
link = global.params.isWindows ? LINKwindows : LINKc;
link = Target.systemLinkage();
}
else
{
Expand Down
9 changes: 9 additions & 0 deletions src/ddmd/target.d
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ struct Target
else
static assert(0, "fix this");
}

extern (C++) static const(char)* cppTypeInfoMangle(ClassDeclaration cd)
{
static if (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS)
Expand All @@ -451,6 +452,14 @@ struct Target
else
static assert(0, "fix this");
}

/**
* Return the default system linkage for the target.
*/
extern (C++) static LINK systemLinkage()
{
return global.params.isWindows ? LINKwindows : LINKc;
}
}

/******************************
Expand Down