This is an archive of the discontinued LLVM Phabricator instance.

Support powerpc and sparc when building without init_array.
ClosedPublic

Authored by saugustine on Dec 27 2019, 11:53 AM.

Details

Summary

Support powerpc and sparc when building without init_array.

Event Timeline

saugustine created this revision.Dec 27 2019, 11:53 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 27 2019, 11:53 AM
Herald added subscribers: llvm-commits, Restricted Project, steven.zhang and 5 others. · View Herald Transcript
echristo accepted this revision.Dec 27 2019, 12:56 PM
echristo added a subscriber: echristo.

Looks ok to me.

This revision is now accepted and ready to land.Dec 27 2019, 12:56 PM

Hi Sterling Augustine,

these changes broke the aarch64 toolchain build http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/2108
with those error messages "crtbegin without .init_fini array unimplemented for this architecture".

Would you update the patch and avoid displaying of those error messages for other platforms?

Would you update the patch and avoid displaying of those error messages for other platforms?

https://reviews.llvm.org/D72005 adds support for aarch64. However, updating this so that no error message is reported seems wrong to me.

Before this patch, those files as they had been compiled are buggy. Using them results in subtly broken binaries, and figuring out what is wrong is quite challenging (ask me how I know!). I suspect your target had been building them, and then ignoring the result. But producing a broken file and hoping that the target doesn't use it seems like a bad idea.

Thank you Sterling, I agree.

Currently we don't run the library tests on the target devices (aarch64) for this builder, but we plan doing that very soon.