aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-08-25 01:19:58 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-25 01:19:58 +0300
commitbd5b4deeda8703b6ed5abbca0ef3662493e0784a (patch)
tree6c0410feae66fed9d3530ba22cba75a783c42c71
parent199c57d8d617f775efcd90a34aef1b8aeed98100 (diff)
downloadmeson-bd5b4deeda8703b6ed5abbca0ef3662493e0784a.zip
meson-bd5b4deeda8703b6ed5abbca0ef3662493e0784a.tar.gz
meson-bd5b4deeda8703b6ed5abbca0ef3662493e0784a.tar.bz2
Better sanity testing.
-rw-r--r--compilers.py6
-rw-r--r--interpreter.py1
-rwxr-xr-xmeson.py2
3 files changed, 7 insertions, 2 deletions
diff --git a/compilers.py b/compilers.py
index 5a3a2f4..2b24aea 100644
--- a/compilers.py
+++ b/compilers.py
@@ -223,6 +223,9 @@ class CCompiler():
return os.path.split(header_name)[-1] + '.' + self.get_pch_suffix()
def sanity_check(self, work_dir):
+ mlog.debug('Sanity testing C compiler:', ' '.join(self.exelist))
+ mlog.debug('Is cross compiler: %s.' % str(self.is_cross))
+
source_name = os.path.join(work_dir, 'sanitycheckc.c')
binary_name = os.path.join(work_dir, 'sanitycheckc')
ofile = open(source_name, 'w')
@@ -239,8 +242,7 @@ class CCompiler():
cmdlist = self.exe_wrapper + [binary_name]
else:
cmdlist = [binary_name]
- mlog.debug('Running C test binary, cross is %s.' % str(self.is_cross))
- mlog.debug('Command: ' + ' '.join(cmdlist))
+ mlog.debug('Running test binary command: ' + ' '.join(cmdlist))
pe = subprocess.Popen(cmdlist)
pe.wait()
if pe.returncode != 0:
diff --git a/interpreter.py b/interpreter.py
index f270948..559c561 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1315,6 +1315,7 @@ class Interpreter():
comp.sanity_check(self.environment.get_scratch_dir())
self.coredata.compilers[lang] = comp
if cross_comp is not None:
+ cross_comp.sanity_check(self.environment.get_scratch_dir())
self.coredata.cross_compilers[lang] = cross_comp
mlog.log('Native %s compiler: ' % lang, mlog.bold(' '.join(comp.get_exelist())), ' (%s %s)' % (comp.id, comp.version), sep='')
if not comp.get_language() in self.coredata.external_args:
diff --git a/meson.py b/meson.py
index b2e8f3a..01a46fc 100755
--- a/meson.py
+++ b/meson.py
@@ -15,6 +15,7 @@
# limitations under the License.
import sys, stat, traceback, pickle, argparse
+import datetime
import os.path
import environment, interpreter, mesonlib
import build
@@ -116,6 +117,7 @@ itself as required.'''
def generate(self):
env = environment.Environment(self.source_dir, self.build_dir, self.meson_script_file, self.options)
mlog.initialize(env.get_log_dir())
+ mlog.debug('Build started at', datetime.datetime.now().isoformat())
mlog.log(mlog.bold('The Meson build system'))
mlog.log('Version:', coredata.version)
mlog.log('Source dir:', mlog.bold(self.source_dir))