<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 19, 2015, at 6:53 PM, Chaitanya Mannem via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class="">Hi,</div><div class=""></div><div class=""><blockquote type="cite" class="" style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;"><div class=""><div class=""></div></div></blockquote></div><div class=""><br data-mce-bogus="1" class=""></div><div class=""><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" class="">I wanted to know if it is possible to compile swift code for bare metal. I know there is a runtime but does swift depend on it to execute even if I don't use those features?, can I disable them somehow. I was hoping that since you can produce LLVM Bytecode that you can cross compile using the arm-none-eabi toolchain for an embedded use-case (</span><a href="http://www.ti.com/tool/ek-tm4c123gxl)" style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" data-mce-href="http://www.ti.com/tool/ek-tm4c123gxl)" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" class="">http://www.ti.com/tool/ek-tm4c123gxl)</a><span style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" data-mce-style="font-family: SFNSText, 'Helvetica Neue', Helvetica, sans-serif;" class="">. Please tell me there's hope, I don't want to use C++ :(</span></div></div></div></blockquote><br class=""></div><div>The code that emits runtime calls in IRGen is fairly well-factored. One thing you might experiment with is adding an `-fstandalone` flag that causes the compiler to diagnose any time it has to generate code with a runtime call. If you're willing to forgo the standard library and build from LLVM primitives up and always use -Ounchecked, you might be able to generate standalone binaries without a runtime dependency. You're on your own if you go that road though.</div><div><br class=""></div><div>-Joe</div><br class=""></body></html>