<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=""><div class="">Hi, Vivian. RuntimeStubs.h (along with the rest of SwiftShims) is a header that gets shipped with the Swift library, so it can’t refer to anything outside of its folder. Since we don’t yet have a good way to annotate things as using the Swift calling convention in the SwiftShims headers, we should probably not be using the Swift calling convention there (at least for now). Can you write up a pull request removing the SWIFT_CC annotation from the functions declared in RuntimeStubs.h?</div><div class=""><br class=""></div><div class="">(I’m a little concerned that Clang didn’t tell us that the calling convention isn’t consistent across declarations, but that’s a separate issue. Maybe the lack of an annotation isn’t strong enough information to produce a warning.)</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 9, 2016, at 07:42, Vivian Kong 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=""><div class=""><p class="">After apply this commit, the s390x build started to fail:<br class=""><a href="https://github.com/apple/swift/commit/dc88e51321e0a4f281406c265a91308a06aa517f" class="">https://github.com/apple/swift/commit/dc88e51321e0a4f281406c265a91308a06aa517f</a><br class=""><br class="">The commit added 2 new functions in stdlib/public/SwiftShims/RuntimeStubs.h.  They are used in stdlib/public/stubs/CommandLine.cpp with <b class="">SWIFT_CC(swift)</b> macro.  Since we use the LLVM's intrinsic "swiftcall" on s390x, this caused a build error.  To fix it we added the <b class="">SWIFT_CC(swift)</b> macro and <b class="">#include "swift/Runtime/Config.h"</b> to RuntimeStubs.h.  We then ran into this build error:<br class=""><br class=""><font face="Courier New" class="">&lt;module-includes&gt;:9:10: note: in file included from &lt;module-includes&gt;:9:</font><br class=""><font face="Courier New" class="">#include "RuntimeStubs.h"</font><br class=""><font face="Courier New" class="">         ^</font><br class=""><font face="Courier New" class="">/localbox/vivkong/swift/build/Ninja-RelWithDebInfoAssert/swift-linux-s390x/./lib/swift/shims/RuntimeStubs.h:23:10: error: </font><b class=""><font face="Courier New" class="">'swift/Runtime/Config.h' file not found</font></b><br class=""><font face="Courier New" class="">#include "swift/Runtime/Config.h"</font><br class=""><br class=""><br class="">I tried modifying stdlib/public/SwiftShims/CMakeLists.txt with<br class=""><br class=""><font face="Courier New" class="">include_directories(</font><br class=""><font face="Courier New" class="">  ${CMAKE_SOURCE_DIR}/include</font><br class=""><font face="Courier New" class="">  )</font><br class=""><br class="">But that didn't seem to work.  Any suggestions on how to fix this?<br class=""><br class="">Thanks for your help!<br class=""><br class="">Regards,<br class=""><br class="">Vivian Kong<br class="">Software Developer<br class="">IBM Canada Toronto Lab<br class="">
</p></div>
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></body></html>