This is an archive of the discontinued LLVM Phabricator instance.

Use linker flag --fix-cortex-a53-843419 on Android ARM64 compilation.
ClosedPublic

Authored by srhines on Oct 19 2016, 1:58 AM.

Details

Summary

This is only forced on if there is no non-Cortex-A53 CPU specified as
well. Android's platform and NDK builds need to assume that the code can
be run on Cortex-A53 devices, so we always enable the fix unless we know
specifically that the code is only running on a different kind of CPU.

Diff Detail

Repository
rL LLVM

Event Timeline

srhines updated this revision to Diff 75119.Oct 19 2016, 1:58 AM
srhines retitled this revision from to Use linker flag --fix-cortex-a53-843419 on Android ARM64 compilation..
srhines updated this object.
srhines added a reviewer: cfe-commits.
srhines added subscribers: danalbert, pirama.
jmolloy accepted this revision.Oct 19 2016, 2:02 AM
jmolloy added a reviewer: jmolloy.

LGTM.

This revision is now accepted and ready to land.Oct 19 2016, 2:02 AM

From what I can tell, there is no nice way to generate tests for Clang's driver when producing linker flags. -### only works for the -cc1 command line (which won't see this flag, since it is only for linking, and not compilation). If there is a suggestion for how to automatically test this, I am listening, but all my local tests looked fine (for generating/suppressing the flag). :)

From what I can tell, there is no nice way to generate tests for Clang's driver when producing linker flags. -### only works for the -cc1 command line (which won't see this flag, since it is only for linking, and not compilation). If there is a suggestion for how to automatically test this, I am listening, but all my local tests looked fine (for generating/suppressing the flag). :)

I think "clang -v" will show the linker invocation, with all its flags.

From what I can tell, there is no nice way to generate tests for Clang's driver when producing linker flags. -### only works for the -cc1 command line (which won't see this flag, since it is only for linking, and not compilation). If there is a suggestion for how to automatically test this, I am listening, but all my local tests looked fine (for generating/suppressing the flag). :)

I think "clang -v" will show the linker invocation, with all its flags.

But is there a way to get a dry-run of the linker? I don't want to run /usr/bin/ld for ARM targets. It seems like all of the other linker flag-related tests in tests/Driver/ only work for x86.

I think "clang -v" will show the linker invocation, with all its flags.

But is there a way to get a dry-run of the linker? I don't want to run /usr/bin/ld for ARM targets. It seems like all of the other linker flag-related tests in tests/Driver/ only work for x86.

I think the combination of -v and -### does that, no?

srhines updated this revision to Diff 75174.Oct 19 2016, 11:04 AM
srhines edited edge metadata.

Added a test for this behavior.

I missed that "-### -v" was actually working correctly last night. Tests added
so I am more satisfied that this won't break accidentally in the future.

This revision was automatically updated to reflect the committed changes.