<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 3 May 2016, at 20:12, Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On May 3, 2016, at 10:40, Karl Wagner via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 2 May 2016, at 18:42, Joseph Bell <<a href="mailto:joe@iachieved.it" class="">joe@iachieved.it</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Karl,<div class=""><br class=""></div><div class="">A number of us are on Slack working with ARM support - would you like an invite?</div><div class=""><br class=""></div><div class="">Joe</div><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">Hi, <div class=""><br class=""></div><div class="">yes that would nice.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">So I need to look at how the compiler uses -resource-dir what’s going on with SwiftShims.</div></div></div></div></div></div></blockquote><br class=""></div><div class="">-resource-dir covers <i class="">everything</i> 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.</div><div class=""><br class=""></div><div class="">Meanwhile, you can probably get things off the ground by copying or symlinking<i class=""> everything</i> in lib/swift/ that's <i class="">not</i> in lib/swift/linux/ into your custom resource directory. (I think that's just the shims/ folder right now.)</div><div class=""><br class=""></div><div class="">Jordan</div></div></div></blockquote></div><br class=""><div class="">Thanks, that was helpful! Got it to finally complete. I had to set the resource-dir to lib/swift.</div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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”?</div><div class=""><br class=""></div><div class="">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 <a href="https://github.com/hpux735/swift-llvm" class="">https://github.com/hpux735/swift-llvm</a>), but ‘swiftc’ works.</div><div class=""><br class=""></div><div class="">Karl</div></body></html>