Skip to content

Commit 94d1d33

Browse files
committed
Remove field to avoid ABI break
1 parent cb11f22 commit 94d1d33

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

lld/COFF/Config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ struct Configuration {
313313
bool warnDebugInfoUnusable = true;
314314
bool warnLongSectionNames = true;
315315
bool warnStdcallFixup = true;
316-
bool warnExportedDllMain = true;
317316
bool incremental = true;
318317
bool integrityCheck = false;
319318
bool killAt = false;

lld/COFF/Driver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,6 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
16251625
config->warnLocallyDefinedImported = false;
16261626
else if (s == "longsections")
16271627
config->warnLongSectionNames = false;
1628-
else if (s == "exporteddllmain")
1629-
config->warnExportedDllMain = false;
16301628
// Other warning numbers are ignored.
16311629
}
16321630
}

lld/COFF/InputFiles.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,12 @@ static bool fixupDllMain(COFFLinkerContext &ctx, llvm::object::Archive *file,
131131
file->getFileName() +
132132
": could not get the buffer for a child buffer of the archive");
133133
if (identify_magic(mb.getBuffer()) == file_magic::coff_import_library) {
134-
if (ctx.config.warnExportedDllMain) {
135-
// We won't place DllMain symbols in the symbol table if they are
136-
// coming from a import library. This message can be ignored with the flag
137-
// '/ignore:exporteddllmain'
138-
Warn(ctx)
139-
<< file->getFileName()
140-
<< ": skipping exported DllMain symbol [exporteddllmain]\nNOTE: this "
141-
"might be a mistake when the DLL/library was produced.";
142-
}
134+
// We won't place DllMain symbols in the symbol table if they are
135+
// coming from a import library. This message can be ignored with the flag
136+
// '/ignore:exporteddllmain'
137+
Warn(ctx) << file->getFileName()
138+
<< ": skipping imported DllMain symbol\nNOTE: this "
139+
"might be a mistake when the DLL/library was produced.";
143140
skipDllMain = true;
144141
return true;
145142
}

lld/test/COFF/exported-dllmain.test

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ RUN: lld-link -lib c.obj -out:c.lib
1414

1515
### Later, if b.lib is provided before other libs/objs that export DllMain statically, we previously were using the dllimported DllMain from b.lib, which is wrong.
1616
RUN: lld-link a.obj b.lib c.lib -dll -out:out.dll -entry:DllMain 2>&1 | FileCheck -check-prefix=WARN %s
17-
RUN: lld-link a.obj b.lib c.lib -dll -out:out.dll -entry:DllMain -ignore:exporteddllmain 2>&1 | FileCheck -check-prefix=IGNORED --allow-empty %s
1817
RUN: llvm-objdump --private-headers -d out.dll | FileCheck -check-prefix=DISASM %s
1918

20-
WARN: lld-link: warning: b.lib: skipping exported DllMain symbol [exporteddllmain]
21-
IGNORED-NOT: lld-link: warning: b.lib: skipping exported DllMain symbol [exporteddllmain]
19+
WARN: lld-link: warning: b.lib: skipping imported DllMain symbol
2220

2321
DISASM: The Import Tables:
2422
DISASM: DLL Name: b.dll

0 commit comments

Comments
 (0)