> On 3 May 2016, at 20:12, Jordan Rose <jordan_r...@apple.com> wrote:
> 
> 
>> On May 3, 2016, at 10:40, Karl Wagner via swift-dev <swift-dev@swift.org 
>> <mailto:swift-dev@swift.org>> wrote:
>> 
>> 
>>> On 2 May 2016, at 18:42, Joseph Bell <j...@iachieved.it 
>>> <mailto:j...@iachieved.it>> wrote:
>>> 
>>> Karl,
>>> 
>>> A number of us are on Slack working with ARM support - would you like an 
>>> invite?
>>> 
>>> Joe
>>> 
>> 
>> Hi, 
>> 
>> yes that would nice.
>> 
>> The modulemap issue can be fixed by adding a -resource-dir flag. Going with 
>> a comment in AddSwift.cmake, I switched the include fag to the library 
>> output directory to "-resource-dir”, but then SwiftShims wouldn’t build. So 
>> I changed the flag back to a standard include and make it *also* specify 
>> “-resource-dir” on cross-compile (so the cross command has both -I and 
>> -resource-dir). Now the native host builds, but the cross-compiled stdlib 
>> won’t because of the same SwiftShims issue.
>> 
>> So I need to look at how the compiler uses -resource-dir what’s going on 
>> with SwiftShims.
> 
> -resource-dir covers everything in lib/swift/. I'm not sure we're properly 
> set up to handle more than one architecture on Linux, though: we still link 
> against the .so's in lib/swift/linux/ rather than lib/swift/linux/$ARCH, 
> despite "fat" libraries not being sensible here. Maybe that's the way to go: 
> reorganize lib/swift/linux/ so that there's nothing that's not in an 
> architecture-specific subdirectory.
> 
> Meanwhile, you can probably get things off the ground by copying or 
> symlinking everything in lib/swift/ that's not in lib/swift/linux/ into your 
> custom resource directory. (I think that's just the shims/ folder right now.)
> 
> Jordan

Thanks, that was helpful! Got it to finally complete. I had to set the 
resource-dir to lib/swift.

A few things get generated to the non-specific lib/swift/linux folder, but 
they’re also in linux/armv7 (which does seem like something we should fix). The 
shims and clang headers are the only things that aren’t also in the armv7 
folder.

However, it did work after that; compiled both the tools and standard library 
for the RPi :). I am having some trouble installing, though. There is no 
“install” build target generated. I’ve been looking at the sources, and I can’t 
see it, either - I can see how the install components get passed in, how things 
get added to the components, but not where any copying takes place. What is the 
intended command to install the built components, “ninja install”?

The things it built do seem to work. I “manually installed” them, and besides 
needing some massaging to satisfy SwiftGlibc (modulemap obviously needed to be 
regenerated with correct system root, stddef.h and stdarg.h strangely unable to 
be found — they were in /usr/include/linux) it seems reasonable. There is a 
known LLVM bug preventing ‘swift’ (the interpreter) from working, which should 
definitely be merged in to our clone of LLVM (see 
https://github.com/hpux735/swift-llvm <https://github.com/hpux735/swift-llvm>), 
but ‘swiftc’ works.

Karl
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to