GeezerVison is showing github.com — Fix x86_64-pc-windows-gnu build (#8411) · RustPython/RustPython@3dca6bb
File tree
Expand file treeCollapse file tree
Open diff view settings
actions/install-linux-deps
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/actions/install-linux-deps/action.yml +8Lines changed: 8 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -29,6 +29,10 @@ inputs: |
29 | 29 | description: Install gcc-aarch64-linux-gnu (gcc-aarch64-linux-gnu) |
30 | 30 | required: false |
31 | 31 | default: "false" |
| 32 | + gcc-mingw-w64-x86-64: |
| 33 | + description: Install gcc-mingw-w64-x86-64 (gcc-mingw-w64-x86-64) |
| 34 | + required: false |
| 35 | + default: "false" |
32 | 36 | clang: |
33 | 37 | description: Install clang (clang) |
34 | 38 | required: false |
|
44 | 48 | MUSL_TOOLS: ${{ inputs.musl-tools }} |
45 | 49 | CLANG: ${{ inputs.clang }} |
46 | 50 | GCC_AARCH64_LINUX_GNU: ${{ inputs.gcc-aarch64-linux-gnu }} |
| 51 | + GCC_MINGW_W64_X86_64: ${{ inputs.gcc-mingw-w64-x86-64 }} |
47 | 52 | run: | |
48 | 53 | if ! sudo apt-get update; then |
49 | 54 | echo "::warning::apt-get update failed; disabling nonessential Microsoft apt sources and retrying" |
|
68 | 73 | if [[ "$GCC_AARCH64_LINUX_GNU" == "true" ]]; then |
69 | 74 | packages+=(gcc-aarch64-linux-gnu linux-libc-dev-arm64-cross libc6-dev-arm64-cross) |
70 | 75 | fi |
| 76 | + if [[ "$GCC_MINGW_W64_X86_64" == "true" ]]; then |
| 77 | + packages+=(gcc-mingw-w64-x86-64) |
| 78 | + fi |
71 | 79 |
|
72 | 80 | if ((${#packages[@]})); then |
73 | 81 | sudo apt-get install --no-install-recommends "${packages[@]}" |
|
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/ci.yaml +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -198,6 +198,10 @@ jobs: |
198 | 198 | target: aarch64-unknown-linux-gnu |
199 | 199 | dependencies: |
200 | 200 | gcc-aarch64-linux-gnu: true |
| 201 | + - os: ubuntu-latest |
| 202 | + target: x86_64-pc-windows-gnu |
| 203 | + dependencies: |
| 204 | + gcc-mingw-w64-x86-64: true |
201 | 205 | - os: macos-latest |
202 | 206 | target: aarch64-apple-ios |
203 | 207 | - os: macos-latest |
@@ -216,6 +220,7 @@ jobs: |
216 | 220 | gcc-multilib: ${{ matrix.dependencies.gcc-multilib || false }} |
217 | 221 | musl-tools: ${{ matrix.dependencies.musl-tools || false }} |
218 | 222 | gcc-aarch64-linux-gnu: ${{ matrix.dependencies.gcc-aarch64-linux-gnu || false }} |
| 223 | + gcc-mingw-w64-x86-64: ${{ matrix.dependencies.gcc-mingw-w64-x86-64 || false }} |
219 | 224 |
|
220 | 225 | - name: Restore cache |
221 | 226 | uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 |
|
Collapse file
Copy file name to clipboardExpand all lines: crates/host_env/src/time.rs +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -334,7 +334,7 @@ pub fn gethrvtime_duration() -> Duration { |
334 | 334 | Duration::from_nanos(unsafe { libc::gethrvtime() }) |
335 | 335 | } |
336 | 336 |
|
337 | | -#[cfg(target_env = "msvc")] |
| 337 | +#[cfg(windows)] |
338 | 338 | #[cfg(not(target_arch = "wasm32"))] |
339 | 339 | #[derive(Clone, Debug)] |
340 | 340 | pub struct WindowsTimeZoneInfo { |
@@ -345,15 +345,15 @@ pub struct WindowsTimeZoneInfo { |
345 | 345 | pub daylight_name: String, |
346 | 346 | } |
347 | 347 |
|
348 | | -#[cfg(target_env = "msvc")] |
| 348 | +#[cfg(windows)] |
349 | 349 | #[cfg(not(target_arch = "wasm32"))] |
350 | 350 | fn decode_tz_name(name: &[u16]) -> String { |
351 | 351 | widestring::decode_utf16_lossy(name.iter().copied()) |
352 | 352 | .take_while(|&c| c != '\0') |
353 | 353 | .collect() |
354 | 354 | } |
355 | 355 |
|
356 | | -#[cfg(target_env = "msvc")] |
| 356 | +#[cfg(windows)] |
357 | 357 | #[cfg(not(target_arch = "wasm32"))] |
358 | 358 | #[must_use] |
359 | 359 | pub fn get_tz_info() -> WindowsTimeZoneInfo { |
|
Collapse file
Copy file name to clipboardExpand all lines: crates/vm/src/stdlib/time.rs +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -210,7 +210,7 @@ mod decl { |
210 | 210 | Ok(get_perf_time(vm)?.as_nanos()) |
211 | 211 | } |
212 | 212 |
|
213 | | - #[cfg(target_env = "msvc")] |
| 213 | + #[cfg(windows)] |
214 | 214 | #[cfg(not(target_arch = "wasm32"))] |
215 | 215 | pub(super) fn get_tz_info() -> host_time::WindowsTimeZoneInfo { |
216 | 216 | host_time::get_tz_info() |
|