Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/actions/install-linux-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
description: Install gcc-aarch64-linux-gnu (gcc-aarch64-linux-gnu)
required: false
default: "false"
gcc-mingw-w64-x86-64:
description: Install gcc-mingw-w64-x86-64 (gcc-mingw-w64-x86-64)
required: false
default: "false"
clang:
description: Install clang (clang)
required: false
Expand All @@ -44,6 +48,7 @@ runs:
MUSL_TOOLS: ${{ inputs.musl-tools }}
CLANG: ${{ inputs.clang }}
GCC_AARCH64_LINUX_GNU: ${{ inputs.gcc-aarch64-linux-gnu }}
GCC_MINGW_W64_X86_64: ${{ inputs.gcc-mingw-w64-x86-64 }}
run: |
if ! sudo apt-get update; then
echo "::warning::apt-get update failed; disabling nonessential Microsoft apt sources and retrying"
Expand All @@ -68,6 +73,9 @@ runs:
if [[ "$GCC_AARCH64_LINUX_GNU" == "true" ]]; then
packages+=(gcc-aarch64-linux-gnu linux-libc-dev-arm64-cross libc6-dev-arm64-cross)
fi
if [[ "$GCC_MINGW_W64_X86_64" == "true" ]]; then
packages+=(gcc-mingw-w64-x86-64)
fi

if ((${#packages[@]})); then
sudo apt-get install --no-install-recommends "${packages[@]}"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ jobs:
target: aarch64-unknown-linux-gnu
dependencies:
gcc-aarch64-linux-gnu: true
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
dependencies:
gcc-mingw-w64-x86-64: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- os: macos-latest
target: aarch64-apple-ios
- os: macos-latest
Expand All @@ -216,6 +220,7 @@ jobs:
gcc-multilib: ${{ matrix.dependencies.gcc-multilib || false }}
musl-tools: ${{ matrix.dependencies.musl-tools || false }}
gcc-aarch64-linux-gnu: ${{ matrix.dependencies.gcc-aarch64-linux-gnu || false }}
gcc-mingw-w64-x86-64: ${{ matrix.dependencies.gcc-mingw-w64-x86-64 || false }}

- name: Restore cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down
6 changes: 3 additions & 3 deletions crates/host_env/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ pub fn gethrvtime_duration() -> Duration {
Duration::from_nanos(unsafe { libc::gethrvtime() })
}

#[cfg(target_env = "msvc")]
#[cfg(windows)]
#[cfg(not(target_arch = "wasm32"))]
#[derive(Clone, Debug)]
pub struct WindowsTimeZoneInfo {
Expand All @@ -328,15 +328,15 @@ pub struct WindowsTimeZoneInfo {
pub daylight_name: String,
}

#[cfg(target_env = "msvc")]
#[cfg(windows)]
#[cfg(not(target_arch = "wasm32"))]
fn decode_tz_name(name: &[u16]) -> String {
widestring::decode_utf16_lossy(name.iter().copied())
.take_while(|&c| c != '\0')
.collect()
}

#[cfg(target_env = "msvc")]
#[cfg(windows)]
#[cfg(not(target_arch = "wasm32"))]
#[must_use]
pub fn get_tz_info() -> WindowsTimeZoneInfo {
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/stdlib/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ mod decl {
Ok(get_perf_time(vm)?.as_nanos())
}

#[cfg(target_env = "msvc")]
#[cfg(windows)]
#[cfg(not(target_arch = "wasm32"))]
pub(super) fn get_tz_info() -> host_time::WindowsTimeZoneInfo {
host_time::get_tz_info()
Expand Down
Loading