This is an archive of the discontinued LLVM Phabricator instance.

[TSAN/AArch64/Android] Teach clang to link on TSAN/AArch64/Android On Android/Aarch64, there a few differences from linux/x86_64 with respect to TSAN.
Needs ReviewPublic

Authored by jasonk on Aug 14 2015, 2:58 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This should be pushed in AFTER http://reviews.llvm.org/D11532

Diff Detail

Event Timeline

jasonk updated this revision to Diff 32190.Aug 14 2015, 2:58 PM
jasonk retitled this revision from to [TSAN/AArch64/Android] Teach clang to link on TSAN/AArch64/Android On Android/Aarch64, there a few differences from linux/x86_64 with respect to TSAN..
jasonk updated this object.
dvyukov added inline comments.
lib/Driver/Tools.cpp
2492

If you are adding -pie to linker, I would expect that you also add -fPIE to compiler somewhere. But I can't find that other place. What am I missing?

jasonk added inline comments.Aug 17 2015, 11:41 AM
lib/Driver/Tools.cpp
2492

Good point.

danalbert added inline comments.Aug 17 2015, 3:38 PM
lib/Driver/Tools.cpp
2487

This comment might be a bit confusing to people that aren't familiar with bionic. Should probably say that the libpthread and librt functionality is bundled with libc.

2492

Not all Android devices even support PIE. This is the build system's job, not the compiler's.

2516

Why?

jasonk updated this revision to Diff 32625.Aug 19 2015, 3:30 PM

rebase to r245497
got rid of -pie

Updating D12041: [TSAN/AArch64/Android] Teach clang to link on TSAN/AArch64/Android

On Android/Aarch64, there a few differences from linux/x86_64 with respect to
TSAN.

jasonk marked an inline comment as done.Aug 19 2015, 3:35 PM
jasonk added inline comments.
lib/Driver/Tools.cpp
2516

TSAN requires all libs other than tsan itself to be dynamic.
TSAN itself is statically linked.
Since TSAN is (or will be) supported on aarch64-android, this return no longer makes sense.

danalbert added inline comments.Aug 19 2015, 3:41 PM
lib/Driver/Tools.cpp
2516

Explanations belong in the comment, not in the review.

rengolin added inline comments.Aug 20 2015, 7:20 AM
lib/Driver/Tools.cpp
2482

nitpick: this temp is a bit redundant...

2487

agreed.

2516

Please, split this into two returns, with a nice comment on the (android && ! AArch64).