[Toybox] Poking at llvm again, now in aosp prebuilts.
Rob Landley
rob at landley.net
Mon Aug 26 10:10:55 PDT 2019
On 8/26/19 10:41 AM, enh wrote:
> On Sun, Aug 25, 2019 at 5:30 PM Rob Landley <rob at landley.net> wrote:
>>
>> I accumulated a lot of open reply windows in the run-up to ELC. :)
>>
>> On 8/22/19 4:39 PM, enh wrote:
>>> remember that clang is always a cross compiler: that compiler builds
>>> all the things for all the architectures. you need to tell it to
>>> target Android. here it's defaulting to building for what you're
>>> running it on.
>>
>> It gives me another llvm toolchain I can test with. (Which acts basically the
>> same as the prebuilt binaries you can download from llvm.org, so not a new
>> _category_, but I'm slightly more likely to keep it current.)
>>
>>> (but you don't want to use the platform prebuilts anyway. use the NDK.
>>> and if you want something that acts more like a regular single-target
>>> compiler: https://developer.android.com/ndk/guides/standalone_toolchain#building_open_source_projects_using_standalone_toolchains
>>> )
>>
>> I've been using the NDK. And you still don't want an llvm-cc command in the NDK. :(
>
> persuade upstream, and we'll include it too.
Upstream here being llvm.org? Ok, I can make puppy eyes that way...
>>>> (I think I asked this before, but don't remember the answer? Wouldn't it be more
>>>> portable to statically link all the prebuilts against bionic instead of
>>>> dynamically link them against the host libc? Dynamic library version skew is
>>>> common-ish, kernel syscall version skew is quite _uncommon_.
>>
>> Still dunno why the prebuilts aren't statically linked against bionic.
>
> it's on the to-do list, but not likely to happen any time soon.
> there's limited support for "host bionic" in AOSP, but no-one actively
> working on it.
I'm testing it here and it works for me, but mostly just the self tests. I can
try substituting in a different toybox binary in the AOSP build and see if it
works? [Yeah yeah, define "works".]
Hmmm...
What I did with Linux From Scratch was make a command logging wrapper
(http://landley.net/aboriginal/FAQ.html#debug_logging see also
http://landley.net/notes-2011.html#03-12-2011) which creates a directory of
symlinks to a wrapper binary that appends argv[*] to a file and then execs the
_second_ instance of the command out of the path. So when you're done you have a
list of every command line that got called out of the $PATH and what its
arguments were. (I've occasionally done versions that would snapshot stdin and
stdout and save those to a directory full of files, but there was never a sane
naming scheme and I didn't check that in.)
I checked the basic record-commands plumbing in to toybox back in January
(a242b5be0b48, updated a couple times since) and which the external version of
mkroot's been using ever since. I didn't include it in the stripped down one I
merged as "make root" because I think I want to integrate the setup into
scripts/install.sh...
Anyway, let's just say I have some experience in the systems build version of
removing the tablecloth under the dishes without everything winding up on the
floor. :)
Rob
More information about the Toybox
mailing list