aboutsummaryrefslogtreecommitdiff
path: root/compilers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-08-25 01:29:16 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-08-25 01:29:16 +0300
commitcd97f7a768fafc3ff9372e2559df1850c9ab7898 (patch)
treed3260b420b0e6ab7f2805d99a4f7c207e26a6440 /compilers.py
parentbd5b4deeda8703b6ed5abbca0ef3662493e0784a (diff)
downloadmeson-cd97f7a768fafc3ff9372e2559df1850c9ab7898.zip
meson-cd97f7a768fafc3ff9372e2559df1850c9ab7898.tar.gz
meson-cd97f7a768fafc3ff9372e2559df1850c9ab7898.tar.bz2
Give sanity test binaries different names. Also expose project version to modules.
Diffstat (limited to 'compilers.py')
-rw-r--r--compilers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/compilers.py b/compilers.py
index 2b24aea..134edda 100644
--- a/compilers.py
+++ b/compilers.py
@@ -227,7 +227,11 @@ class CCompiler():
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')
+ if self.is_cross:
+ binname = 'sanitycheckc_cross'
+ else:
+ binname = 'sanitycheckc'
+ binary_name = os.path.join(work_dir, binname)
ofile = open(source_name, 'w')
ofile.write('int main(int argc, char **argv) { int class=0; return class; }\n')
ofile.close()