Skip to content

Commit

Permalink
feat: add support for WASM targets in the lib check (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored May 23, 2024
1 parent cd0418e commit aa72cbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/package_test/content_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::path::PathBuf;
use crate::package_test::TestError;
use crate::recipe::parser::PackageContentsTest;
use globset::{Glob, GlobBuilder, GlobSet};
use rattler_conda_types::{package::PathsJson, Platform};
use rattler_conda_types::{package::PathsJson, Arch, Platform};

fn build_glob(glob: String) -> Result<Glob, globset::Error> {
tracing::debug!("Building glob: {}", glob);
Expand Down Expand Up @@ -132,7 +132,8 @@ impl PackageContentsTest {
.add(build_glob(format!("lib/{{,lib}}{lib}.*.dylib"))?)
.build()
}
} else if target_platform.is_linux() {
} else if target_platform.is_linux() || target_platform.arch() == Some(Arch::Wasm32)
{
if lib.glob().ends_with(".so")
|| lib.glob().contains(".so.")
|| lib.glob().ends_with(".a")
Expand Down

0 comments on commit aa72cbb

Please sign in to comment.