Author: Matti Picus <[email protected]>
Branch: quieter-translation
Changeset: r75205:daaece5cf074
Date: 2015-01-02 11:03 +0200
http://bitbucket.org/pypy/pypy/changeset/daaece5cf074/

Log:    do not print errors from Works(), maybe we should have a verbose
        mode instead?

diff --git a/ctypes_configure/cbuild.py b/ctypes_configure/cbuild.py
--- a/ctypes_configure/cbuild.py
+++ b/ctypes_configure/cbuild.py
@@ -183,9 +183,9 @@
     gcv['OPT'] = opt
 
 
-def try_compile(c_files, eci):
+def try_compile(c_files, eci, noerr=False):
     try:
-        build_executable(c_files, eci)
+        build_executable(c_files, eci, noerr=noerr)
         result = True
     except (distutils.errors.CompileError,
             distutils.errors.LinkError):
diff --git a/ctypes_configure/configure.py b/ctypes_configure/configure.py
--- a/ctypes_configure/configure.py
+++ b/ctypes_configure/configure.py
@@ -143,12 +143,12 @@
         print >> f, '}'
         f.close()
 
-    def ask_gcc(self, question):
+    def ask_gcc(self, question, noerr=False):
         self.start_main()
         self.f.write(question + "\n")
         self.close()
         eci = self.config._compilation_info_
-        return try_compile([self.path], eci)
+        return try_compile([self.path], eci, noerr=noerr)
 
         
 def configure(CConfig, noerr=False):
@@ -457,7 +457,7 @@
 
 class Works(CConfigSingleEntry):
     def question(self, ask_gcc):
-        return ask_gcc("")
+        return ask_gcc("", noerr=True)
 
 class SizeOf(CConfigEntry):
     """An entry in a CConfig class that stands for
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to