Skip to content

Commit 49d180f

Browse files
authored
fix(multiplatform): Add i386 Linux support (#1999)
Enable i386 Linux platform detection support. Without this change `rules_python` complains about an unrecognized platform when run on a 32-bit platform, e.g. where `os.uname().machine` returns `i686`. This effectively makes `rules_python` unusable on 32-bit platforms.
1 parent f56fe42 commit 49d180f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

python/versions.bzl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,17 @@ PLATFORMS = {
532532
os_name = LINUX_NAME,
533533
arch = "armv7",
534534
),
535+
"i386-unknown-linux-gnu": struct(
536+
compatible_with = [
537+
"@platforms//os:linux",
538+
"@platforms//cpu:i386",
539+
],
540+
flag_values = {
541+
Label("//python/config_settings:py_linux_libc"): "glibc",
542+
},
543+
os_name = LINUX_NAME,
544+
arch = "i386",
545+
),
535546
"ppc64le-unknown-linux-gnu": struct(
536547
compatible_with = [
537548
"@platforms//os:linux",

0 commit comments

Comments
 (0)