Skip to content

Commit 4dd97bd

Browse files
Exclude unsupported build combination
1 parent b99fbcb commit 4dd97bd

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Rakefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,20 @@ BUILD_PROFILES = {
8383
BUILDS =
8484
BUILD_SOURCES.keys.flat_map do |src|
8585
%w[wasm32-unknown-wasi wasm32-unknown-emscripten].flat_map do |target|
86-
BUILD_PROFILES.keys.map do |profile|
87-
{ src: src, target: target, profile: profile }
88-
end
86+
BUILD_PROFILES
87+
.keys
88+
.filter do |profile_name|
89+
if target == "wasm32-unknown-emscripten"
90+
profile = BUILD_PROFILES[profile_name]
91+
user_exts = profile[:user_exts]
92+
# Skip builds with JS extensions or debug mode for Emscripten
93+
# because JS extensions have incompatible import/export entries
94+
# and debug mode is rarely used for Emscripten.
95+
next !(user_exts.include?("witapi") || user_exts.include?("js") || profile[:debug])
96+
end
97+
next true
98+
end
99+
.map { |profile| { src: src, target: target, profile: profile } }
89100
end
90101
end
91102

0 commit comments

Comments
 (0)