Skip to content

Commit

Permalink
Merge pull request #1724 from messense/fix-link-native-libraries-check
Browse files Browse the repository at this point in the history
Fix `link-native-libraries` check for emscripten target
  • Loading branch information
messense authored Aug 9, 2023
2 parents 66a1511 + 84b6414 commit 5ead412
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ fn compile_target(
}
} else if target.is_emscripten() {
// Allow user to override these default flags
if !rustflags.flags.iter().any(|f| f == "link-native-libraries") {
if !rustflags
.flags
.iter()
.any(|f| f.contains("link-native-libraries"))
{
debug!("Setting `-Z link-native-libraries=no` for Emscripten");
rustflags.push("-Z");
rustflags.push("link-native-libraries=no");
Expand Down
2 changes: 1 addition & 1 deletion src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl PublishOpt {

/// Set to non interactive mode if we're running on CI
pub fn non_interactive_on_ci(&mut self) {
if env::var("CI").map(|v| v == "true").unwrap_or_default() {
if !self.non_interactive && env::var("CI").map(|v| v == "true").unwrap_or_default() {
eprintln!("🎛️ Running in non-interactive mode on CI");
self.non_interactive = true;
}
Expand Down

0 comments on commit 5ead412

Please sign in to comment.