Hide stderr when running llmv-nm --print-armap (#10198)
The stderr contains "no symbols" for each input object that doesn't
have any symbols at all.
Fixes: #10191
diff --git a/emcc.py b/emcc.py
index 157b4aa..836b38b 100755
--- a/emcc.py
+++ b/emcc.py
@@ -473,7 +473,8 @@
# Fastcomp linking works without archive indexes.
if not shared.Settings.WASM_BACKEND or not shared.Settings.AUTO_ARCHIVE_INDEXES:
return
- stdout = run_process([shared.LLVM_NM, '--print-armap', archive_file], stdout=PIPE).stdout
+ # Ignore stderr since llvm-nm prints "no symbols" to stderr for each object that has no symbols
+ stdout = run_process([shared.LLVM_NM, '--print-armap', archive_file], stdout=PIPE, stderr=PIPE).stdout
stdout = stdout.strip()
# Ignore empty archives
if not stdout: