-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add a package for full clang/llvm #1218
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
Conversation
|
The failure is due to time limit |
|
I guess this would need some other additions (like binutils) as well to be useful? How large is the size increase in the package of enabling all targets? If it's not too big we could enable it in the normal clang/llvm package without splitting it up. |
|
This makes libllvm about 3MiB larger. Other package sizes are unchanged. Yes, you're right, it's too small to be worth the hassle of splitted packages. Clang has integrated assembled and I'm working on adding lld, so that we have a linker for all the platforms. This is enough to compile standalone programs like libc, kernels and bootloaders (my goal, to use with qemu) but for userspace additional work would be required. I'll remake the branch |
ba1b116 to
271ec20
Compare
|
I updated this pull request. Now it has LLD and doesn't split anymore. I was able to compile GRUB on my phone with this (+update to svn snapshot of llvm which is subject of separate pull request) |
patc allows clang to be used in cross-compilations. E.g. to compile 32-bit binaries on 64-bit termux.
LLD is LLVM-based multi-platform linker. Together with cross-compiling clang it can be used to create binaries for other platforms.
It allows compiling binaries for another android variant on termux. E.g. to compile for arm on aarch64 do: clang -m32 -o 1 1.c -fuse-ld=lld -L/system/lib -B$PREFIX/arm-linux-androideabi/lib Hopefully with the time -L and -B will be eliminated
|
Nice work, I especially like the lld inclusion, which should finally obsolete binutils. I want to try out cross-compiling for desktop/server platforms too, like Windows/x64 or linux/x64, whereas you seem to focus on other Android platforms with this pull. Do you know how much more would need to be added to get small desktop/server C executables built with the clang from this pull? |
|
I don't think we can deprecate binutils just yet. Binutils has nm, objdump and strip. Later is needed by some programs to compile. As for desktop/server executables you needs libs and includes for the platform in question |
|
I can get the libs and platform includes, especially easy for linux, and I guess the compiler includes should all be there because we're just building stock clang, not the NDK clang. I'll try it sometime. |
|
Ping? |
|
I want this for to make distccd useful (distcc is already useful, and easy to build) |
|
@phcoder Thanks and sorry for the delay here! The updated llvm and clang packages are now available for installation (update with |
|
$ clang |
|
This is on armv7 (32-bit) |
|
Are you sure you have the latest clang? Seems to work for me. Try running these two commands: If you get a |
|
Didn't upgrade libllvm as well. Sry.
…On Nov 17, 2017 15:21, "joakim-noah" ***@***.***> wrote:
Are you sure you have the latest clang? Seems to work for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1218 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfLctoaBt8KXH2E8o6Ddel0UhprlHMjks5s3hT3gaJpZM4OvtG2>
.
|
|
@shawnl No problem. Currently Termux package updated are very laxy with version qualifiers, generally assuming that all dependencies are at their latest versions. So the current best practice is to always update all packages ( |
|
Works with distcc #1785 |
Full clang allows to have cross-compilations to other architectures