<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/93709>93709</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] i386 support
</td>
</tr>
<tr>
<th>Labels</th>
<td>
build-problem,
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
In order to incorporate llvm-libc into Android, we MUST to support 32b x86.
Currently, the most immediate build failure with `-m32` is:
```
In file included from external/llvm-libc/test/UnitTest/LibcTest.cpp:9:
In file included from external/llvm-libc/test/UnitTest/LibcTest.h:28:
In file included from external/llvm-libc/src/__support/CPP/string.h:14:
In file included from external/llvm-libc/src/string/memory_utils/inline_memcpy.h:22:
external/llvm-libc/src/string/memory_utils/x86_64/inline_memcpy.h:195:22: error: no member named 'K_AVX' in namespace '
llvmlibc::x86'
195 | if constexpr (x86::K_AVX) {
| ~~~~~^
external/llvm-libc/src/string/memory_utils/x86_64/inline_memcpy.h:214:17: error: no member named 'Memcpy' in namespace
'llvmlibc::x86'
214 | return x86::Memcpy::repmovsb(dst, src, count);
| ~~~~~^
external/llvm-libc/src/string/memory_utils/x86_64/inline_memcpy.h:219:19: error: no member named 'Memcpy' in namespace
'llvmlibc::x86'
219 | return x86::Memcpy::repmovsb(dst, src, count);
| ~~~~~^
```
This is because `x86::K_AVX` is only defined when `LIBC_TARGET_ARCH_IS_X86_64` is, which is 64b only. We probably need more preprocessor guards using `LIBC_TARGET_ARCH_IS_X86_64` (64b vs 32b).
(There may be more build or runtime failures)
cc @gchatelet @enh-google
It will be less work for us to support 32b x86 then for Android to drop 32b x86 support.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VU2P2zYQ_TX0ZbCGNJIt6aCD443bRRMgSJw2N0MixxYbfggktWtf-tsLUl6nTYMGSJsYBkGRnDfzhpw3nffyZIhatnrBVveLbgqDda2R_KMg303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