mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[libc++] Fix missing encoding in open() call in python script (#154594)
This is a simple fix for the script not being able to run on some platforms due to a missing encoding parameter. Co-authored-by: siradam7th <siradam7th@users.noreply.github.com>
This commit is contained in:
@@ -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++ -*-
|
||||
|
||||
Reference in New Issue
Block a user