summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index 09f90441..9d567aee 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -231,6 +231,7 @@ class SourceScanner(object):
self._scanner = CSourceScanner()
self._filenames = []
self._cpp_options = []
+ self._compiler = None
# Public API
@@ -244,6 +245,9 @@ class SourceScanner(object):
if opt not in self._cpp_options:
self._cpp_options.append(opt)
+ def set_compiler(self, compiler):
+ self._compiler = compiler
+
def parse_files(self, filenames):
for filename in filenames:
# self._scanner expects file names to be canonicalized and symlinks to be resolved
@@ -290,7 +294,7 @@ class SourceScanner(object):
defines = ['__GI_SCANNER__']
undefs = []
- cc = CCompiler()
+ cc = CCompiler(compiler_name=self._compiler)
tmp_fd_cpp, tmp_name_cpp = tempfile.mkstemp(prefix='g-ir-cpp-',
suffix='.c',