Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need ARM64 Supported #3

Closed
flyingbird opened this issue Jan 23, 2014 · 8 comments
Closed

Need ARM64 Supported #3

flyingbird opened this issue Jan 23, 2014 · 8 comments

Comments

@flyingbird
Copy link

Need ARM64 Supported
Thanks.

@cryptopathe
Copy link
Collaborator

You'll have to wait that Apple releases its own Aarch64 backend, please see http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-September/065480.html for more information.

@mmozeiko
Copy link

I'm pretty sure you can use AArch64 backend which is currently in 3.4 release - that includes assembler, disassembler and all the other llvm infrastructure (TargetDesc, etc..).

@pyknite pyknite closed this as completed Feb 18, 2014
@flyingbird
Copy link
Author

@mmozeiko I use clang in llvm-3.4 with "-arch aarch64".
but it does not recognize this architecture.
how to compile?
Thanks.

@pyknite
Copy link
Collaborator

pyknite commented Mar 24, 2014

You can use 'llvm-config --targets-build' to see which targets are supported by your compiler.

I got those by default:
AArch64 ARM CppBackend Hexagon Mips MSP430 NVPTX PowerPC R600 Sparc SystemZ X86 XCore

If your compiling from a non darwin plateform, you should use the '-target' flag instead of '-arch' also.

@flyingbird
Copy link
Author

@pyknite
When i type "llvm-config --targets-built", it list
AArch64 ARM CppBackend Hexagon Mips MSP430 NVPTX PowerPC R600 Sparc SystemZ X86 XCore

Both of '-target' and '-arch' not work.
use -arch. it says "clang-3.2: error: invalid arch name '-arch AArch64'"
use -target. it says "error: unknown target triple 'AArch64', please use -triple or -arch"

I'm using mac osx 10.8.5

@cryptopathe
Copy link
Collaborator

clang-3.2 does not refer to ollvm 3.4 ?! Did you compile the proper ollvm branch?

Furthermore, --target=aarch64 works for me (watch the capital letters). To be more precise, ollvm 3.4 accepts the flag, as expected, and outputs arm64 assembler.

@flyingbird
Copy link
Author

@cryptopathe can you show me the whole command line.
Thanks.
I try:
./clang --target=aarch64 *.cpp -o a.out
It says:
/var/folders/xm/y_r68c696gj03myrrjbr4q440000gn/T/main-4fe436.s:4:2: error: unknown directive
.type main,@function

@cryptopathe
Copy link
Collaborator

This error message means that the assembler cannot handle arm64 assembly. All the compilation process went OK, but you lacks an arm64 assembler.

In order to be able to generate working binaries, I guess you have to install a complete and properly working cross-compilation environment (see for instance http://stackoverflow.com/questions/20745412/building-the-botan-library-for-ios7-arm64).

By the way, if you would like to integrate ollvm into Xcode, this link might help you. Even if it targets Xcode 3&4, I guess that the principles have not changed much for Xcode 5: http://belkadan.com/blog/2011/07/Using-Clang-from-SVN-in-Xcode/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants