This is an archive of the discontinued LLVM Phabricator instance.

Fixing llvm-shlib to check for the correct host triple on Windows x86
ClosedPublic

Authored by tannergooding on Apr 11 2020, 9:05 AM.

Details

Summary

As per https://bugs.llvm.org/show_bug.cgi?id=44127, the CMakeLists.txt for LLVM-C currently checks the wrong host-triple for Windows X86. This results in the official LLVM-C.dll binary being only 9kb in size and containing no exports.

This updates the check to use i686-pc-windows-msvc, which is the default triplet selected by CMake, so that the resulting binaries are as expected.

Diff Detail

Event Timeline

tannergooding created this revision.Apr 11 2020, 9:05 AM
whitequark resigned from this revision.Apr 11 2020, 9:40 AM

I am no longer maintaining the C API.

Wallbraker accepted this revision.Apr 28 2020, 3:50 AM
Wallbraker added a subscriber: Wallbraker.

Thank you for this patch, this looks good to me. But I do not have commit access to can not commit it.

This revision is now accepted and ready to land.Apr 28 2020, 3:50 AM

Why is i686-pc-windows-msvc is correct triple?

Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2022, 3:01 PM
Herald added a subscriber: pengfei. · View Herald Transcript

Why is i686-pc-windows-msvc is correct triple?

See D109493 for a more complete explanation of the issue at hand (sorry I wasn't aware of this patch when I made that one). D47381 changed GetHostTriple.cmake so that it by default sets such a triple - previously it was i686-pc-win32 but after that commit, that cmake file sets it to i686-pc-windows-msvc instead - but this file wasn't updated correctly in sync. D109493 which has been committed made the pattern more flexible to accept both forms.

@mstorsjo Ok, so is this patch no longer needed?

@mstorsjo Ok, so is this patch no longer needed?

Indeed, this one was superseded by D109493, so this one can be closed.

tstellar closed this revision.Apr 4 2022, 7:14 AM

@mstorsjo Ok, so is this patch no longer needed?

Indeed, this one was superseded by D109493, so this one can be closed.

OK, closing.