<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>[Adding Vedant directly]<br><br>I'm not super familiar with the swift build scripts, but I have a theory of what is going wrong. I think the problem is that compiler-rt is being built during the cross build, and it really shouldn't be.</div><div><br></div><div>The compiler-rt build system has some significant flaws, and it is being reworked to resolve them. The problem causing this is that we have a hacked up CMake build process that generates multiple cross-targeted binaries from a single build configuration. I believe that compiler-rt's built-in hacky cross-targeting is tripping over however swift is supporting cross-targeting, and it is falling over.</div><div><br></div><div>With the current state of compiler-rt the right way to build it for Darwin is to treat it as host content, and it will build the Darwin-cross libraries too. Then you can pull the cross-libraries out and put them into the device build.</div><div><br></div><div>Vedant, if you have questions feel free to swing by my office on Monday.<br><br><div>-Chris</div></div><div><br>On Mar 19, 2016, at 10:11 AM, Andrew Hyatt via swift-dev &lt;<a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii">(From /u/thegreatbeanz on&nbsp;<a href="http://reddit.com/r/swift" class="">reddit.com/r/swift</a>)<br class=""><div class=""><br class="webkit-block-placeholder"></div><div class=""><span class="" style="line-height: normal; float: none; display: inline !important;"><div class="" style="margin: 0px 0px 0.35714285714285715em; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">So the problem here is actually that something has gone horribly wrong when configuring compiler- rt.</div><div class="" style="margin: 0.35714285714285715em 0px; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">You'll notice in the clang commands that it is building in this directory:</div><div class="" style="margin: 0.35714285714285715em 0px; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">clang_rt.builtins_armv7_10.4.dir</div><div class="" style="margin: 0.35714285714285715em 0px; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">What that means is it is building the clang_rt.10.4 archive which provides back ported library functions to OS X 10.4. Obviously 10.4 didn't support armv7 as an architecture, something has gone really wrong here.</div><div class="" style="margin: 0.35714285714285715em 0px; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">If you're on the latest swift it is probably a regression caused by 53f48f8. You need to email swift-dev to get support from Dmitri Gribenko and Vedant Kumar.</div><div class="" style="margin: 0.35714285714285715em 0px 0px; padding: 0px; font-size: 14px; line-height: 1.4285714285714286em; color: rgb(22, 22, 22); font-family: Arial, sans-serif;">Source: I wrote most of the compiler-rt builtin build system for Darwin.</div></span></div><div class="">
<span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; line-height: normal; float: none; display: inline !important;" class=""><br class="Apple-interchange-newline">Andrew Hyatt</span><br style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; line-height: normal;" class=""><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; line-height: normal; float: none; display: inline !important;" class=""><a href="mailto:ahyattdev@icloud.com" class="">ahyattdev@icloud.com</a></span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 19, 2016, at 9:26 AM, Andrew Hyatt via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Building swift-llvm fails when using build-script to cross compile because build-script wrongly gives duplicate -isysroot arguments.</div><div class=""><br class=""></div><div class="">The full arguments that are given to clang by build-script while building LLVM are here: <a href="https://gist.github.com/ahyattdev/8ecc5d3808b9ee543a60" class="">https://gist.github.com/ahyattdev/8ecc5d3808b9ee543a60</a></div><div class=""><br class=""></div><div class="">The command I use to build the compiler, using the latest sources from GitHub</div><div class=""><br class=""></div><div class="">utils/build-script -R -i -- --cross-compile-tools-deployment-targets "iphoneos-arm64 iphoneos-armv7 iphoneos-armv7s" --user-config-args="-DLLVM_ENABLE_BACKTRACES=Off"</div><div class=""><br class=""></div><div class="">This error occurs after the phase of building llvm for the host machine, and occurs during the cross compilation phase.</div><div class="">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Andrew Hyatt</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:andythehyatt@gmail.com" class="">andythehyatt@gmail.com</a></div>

</div>
<br class=""></div>_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev">https://lists.swift.org/mailman/listinfo/swift-dev</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-dev mailing list</span><br><span><a href="mailto:swift-dev@swift.org">swift-dev@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-dev">https://lists.swift.org/mailman/listinfo/swift-dev</a></span><br></div></blockquote></body></html>