summaryrefslogtreecommitdiff
path: root/dev-python/zstandard/files/zstandard-0.13.0-compiler.patch
blob: fdaa4aa03922c36d1fa9d25e780b54f10d2d56e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/make_cffi.py b/make_cffi.py
index 0db4f71..4fe9cc4 100644
--- a/make_cffi.py
+++ b/make_cffi.py
@@ -8,6 +8,7 @@ from __future__ import absolute_import
 
 import cffi
 import distutils.ccompiler
+import distutils.sysconfig
 import os
 import re
 import subprocess
@@ -75,10 +76,12 @@ compiler = distutils.ccompiler.new_compiler()
 if hasattr(compiler, "initialize"):
     compiler.initialize()
 
+distutils.sysconfig.customize_compiler(compiler)
+
 # Distutils doesn't set compiler.preprocessor, so invoke the preprocessor
 # manually.
 if compiler.compiler_type == "unix":
-    args = list(compiler.executables["compiler"])
+    args = compiler.compiler
     args.extend(
         ["-E", "-DZSTD_STATIC_LINKING_ONLY", "-DZDICT_STATIC_LINKING_ONLY",]
     )