[libcxx-commits] [libcxx] Fix missing encoding in open() call in python script (PR #154594)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 20 11:41:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Adam (siradam7th)
<details>
<summary>Changes</summary>
This is a simple fix for the script not being able to run on some platforms due to a missing encoding parameter.
---
Full diff: https://github.com/llvm/llvm-project/pull/154594.diff
1 Files Affected:
- (modified) libcxx/utils/generate_libcxx_cppm_in.py (+10-2)
``````````diff
diff --git a/libcxx/utils/generate_libcxx_cppm_in.py b/libcxx/utils/generate_libcxx_cppm_in.py
index 39076a61b55b8..26d680a0db31f 100644
--- a/libcxx/utils/generate_libcxx_cppm_in.py
+++ b/libcxx/utils/generate_libcxx_cppm_in.py
@@ -9,11 +9,19 @@
import os.path
import sys
-from libcxx.header_information import module_c_headers, module_headers, header_restrictions, headers_not_available, libcxx_root
+from libcxx.header_information import (
+ module_c_headers,
+ module_headers,
+ header_restrictions,
+ headers_not_available,
+ libcxx_root,
+)
def write_file(module):
- with open(libcxx_root / "modules" / f"{module}.cppm.in", "w") as module_cpp_in:
+ with open(
+ libcxx_root / "modules" / f"{module}.cppm.in", "w", encoding="utf-8"
+ ) as module_cpp_in:
module_cpp_in.write(
"""\
// -*- C++ -*-
``````````
</details>
https://github.com/llvm/llvm-project/pull/154594
More information about the libcxx-commits
mailing list