From 765893e0536ba14202241d3d8b9bab5c061c9aa6 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 3 Jul 2026 11:46:08 +0000 Subject: [PATCH] Update preserve list of library update scripts Following `update_comiler_rt.py`, this updates other update scripts so that we don't remove files having `emscripten` in their names. https://github.com/emscripten-core/emscripten/blob/dd4ab289cfc2721ebaef602d400eea381161c4bb/system/lib/update_compiler_rt.py#L35 Also this adds two more missing files (that don't have `emscripten`) in libcxxabi to its `preserve_files` list so that they don't get deleted every time `update_libcxxabi.py` runs. --- system/lib/update_libcxx.py | 2 +- system/lib/update_libcxxabi.py | 4 ++-- system/lib/update_libunwind.py | 2 +- system/lib/update_llvm_libc.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/lib/update_libcxx.py b/system/lib/update_libcxx.py index f8e6ee74c464a..b4557dde0f602 100755 --- a/system/lib/update_libcxx.py +++ b/system/lib/update_libcxx.py @@ -34,7 +34,7 @@ def clean_dir(dirname): if not os.path.exists(dirname): return for f in os.listdir(dirname): - if f in preserve_files: + if f in preserve_files or 'emscripten' in f: continue full = os.path.join(dirname, f) if os.path.isdir(full): diff --git a/system/lib/update_libcxxabi.py b/system/lib/update_libcxxabi.py index a939501865563..ad3e75d9e9027 100755 --- a/system/lib/update_libcxxabi.py +++ b/system/lib/update_libcxxabi.py @@ -16,12 +16,12 @@ local_inc = os.path.join(local_root, 'include') excludes = ('CMakeLists.txt',) -preserve_files = () +preserve_files = ('cxa_exception_js_utils.cpp', '__cpp_exception.S') def clean_dir(dirname): for f in os.listdir(dirname): - if f in preserve_files: + if f in preserve_files or 'emscripten' in f: continue full = os.path.join(dirname, f) if os.path.isdir(full): diff --git a/system/lib/update_libunwind.py b/system/lib/update_libunwind.py index f9d4ff8883f77..ad77168d9b59f 100755 --- a/system/lib/update_libunwind.py +++ b/system/lib/update_libunwind.py @@ -21,7 +21,7 @@ def clean_dir(dirname): for f in os.listdir(dirname): - if f in preserve_files: + if f in preserve_files or 'emscripten' in f: continue full = os.path.join(dirname, f) if os.path.isdir(full): diff --git a/system/lib/update_llvm_libc.py b/system/lib/update_llvm_libc.py index 8508bb792b67b..352ca9e6b23ac 100644 --- a/system/lib/update_llvm_libc.py +++ b/system/lib/update_llvm_libc.py @@ -50,7 +50,7 @@ def clean_dir(dirname): if not os.path.exists(dirname): return for f in os.listdir(dirname): - if f in preserve_files: + if f in preserve_files or 'emscripten' in f: continue full = os.path.join(dirname, f) if os.path.isdir(full):