Skip to content

Commit 749e247

Browse files
committed
rust: change Windows triple configuration
This fixes a discrepancy between what we were building in CI and what we were releasing. The upload step should now not complain about missing Windows artifacts. A side-effect of this is we produce install only archives for Windows static builds. I'm not super thrilled about lying about the triple value. But it works and keeps code simpler.
1 parent 3b17403 commit 749e247

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

src/release.rs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,38 @@ pub static RELEASE_TRIPLES: Lazy<BTreeMap<&'static str, TripleRelease>> = Lazy::
4646
);
4747

4848
// Windows.
49-
let windows_suffixes = vec!["shared-pgo", "static-noopt"];
49+
50+
// The -shared and -static parts of the triple are a lie. But the code
51+
// handles it fine.
52+
h.insert(
53+
"i686-pc-windows-msvc-shared",
54+
TripleRelease {
55+
suffixes: vec!["pgo"],
56+
install_only_suffix: "pgo",
57+
python_version_requirement: None,
58+
},
59+
);
60+
h.insert(
61+
"i686-pc-windows-msvc-static",
62+
TripleRelease {
63+
suffixes: vec!["noopt"],
64+
install_only_suffix: "noopt",
65+
python_version_requirement: None,
66+
},
67+
);
5068
h.insert(
51-
"i686-pc-windows-msvc",
69+
"x86_64-pc-windows-msvc-shared",
5270
TripleRelease {
53-
suffixes: windows_suffixes.clone(),
54-
install_only_suffix: "shared-pgo",
71+
suffixes: vec!["pgo"],
72+
install_only_suffix: "pgo",
5573
python_version_requirement: None,
5674
},
5775
);
5876
h.insert(
59-
"x86_64-pc-windows-msvc",
77+
"x86_64-pc-windows-msvc-static",
6078
TripleRelease {
61-
suffixes: windows_suffixes,
62-
install_only_suffix: "shared-pgo",
79+
suffixes: vec!["noopt"],
80+
install_only_suffix: "noopt",
6381
python_version_requirement: None,
6482
},
6583
);

0 commit comments

Comments
 (0)