This is an archive of the discontinued LLVM Phabricator instance.

clang-cl: Pass /Brepro to linker if it was passed to the compiler
ClosedPublic

Authored by thakis on Sep 4 2018, 8:17 AM.

Details

Summary

/Brepro currently is just an alias for -mno-incremental-linker-compatible and before this patch only controlled if we write a timestamp into the output obj file. But cl.exe also passes it on to link.exe (where it controls whether the final PE image timestamp really is a timestamp or a hash of the output).

It's a bit weird to overload -mno-incremental-linker-compatible to also pass /Brepro to the linker, but all alternatives are a bit weird too. Open for suggestions though :-)

Diff Detail

Repository
rC Clang

Event Timeline

thakis created this revision.Sep 4 2018, 8:17 AM
hans accepted this revision.Sep 4 2018, 8:35 AM

I suppose the alternative would be to make /Brepro a non-alias flag, expand it to -mno-incremental-linker-compatible for the cc1 invocation and look for it for the linker invocation.

But this is fine too.

This revision is now accepted and ready to land.Sep 4 2018, 8:35 AM
This revision was automatically updated to reflect the committed changes.