@@ -2063,33 +2063,41 @@ arbitrarily complex configurations through nesting.
20632063
20642064The following configurations must be defined by the implementation:
20652065
2066- * ` debug_assertions ` - Enabled by default when compiling without optimizations.
2067- This can be used to enable extra debugging code in development but not in
2068- production. For example, it controls the behavior of the standard library's
2069- ` debug_assert! ` macro.
2070- * ` target_arch = "..." ` - Target CPU architecture, such as ` "x86" ` , ` "x86_64" `
2071- ` "mips" ` , ` "powerpc" ` , ` "powerpc64" ` , ` "arm" ` , or ` "aarch64" ` .
2072- * ` target_endian = "..." ` - Endianness of the target CPU, either ` "little" ` or
2073- ` "big" ` .
2074- * ` target_env = ".." ` - An option provided by the compiler by default
2075- describing the runtime environment of the target platform. Some examples of
2076- this are ` musl ` for builds targeting the MUSL libc implementation, ` msvc ` for
2077- Windows builds targeting MSVC, and ` gnu ` frequently the rest of the time. This
2078- option may also be blank on some platforms.
2066+ * ` target_arch = "..." ` - Target CPU architecture, such as ` "x86" ` ,
2067+ ` "x86_64" ` ` "mips" ` , ` "powerpc" ` , ` "powerpc64" ` , ` "arm" ` , or
2068+ ` "aarch64" ` . This value is closely related to the first element of
2069+ the platform target triple, though it is not identical.
2070+ * ` target_os = "..." ` - Operating system of the target, examples
2071+ include ` "windows" ` , ` "macos" ` , ` "ios" ` , ` "linux" ` , ` "android" ` ,
2072+ ` "freebsd" ` , ` "dragonfly" ` , ` "bitrig" ` , ` "openbsd" ` or
2073+ ` "netbsd" ` . This value is closely related to the second and third
2074+ element of the platform target triple, though it is not identical.
20792075* ` target_family = "..." ` - Operating system family of the target, e. g.
20802076 ` "unix" ` or ` "windows" ` . The value of this configuration option is defined
20812077 as a configuration itself, like ` unix ` or ` windows ` .
2082- * ` target_os = "..." ` - Operating system of the target, examples include
2083- ` "windows" ` , ` "macos" ` , ` "ios" ` , ` "linux" ` , ` "android" ` , ` "freebsd" ` , ` "dragonfly" ` ,
2084- ` "bitrig" ` , ` "openbsd" ` or ` "netbsd" ` .
2078+ * ` unix ` - See ` target_family ` .
2079+ * ` windows ` - See ` target_family ` .
2080+ * ` target_env = ".." ` - Further disambiguates the target platform with
2081+ information about the ABI/libc. Presently this value is either
2082+ ` "gnu" ` , ` "msvc" ` , ` "musl" ` , or the empty string. For historical
2083+ reasons this value has only been defined as non-empty when needed
2084+ for disambiguation. Thus on many GNU platforms this value will be
2085+ empty. This value is closely related to the fourth element of the
2086+ platform target triple, though it is not identical. For example,
2087+ embedded ABIs such as ` gnueabihf ` will simply define ` target_env ` as
2088+ ` "gnu" ` .
2089+ * ` target_endian = "..." ` - Endianness of the target CPU, either ` "little" ` or
2090+ ` "big" ` .
20852091* ` target_pointer_width = "..." ` - Target pointer width in bits. This is set
20862092 to ` "32" ` for targets with 32-bit pointers, and likewise set to ` "64" ` for
20872093 64-bit pointers.
20882094* ` target_vendor = "..." ` - Vendor of the target, for example ` apple ` , ` pc ` , or
20892095 simply ` "unknown" ` .
20902096* ` test ` - Enabled when compiling the test harness (using the ` --test ` flag).
2091- * ` unix ` - See ` target_family ` .
2092- * ` windows ` - See ` target_family ` .
2097+ * ` debug_assertions ` - Enabled by default when compiling without optimizations.
2098+ This can be used to enable extra debugging code in development but not in
2099+ production. For example, it controls the behavior of the standard library's
2100+ ` debug_assert! ` macro.
20932101
20942102You can also set another attribute based on a ` cfg ` variable with ` cfg_attr ` :
20952103
0 commit comments