Add preproc user args before internal args, rather than after them.

This allows using e.g. --precmd=python --prearg=mypreproc.py and still benefit from automatic defines, but on the negative side (or not?), it doesn't allow user options to override mcpp/gcpp internal options; user is forced to use -p ext in that case.
This commit is contained in:
Sei Lisa 2017-11-26 14:02:04 +01:00
parent e2de571f98
commit eba4df6903

View file

@ -577,7 +577,7 @@ def main(argv):
shortname = os.path.basename(fname)
# Build preprocessor command line
preproc_cmdline = [preproc_command]
preproc_cmdline = [preproc_command] + preproc_user_args
if predefines:
if preproc == 'gcpp':
preproc_cmdline += [
@ -609,7 +609,6 @@ def main(argv):
preproc_cmdline.append('-D__SHORTFILE__="%s"' % shortname)
preproc_cmdline.append('-D__OPTIMIZER__=LSL PyOptimizer')
preproc_cmdline.append('-D__OPTIMIZER_VERSION__=' + VERSION)
preproc_cmdline += preproc_user_args
if type(script) is unicode:
script = script.encode('utf8')