[swift-dev] [SR-40] Port Swift to Arm progress / question

Dmitri Gribenko gribozavr at gmail.com
Tue Dec 15 01:33:01 CST 2015


On Mon, Dec 14, 2015 at 11:20 PM, William Dillon
<william at housedillon.com> wrote:
> I built a very simple swift program (minimal hello world) using the arm swiftc and the x86_64 swiftc, and had them emit the sil and llvm ir.  The sil it substantially similar between the toolchain tarball on swift.org and my arm swiftc, except that the arm version has a few sil_vtable, NSArray, and ObjectiveC references that are not in the x86_86 version.  Is it possible that the arm architecture is triggering assumptions about whether this target is linux or darwin?

Although I believe we were very diligent about using _runtime(_ObjC) /
_runtime(_Native), a bug like that is definitely possible.

> Fortunately or unfortunately, by the time it gets to LLVM IR it’s effectively identical (other than the odd difference in variable size or alignment).

I would expect an interesting piece to appear in the standard library,
since it is the .so that the dynamic loader complains about.

You can try to take ./validation-test/stdlib/MicroStdlib.swift and
build a libswiftCore.so that vends a print() function, and see if you
can reproduce the relocation issue.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-dev mailing list