aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-29 20:52:55 +0300
committerGitHub <noreply@github.com>2021-06-29 20:52:55 +0300
commit4bfee181c5a166e3d429bd265e06d299dce50f30 (patch)
tree8918a0e09f668ed55748ec254c51b4d92b5403a9 /mesonbuild/compilers/d.py
parent81ca0ec7ae975723b8b399b9f142286895a45dab (diff)
parentc0a2025d038a08092212bfc45e7bbb46ff1e8e52 (diff)
downloadmeson-4bfee181c5a166e3d429bd265e06d299dce50f30.zip
meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.gz
meson-4bfee181c5a166e3d429bd265e06d299dce50f30.tar.bz2
Merge pull request #8918 from mensinda/pathlibFixes
pathlib: Patch pathlib to work around some bugs (fixes #8263 #7295)
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 78d0f62..b5ec905 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -535,7 +535,7 @@ class DCompiler(Compiler):
def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
source_name = os.path.join(work_dir, 'sanity.d')
output_name = os.path.join(work_dir, 'dtest')
- with open(source_name, 'w') as ofile:
+ with open(source_name, 'w', encoding='utf-8') as ofile:
ofile.write('''void main() { }''')
pc = subprocess.Popen(self.exelist + self.get_output_args(output_name) + self._get_target_arch_args() + [source_name], cwd=work_dir)
pc.wait()