Standalone toolchains

66 views
Skip to first unread message

John Dallman

unread,
Jan 22, 2019, 11:07:07 AM1/22/19
to andro...@googlegroups.com
I use a standalone toolchain, but not Android Studio. I'm not actually building an Android app, at all, ever. Instead, I build with a stand-alone toolchain, and link that into a command-line test harness which I run in the ADB shell. My development and testing devices are permanently connected to the Linux machines I use for building and testing. 

All of my building is done with the tools from the standalone toolchain, and I don't use Gradle, CMake, or any other tools supplied with Android Studio: I'm building code which has its own build system, and the standalone toolchain is the easy way to plug Android tools into that. I'm only supporting one ABI, 64-bit ARM, so I only need one toolchain. 

In the NDK r19 release notes, I see: 

Issue 780: Standalone toolchains are now unnecessary. Clang, binutils, the sysroot, and other toolchain pieces are now all installed to $NDK/toolchains/llvm/prebuilt/<host-tag> and Clang will automatically find them.

I have two questions about this: 

Can I copy $NDK/toolchains/llvm/prebuilt/<host-tag> and its subdirectories out of there, and put them elsewhere? I do that with my current standalone toolchain, and put it on server disk so that all my Linux build machines can see and use the same copy of the toolchain. I'm quite keen to carry on organizing it that way, and not to use up server disk space with a copy of Android Studio that I will never use. 

Presumably I now need to specify the Android API level and STL explicitly in my compile command lines? Until now, I've just used the "clang" script that building a standalone toolchain created for me, which put those options on the command line automatically, 

Thanks in advance,

John

Dan Albert

unread,
Jan 22, 2019, 1:21:22 PM1/22/19
to android-ndk
They should be relocatable, although I don't believe I've tried that. You wouldn't need a full studio install even if they aren't; just an NDK (though I'd like to fix the relocatability issues if they aren't).



--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D-3Y_FJRRO%3DFN8cFtv8Yz966xmTSb1t6_xL9ofptxn9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

John Dallman

unread,
Jan 23, 2019, 4:47:44 AM1/23/19
to andro...@googlegroups.com
Thanks for that. I'll try this when I get closer to updating my NDK. 

John

John Dallman

unread,
May 25, 2020, 5:29:28 AM5/25/20
to andro...@googlegroups.com
Well, I finally got to updating NDK, and had no trouble with this. Thanks very much.

John
Reply all
Reply to author
Forward
0 new messages