Give sanity test binaries different names. Also expose project version to modules.

pull/243/head
Jussi Pakkanen 9 years ago
parent bd5b4deeda
commit cd97f7a768
  1. 6
      compilers.py
  2. 1
      interpreter.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()

@ -699,6 +699,7 @@ class ModuleHolder(InterpreterObject):
state.subdir = self.interpreter.subdir
state.environment = self.interpreter.environment
state.project_name = self.interpreter.build.project_name
state.project_version = self.interpreter.build.project_version
state.compilers = self.interpreter.build.compilers
state.targets = self.interpreter.build.targets
state.headers = self.interpreter.build.get_headers()

Loading…
Cancel
Save