Skip to content

Commit ec6ff43

Browse files
committed
dump some info from builtins cfg
1 parent d0a88b8 commit ec6ff43

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From 337e3a5cbc1e92538f02f50baa971f46d235d20e Mon Sep 17 00:00:00 2001
2+
From: Trevor Gross <[email protected]>
3+
Date: Tue, 5 Aug 2025 18:48:23 +0000
4+
Subject: [PATCH] Debug builtins output
5+
6+
---
7+
.../compiler-builtins/configure.rs | 13 +++++++++++--
8+
1 file changed, 11 insertions(+), 2 deletions(-)
9+
10+
diff --git a/library/compiler-builtins/compiler-builtins/configure.rs b/library/compiler-builtins/compiler-builtins/configure.rs
11+
index 9721ddf090c..19a7886f496 100644
12+
--- a/library/compiler-builtins/compiler-builtins/configure.rs
13+
+++ b/library/compiler-builtins/compiler-builtins/configure.rs
14+
@@ -47,6 +47,12 @@ pub fn from_env() -> Self {
15+
.unwrap_or_else(|e| panic!("failed to run `{cmd:?}`: {e}"));
16+
let rustc_cfg = str::from_utf8(&out.stdout).unwrap();
17+
18+
+ println!("cargo::warning=rustc: {}", env::var("RUSTC").unwrap());
19+
+ for line in rustc_cfg {
20+
+ println!("cargo::warning=cfg: {line}");
21+
+ }
22+
+ // println!("cargo::warning=rustc: {}", env::var("RUSTC").unwrap());
23+
+
24+
// If we couldn't query `rustc` (e.g. a custom JSON target was used), make the safe
25+
// choice and leave `f16` and `f128` disabled.
26+
let rustc_output_ok = out.status.success();
27+
@@ -55,7 +61,7 @@ pub fn from_env() -> Self {
28+
let reliable_f16 =
29+
rustc_output_ok && rustc_cfg.lines().any(|l| l == "target_has_reliable_f16");
30+
31+
- Self {
32+
+ let ret = Self {
33+
triple,
34+
triple_split,
35+
os: env::var("CARGO_CFG_TARGET_OS").unwrap(),
36+
@@ -76,7 +82,10 @@ pub fn from_env() -> Self {
37+
.collect(),
38+
reliable_f128,
39+
reliable_f16,
40+
- }
41+
+ };
42+
+
43+
+ println!("cargo::warning=target: {ret:?}");
44+
+ ret
45+
}
46+
47+
#[allow(dead_code)]
48+
--
49+
2.48.1
50+

0 commit comments

Comments
 (0)