Respect RUSTC_LINK_STD_INTO_RUSTC_DRIVER=0 in link_std_into_rustc_driver#153409
Respect RUSTC_LINK_STD_INTO_RUSTC_DRIVER=0 in link_std_into_rustc_driver#153409DeepeshWR wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
429e4bc to
0d326ff
Compare
This comment has been minimized.
This comment has been minimized.
0d326ff to
168c019
Compare
This comment has been minimized.
This comment has been minimized.
Allow users to opt out of statically linking std into rustc_driver by setting RUSTC_LINK_STD_INTO_RUSTC_DRIVER=0. If unset or set to any other value, the function falls back to the default, linking std into rustc_driver on all platforms except Windows. Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
168c019 to
b8b260f
Compare
|
This should probably be an option in bootstrap.toml rather than an env var.
The existing env var is just an implementation detail of how the main bootstrap executable and the rustc wrapper of bootstrap communicate. |
Hi @bjorn3, Is this what you were suggesting ? |
This patch allows users to opt out of statically linking std into rustc_driver by setting the existing environment variable
RUSTC_LINK_STD_INTO_RUSTC_DRIVER=0.If the variable is unset or set to any other value, the function falls back to the default behavior (linking std on all platforms except Windows).
Note: This does not introduce a new environment variable; it only respects an existing one.
Defaults remain unchanged, so normal builds are unaffected.
Example usage: