Skip to content

Commit 3e42146

Browse files
authored
[LLD][COFF] Add ignored linker flags (#150815)
These flags were treated as explicit errors, which could cause compatibility issues with MS link.exe. To address this, LLD was updated to ignore them, aligning its behavior with MS link.exe. The latter two options affect how MS link.exe generates metadata for its PGO. LLD doesn't generate any such metadata right now (and doesn't work with the MSVC PGO feature), so those options are kept as no-ops. - Added `/emittoolversioninfo[:no]` flag in LLD/COFF options - This flag emits a rich header between DOS stub and PE header. LLVM does not emit the rich header at all. - Added `/novcfeature` flag in LLD/COFF options - Added `/nocoffgrpinfo` flag in LLD/COFF options
1 parent 0fbcbda commit 3e42146

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lld/COFF/Options.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ def fastfail : F<"fastfail">;
353353
def kernel : F<"kernel">;
354354
def pdbcompress : F<"pdbcompress">;
355355
def emitpogophaseinfo : F<"emitpogophaseinfo">;
356+
defm emittoolversioninfo: B<
357+
"emittoolversioninfo",
358+
"Emit a tool version info after DOS header (so-called Rich header, default)",
359+
"Do not emit a tool version info after DOS header (so-called Rich header)">;
360+
def nocoffgrpinfo: F<"nocoffgrpinfo">;
356361
def noexp : F<"noexp">;
362+
def novcfeature: F<"novcfeature">;
357363

358364
def delay : P_priv<"delay">;
359365
def errorreport : P_priv<"errorreport">;

0 commit comments

Comments
 (0)