This is an archive of the discontinued LLVM Phabricator instance.

llvm-lib: Disallow mixing object files with different machine types
ClosedPublic

Authored by thakis on Jun 5 2019, 9:06 AM.

Details

Summary

lib.exe doesn't allow creating .lib files with object files that have
differing machine types. Update llvm-lib to match.

The motivation is to make it possible to infer the machine type of a
.lib file in lld, so that it can warn when e.g. a 32-bit .lib file is
passed to a 64-bit link (PR38965).

Fixes PR38782.

Diff Detail

Event Timeline

thakis created this revision.Jun 5 2019, 9:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2019, 9:06 AM
thakis updated this revision to Diff 203175.Jun 5 2019, 9:12 AM

add newlines to diagnostics

thakis added a comment.Jun 6 2019, 7:35 AM

pcc: Ping :)

pcc accepted this revision.Jun 6 2019, 11:07 AM

LGTM

This revision is now accepted and ready to land.Jun 6 2019, 11:07 AM
This revision was automatically updated to reflect the committed changes.
plotfi added a subscriber: plotfi.Jun 7 2019, 8:31 AM

@thakis this is breaking build bots: http://lab.llvm.org:8011/builders/clang-cmake-armv8-full/builds/12684

./build/Release/Linux-x86_64/llvm/test/Object/Output/nm-archive.test.tmp1: unknown arch in target triple


Testing Time: 114.29s


Failing Tests (1):

LLVM :: Object/nm-archive.test

Thanks, r362809 should help.