<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 Dec 8, 2015, at 8:57 PM, Chris Lattner 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="">On Dec 8, 2015, at 8:50 PM, Zhuowei Z via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:<div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; 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=""><div class="">I'm currently working on adding support to the Swift compiler to allow it to target Android. </div></div></div></blockquote><div class=""><br class=""></div><div class="">Cool. Responding to one specific issue:</div><div class=""><br class=""></div><blockquote type="cite" class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px; 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=""><div class=""><div class="">- What's the role of the special linker script, and what's the purpose of the conformance tables in shared libraries? I've commented the conformance table loading code out on Android; is that why 'print("Hello world")' prints out "String(" infinity?</div></div></div></blockquote><br class=""></div><div class="">The linker script allows the compiler to be able to enumerate conformance tables, which are part of reflection information. I’m not an expert in this area (Joe Groff or John McCall could better respond) but I would completely believe the are the reason for your print failure. print is defined as taking an Any, and does a downcast to a protocol, and that is probably failing.</div></div></div></blockquote><br class=""></div><div>Yes, this is exactly the problem. You'll need some way for the conformance sections from every .o file to be collected into a section of the final binary that the runtime can consult at runtime in swift_conformsToProtocol. Can the existing swift.ld script be adapted to work on Android?</div><div><br class=""></div><div>-Joe</div><br class=""></body></html>