summaryrefslogtreecommitdiffstats
path: root/debian/patches/d-0020-remove-windows-dependencies.patch
blob: dd4f4d88d8ad388ae2d0d349e110890bfbafcf19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Mon, 6 May 2024 10:25:32 +0200
Subject: d-0020-remove-windows-dependencies

===================================================================
---
 compiler/rustc_codegen_ssa/Cargo.toml              |  4 ----
 compiler/rustc_data_structures/Cargo.toml          | 10 ----------
 compiler/rustc_driver_impl/Cargo.toml              |  6 ------
 compiler/rustc_errors/Cargo.toml                   |  8 --------
 compiler/rustc_session/Cargo.toml                  |  7 -------
 library/backtrace/Cargo.toml                       | 13 ------------
 src/bootstrap/Cargo.toml                           | 15 --------------
 src/tools/cargo/Cargo.toml                         | 23 ++++------------------
 .../cargo/crates/cargo-test-support/Cargo.toml     |  3 ---
 src/tools/cargo/crates/cargo-util/Cargo.toml       |  7 -------
 src/tools/cargo/crates/home/Cargo.toml             |  3 ---
 .../cargo/credential/cargo-credential/Cargo.toml   |  3 ---
 src/tools/cargo/src/cargo/util/auth/mod.rs         |  5 -----
 src/tools/compiletest/Cargo.toml                   | 10 ----------
 src/tools/rust-analyzer/crates/profile/Cargo.toml  |  3 ---
 .../rust-analyzer/crates/rust-analyzer/Cargo.toml  |  6 ------
 src/tools/rust-analyzer/crates/stdx/Cargo.toml     |  4 ----
 17 files changed, 4 insertions(+), 126 deletions(-)

