Hello swift-dev,

When I started to work on an unrelated pull request, I noticed that Linux i386 isn't supported yet. This made me curious, and it turned out that 32-bit support was easy to add. Here's a quick and dirty commit:

For the most part, I simply replaced x86_64 with i386, breaking the 64-bit build.

I only got six test failures:

Failing Tests (6):
     Swift :: Driver/Dependencies/one-way-external.swift
     Swift :: Driver/subcommands.swift
     Swift :: IRGen/objc_simd.sil
     Swift :: Misc/expression_too_complex.swift
     Swift :: Prototypes/FloatingPoint.swift
     Swift :: SILAnalysis/callgraph.sil

Note that the LLVM debug build fails on i386 due to insufficient (virtual) memory when linking. Linking with gold also failed, but gold with --no-mmap-output-file might work.

Also note that I have no intentions to further pursue this work, but a few non-trivial parts of the patch might be helpful to the community.

Regards,
Nick