-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
With clang in Xcode5.1:
➜ Developer clang -arch arm64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include -o main
It's working fine.
But when use ollvm-3.4, I got a error about ARM64 arch definition:
ollvm/bin/clang -arch arm64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include
clang-3.4: error: invalid arch name '-arch arm64'
or
➜ Developer ollvm/bin/clang --target=aarch64 main.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include
In file included from main.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/stdio.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/sys/cdefs.h:655:2: error:
Unsupported architecture
#error Unsupported architecture
...(lots of error)
example main.c:
#include <stdio.h>
static void hello(){
printf("hello world!\n");
}
int main() {
hello();
return 0;
}So how can I build a arm64 binary with ollvm-3.4?
Metadata
Metadata
Assignees
Labels
No labels