diff --git a/compiler/rustc_codegen_ssa/Cargo.toml b/compiler/rustc_codegen_ssa/Cargo.toml
index 4dae49f..20453c2 100644
--- a/compiler/rustc_codegen_ssa/Cargo.toml
+++ b/compiler/rustc_codegen_ssa/Cargo.toml
@@ -49,7 +49,3 @@ libc = "0.2.50"
 version = "0.32.0"
 default-features = false
 features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write"]
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = ["Win32_Globalization"]
diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
index 8d91c4c..0de63d9 100644
--- a/compiler/rustc_data_structures/Cargo.toml
+++ b/compiler/rustc_data_structures/Cargo.toml
@@ -32,16 +32,6 @@ tracing = "0.1"
 [dependencies.parking_lot]
 version = "0.12"
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = [
-    "Win32_Foundation",
-    "Win32_Storage_FileSystem",
-    "Win32_System_IO",
-    "Win32_System_ProcessStatus",
-    "Win32_System_Threading",
-]
-
 [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
 # tidy-alphabetical-start
 memmap2 = "0.2.1"
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml
index da7c244..80547ce 100644
--- a/compiler/rustc_driver_impl/Cargo.toml
+++ b/compiler/rustc_driver_impl/Cargo.toml
@@ -58,12 +58,6 @@ tracing = { version = "0.1.35" }
 libc = "0.2"
 # tidy-alphabetical-end
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = [
-    "Win32_System_Diagnostics_Debug",
-]
-
 [features]
 # tidy-alphabetical-start
 llvm = ['rustc_interface/llvm']
diff --git a/compiler/rustc_errors/Cargo.toml b/compiler/rustc_errors/Cargo.toml
index fc3ff83..4f74aec 100644
--- a/compiler/rustc_errors/Cargo.toml
+++ b/compiler/rustc_errors/Cargo.toml
@@ -27,14 +27,6 @@ tracing = "0.1"
 unicode-width = "0.1.4"
 # tidy-alphabetical-end
 
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = [
-    "Win32_Foundation",
-    "Win32_Security",
-    "Win32_System_Threading",
-]
-
 [features]
 # tidy-alphabetical-start
 rustc_use_parallel_compiler = ['rustc_error_messages/rustc_use_parallel_compiler']
diff --git a/compiler/rustc_session/Cargo.toml b/compiler/rustc_session/Cargo.toml
index 1f51dd6..2974bd0 100644
--- a/compiler/rustc_session/Cargo.toml
+++ b/compiler/rustc_session/Cargo.toml
@@ -28,10 +28,3 @@ tracing = "0.1"
 # tidy-alphabetical-start
 libc = "0.2"
 # tidy-alphabetical-end
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = [
-    "Win32_Foundation",
-    "Win32_System_LibraryLoader",
-]
diff --git a/library/backtrace/Cargo.toml b/library/backtrace/Cargo.toml
index 932310b..dce3c3f 100644
--- a/library/backtrace/Cargo.toml
+++ b/library/backtrace/Cargo.toml
@@ -48,9 +48,6 @@ version = "0.32.0"
 default-features = false
 features = ['read_core', 'elf', 'macho', 'pe', 'xcoff', 'unaligned', 'archive']
 
-[target.'cfg(windows)'.dependencies]
-winapi = { version = "0.3.9", optional = true }
-
 [build-dependencies]
 # Only needed for Android, but cannot be target dependent
 # https://github.com/rust-lang/cargo/issues/4932
@@ -88,16 +85,6 @@ libbacktrace = []
 libunwind = []
 unix-backtrace = []
 verify-winapi = [
-  'winapi/dbghelp',
-  'winapi/handleapi',
-  'winapi/libloaderapi',
-  'winapi/memoryapi',
-  'winapi/minwindef',
-  'winapi/processthreadsapi',
-  'winapi/synchapi',
-  'winapi/tlhelp32',
-  'winapi/winbase',
-  'winapi/winnt',
 ]
 
 [[example]]
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index e4d3591..b548faf 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -66,21 +66,6 @@ sysinfo = { version = "0.26.0", optional = true }
 [target.'cfg(not(target_os = "solaris"))'.dependencies]
 fd-lock = "3.0.13"
 
-[target.'cfg(windows)'.dependencies.junction]
-version = "1.0.0"
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.51.1"
-features = [
-    "Win32_Foundation",
-    "Win32_Security",
-    "Win32_System_Diagnostics_Debug",
-    "Win32_System_JobObjects",
-    "Win32_System_ProcessStatus",
-    "Win32_System_Threading",
-    "Win32_System_Time",
-]
-
 [dev-dependencies]
 pretty_assertions = "1.4"
 
diff --git a/src/tools/cargo/Cargo.toml b/src/tools/cargo/Cargo.toml
index c011909..989d8d4 100644
--- a/src/tools/cargo/Cargo.toml
+++ b/src/tools/cargo/Cargo.toml
@@ -2,7 +2,9 @@
 resolver = "2"
 members = [
   "crates/*",
-  "credential/*",
+  "credential/cargo-credential",
+  "credential/cargo-credential-1password",
+  "credential/cargo-credential-libsecret",
   "benches/benchsuite",
   "benches/capture",
 ]
@@ -24,8 +26,6 @@ bytesize = "1.3"
 cargo = { path = "" }
 cargo-credential = { version = "0.4.1", path = "credential/cargo-credential" }
 cargo-credential-libsecret = { version = "0.4.1", path = "credential/cargo-credential-libsecret" }
-cargo-credential-macos-keychain = { version = "0.4.1", path = "credential/cargo-credential-macos-keychain" }
-cargo-credential-wincred = { version = "0.4.1", path = "credential/cargo-credential-wincred" }
 cargo-platform = { path = "crates/cargo-platform", version = "0.1.4" }
 cargo-test-macro = { path = "crates/cargo-test-macro" }
 cargo-test-support = { path = "crates/cargo-test-support" }
@@ -102,7 +102,6 @@ unicode-xid = "0.2.4"
 url = "2.4.1"
 varisat = "0.2.2"
 walkdir = "2.4.0"
-windows-sys = "0.48"
 
 [package]
 name = "cargo"
@@ -129,6 +128,7 @@ base64.workspace = true
 bytesize.workspace = true
 cargo-credential.workspace = true
 cargo-platform.workspace = true
+cargo-credential-libsecret.workspace = true
 cargo-util.workspace = true
 clap = { workspace = true, features = ["wrap_help"] }
 color-print.workspace = true
@@ -189,9 +189,6 @@ walkdir.workspace = true
 [target.'cfg(target_os = "linux")'.dependencies]
 cargo-credential-libsecret.workspace = true
 
-[target.'cfg(target_os = "macos")'.dependencies]
-cargo-credential-macos-keychain.workspace = true
-
 [target.'cfg(not(windows))'.dependencies]
 openssl = { workspace = true, optional = true }
 
@@ -195,21 +195,6 @@ cargo-credential-macos-keychain.workspace = true
 [target.'cfg(not(windows))'.dependencies]
 openssl = { workspace = true, optional = true }
 
-[target.'cfg(windows)'.dependencies]
-cargo-credential-wincred.workspace = true
-
-[target.'cfg(windows)'.dependencies.windows-sys]
-workspace = true
-features = [
-  "Win32_Foundation",
-  "Win32_Security",
-  "Win32_Storage_FileSystem",
-  "Win32_System_IO",
-  "Win32_System_Console",
-  "Win32_System_JobObjects",
-  "Win32_System_Threading",
-]
-
 [dev-dependencies]
 cargo-test-macro.workspace = true
 cargo-test-support.workspace = true
diff --git a/src/tools/cargo/crates/cargo-test-support/Cargo.toml b/src/tools/cargo/crates/cargo-test-support/Cargo.toml
index fc32e1c..ce5d708 100644
--- a/src/tools/cargo/crates/cargo-test-support/Cargo.toml
+++ b/src/tools/cargo/crates/cargo-test-support/Cargo.toml
@@ -29,6 +29,3 @@ tar.workspace = true
 time.workspace = true
 toml.workspace = true
 url.workspace = true
-
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem"] }
diff --git a/src/tools/cargo/crates/cargo-util/Cargo.toml b/src/tools/cargo/crates/cargo-util/Cargo.toml
index 616a79c..9fc3971 100644
--- a/src/tools/cargo/crates/cargo-util/Cargo.toml
+++ b/src/tools/cargo/crates/cargo-util/Cargo.toml
@@ -20,10 +20,3 @@ shell-escape.workspace = true
 tempfile.workspace = true
 tracing.workspace = true
 walkdir.workspace = true
-
-[target.'cfg(target_os = "macos")'.dependencies]
-core-foundation.workspace = true
-
-[target.'cfg(windows)'.dependencies]
-miow.workspace = true
-windows-sys = { workspace = true, features = ["Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_Console"] }
diff --git a/src/tools/cargo/crates/home/Cargo.toml b/src/tools/cargo/crates/home/Cargo.toml
index 702a14e..dafeec8 100644
--- a/src/tools/cargo/crates/home/Cargo.toml
+++ b/src/tools/cargo/crates/home/Cargo.toml
@@ -15,6 +15,3 @@ include = [
 license.workspace = true
 repository = "https://github.com/rust-lang/cargo"
 description = "Shared definitions of home directories."
-
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_UI_Shell"] }
diff --git a/src/tools/cargo/credential/cargo-credential/Cargo.toml b/src/tools/cargo/credential/cargo-credential/Cargo.toml
index 8ba65b8..6678c23 100644
--- a/src/tools/cargo/credential/cargo-credential/Cargo.toml
+++ b/src/tools/cargo/credential/cargo-credential/Cargo.toml
@@ -15,8 +15,5 @@ serde_json.workspace = true
 thiserror.workspace = true
 time.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-windows-sys = { workspace = true, features = ["Win32_System_Console", "Win32_Foundation"] }
-
 [dev-dependencies]
 snapbox = { workspace = true, features = ["examples"] }
diff --git a/src/tools/cargo/src/cargo/util/auth/mod.rs b/src/tools/cargo/src/cargo/util/auth/mod.rs
index c2f8186..c420971 100644
--- a/src/tools/cargo/src/cargo/util/auth/mod.rs
+++ b/src/tools/cargo/src/cargo/util/auth/mod.rs
@@ -529,11 +529,6 @@ fn credential_action(
             }
             "cargo:paseto" => bail!("cargo:paseto requires -Zasymmetric-token"),
             "cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
-            #[cfg(windows)]
-            "cargo:wincred" => Box::new(cargo_credential_wincred::WindowsCredential {}),
-            #[cfg(target_os = "macos")]
-            "cargo:macos-keychain" => Box::new(cargo_credential_macos_keychain::MacKeychain {}),
-            #[cfg(target_os = "linux")]
             "cargo:libsecret" => Box::new(cargo_credential_libsecret::LibSecretCredential {}),
             name if BUILT_IN_PROVIDERS.contains(&name) => {
                 Box::new(cargo_credential::UnsupportedCredential {})
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index 31c6353..bdc4805 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -29,13 +29,3 @@ home = "0.5.5"
 
 [target.'cfg(unix)'.dependencies]
 libc = "0.2"
-
-[target.'cfg(windows)'.dependencies]
-miow = "0.6"
-
-[target.'cfg(windows)'.dependencies.windows]
-version = "0.48.0"
-features = [
-    "Win32_Foundation",
-    "Win32_System_Diagnostics_Debug",
-]
diff --git a/src/tools/rust-analyzer/crates/profile/Cargo.toml b/src/tools/rust-analyzer/crates/profile/Cargo.toml
index fd98d85..8c1d137 100644
--- a/src/tools/rust-analyzer/crates/profile/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/profile/Cargo.toml
@@ -21,9 +21,6 @@ countme = { version = "3.0.1", features = ["enable"] }
 [target.'cfg(target_os = "linux")'.dependencies]
 perf-event = "=0.4.7"
 
-[target.'cfg(windows)'.dependencies]
-winapi = { version = "0.3.9", features = ["processthreadsapi", "psapi"] }
-
 [features]
 cpu_profiler = []
 
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
index 7410f0a..d25b922 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
@@ -71,12 +71,6 @@ toolchain.workspace = true
 vfs-notify.workspace = true
 vfs.workspace = true
 
-[target.'cfg(windows)'.dependencies]
-winapi = "0.3.9"
-
-[target.'cfg(not(target_env = "msvc"))'.dependencies]
-jemallocator = { version = "0.5.0", package = "tikv-jemallocator", optional = true }
-
 [dev-dependencies]
 expect-test = "1.4.0"
 xshell = "0.2.2"
diff --git a/src/tools/rust-analyzer/crates/stdx/Cargo.toml b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
index 536f000..6ed37f5 100644
--- a/src/tools/rust-analyzer/crates/stdx/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/stdx/Cargo.toml
@@ -19,10 +19,6 @@ jod-thread = "0.1.2"
 crossbeam-channel = "0.5.5"
 # Think twice before adding anything here
 
-[target.'cfg(windows)'.dependencies]
-miow = "0.5.0"
-winapi = { version = "0.3.9", features = ["winerror"] }
-
 [features]
 # Uncomment to enable for the whole crate graph
 # default = [ "backtrace" ]