From bf22b5b5bee9325eaefc0489f59f853622d5c10a Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Tue, 28 Nov 2023 20:31:31 -0500 Subject: [PATCH] doc: clarify different target has different set of `CARGO_CFG_*` values --- src/doc/src/reference/environment-variables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/doc/src/reference/environment-variables.md b/src/doc/src/reference/environment-variables.md index 645ee0fc5d36..eb08e5e3c9b9 100644 --- a/src/doc/src/reference/environment-variables.md +++ b/src/doc/src/reference/environment-variables.md @@ -353,6 +353,8 @@ let out_dir = env::var("OUT_DIR").unwrap(); * `CARGO_CFG_TARGET_POINTER_WIDTH=64` --- The CPU [pointer width]. * `CARGO_CFG_TARGET_ENDIAN=little` --- The CPU [target endianness]. * `CARGO_CFG_TARGET_FEATURE=mmx,sse` --- List of CPU [target features] enabled. + > Note that different [target triple][Target Triple] has a different set of `cfg` values, + > hence variables present in one target triple might not be available in the other. * `OUT_DIR` --- the folder in which all output and intermediate artifacts should be placed. This folder is inside the build directory for the package being built, and it is unique for the package in question.