bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
108 stars 73 forks source link

i386 vs x86_32 #83

Open matzf opened 10 months ago

matzf commented 10 months ago

Currently, there are two separate cpu constraint values x86_32 and i386. The intended use is not entirely clear to me. As I understand it, "x86" is the whole family of instruction set architectures (also known as Intel Architecture "IA-32"), and, technically, "i386" (also known as 80386) is the first processor in the line of this family. However, the two terms are frequently used interchangeably; for example, the Debian port supporting all 32 bit x86 CPUs is called "i386" (see https://www.debian.org/ports/).

Is this i386 cpu constraint value really intended to refer specifically to (the instruction set of the) original 80386 Intel processor? Or does it rather refer to the entire family, just like x86_32? If it's the former, would it make sense to add a big warning note to indicate that you probably don't want to use this? If it's the latter, would it make sense to change i386 to be merely an alias for x86_32?

aiuto commented 6 months ago

My hunch is that it is a historical carry-on. Rather than perpetuate it with an add-on, my preference would be to add a deprecation warning to i386 that it is too ambiguous to mean anything and you shouldn't use it. Then set a removal date 2 years out and just drop it at that time.