Author: Yusuke Tsutsumi <[email protected]>
Branch: py3.5
Changeset: r94539:4c61881c4c06
Date: 2018-04-27 08:32 -0700
http://bitbucket.org/pypy/pypy/changeset/4c61881c4c06/

Log:    Adding detection of cc and gcc to build variables

diff --git a/lib_pypy/_sysconfigdata.py b/lib_pypy/_sysconfigdata.py
--- a/lib_pypy/_sysconfigdata.py
+++ b/lib_pypy/_sysconfigdata.py
@@ -1,4 +1,6 @@
 import _imp
+import os
+from distutils.spawn import find_executable
 
 so_ext = _imp.extension_suffixes()[0]
 
@@ -8,3 +10,11 @@
     "SOABI": '-'.join(so_ext.split('.')[1].split('-')[:2]),
     "SO": so_ext  # deprecated in Python 3, for backward compatibility
 }
+
+cc_compiler_path = os.path.realpath(find_executable("cc"))
+cc_compiler = os.path.basename(cc_compiler_path)
+build_time_vars["CC"] = cc_compiler
+if "gcc" in cc_compiler or "g++" in cc_compiler:
+    # If we used the gnu compiler, we can safely assume we are using the gnu
+    # linker
+    build_time_vars["GNULD"] = "yes"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to