Skip to content
Open
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
9 changes: 1 addition & 8 deletions compiler/src/dmd/backend/dcgcv.d
Original file line number Diff line number Diff line change
Expand Up @@ -1756,11 +1756,7 @@ private void cv4_outsym(Symbol* s)
idx1 = DGROUPIDX;
idx2 = SegData[s.Sseg].segidx;
}
/* Because of the linker limitations, the length cannot
* exceed 0x1000.
* See optlink\cv\cvhashes.asm
*/
assert(length <= 0x1000);

if (idx2 != 0)
{
assert(0);
Expand Down Expand Up @@ -1875,9 +1871,6 @@ private void cv4_func(Funcsym* s, ref symtab_t symtab)
}
static void endBlock()
{
if (cntOpenBlocks-- >= 255)
return; // optlink does not like more than 255 scope blocks

__gshared ushort[2] endargs = [ 2, S_END ];
objmod.write_bytes(SegData[DEBSYM],endargs[]);
}
Expand Down
11 changes: 1 addition & 10 deletions compiler/src/dmd/glue.d
Original file line number Diff line number Diff line change
Expand Up @@ -1345,16 +1345,7 @@ private void genObjFile(Module m, bool multiobj)
if (!s.Sxtrnnum)
{
//printf("%s\n", s.Sident);
//#if 0 /* This should work, but causes optlink to fail in common/newlib.asm */
// objextdef(s.Sident);
//#else
Symbol* sref = symbol_generate(SC.static_, type_fake(TYnptr));
sref.Sfl = FL.data;
auto dtb = DtBuilder(0);
dtb.xoff(s, 0, TYnptr);
sref.Sdt = dtb.finish();
outdata(sref);
//#endif
objextdef(s.Sident);
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions compiler/src/dmd/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -953,9 +953,6 @@ bool parseCommandlineAndConfig(size_t argc, const(char)** argv, out Param params

bool isX86_64 = arch[0] == '6';

version(Windows) // delete LIB entry in [Environment] (necessary for optlink) to allow inheriting environment for MS-COFF
environment.update("LIB", 3).value = null;

// read from DFLAGS in [Environment{arch}] section
char[80] envsection = void;
snprintf(envsection.ptr, envsection.length, "Environment%.*s", cast(int) arch.length, arch.ptr);
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dmd/toir.d
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,6 @@ void buildCapture(FuncDeclaration fd)
{
if (!driverParams.symdebug)
return;
if (target.objectFormat() != Target.ObjectFormat.coff) // toDebugClosure only implemented for CodeView,
return; // but optlink crashes for negative field offsets

if (fd.closureVars.length && !fd.needsClosure)
{
Expand Down
Loading