mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
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:
parent
e2de571f98
commit
eba4df6903
1 changed files with 1 additions and 2 deletions
3
main.py
3
main.py
|
@ -577,7 +577,7 @@ def main(argv):
|
||||||
shortname = os.path.basename(fname)
|
shortname = os.path.basename(fname)
|
||||||
|
|
||||||
# Build preprocessor command line
|
# Build preprocessor command line
|
||||||
preproc_cmdline = [preproc_command]
|
preproc_cmdline = [preproc_command] + preproc_user_args
|
||||||
if predefines:
|
if predefines:
|
||||||
if preproc == 'gcpp':
|
if preproc == 'gcpp':
|
||||||
preproc_cmdline += [
|
preproc_cmdline += [
|
||||||
|
@ -609,7 +609,6 @@ def main(argv):
|
||||||
preproc_cmdline.append('-D__SHORTFILE__="%s"' % shortname)
|
preproc_cmdline.append('-D__SHORTFILE__="%s"' % shortname)
|
||||||
preproc_cmdline.append('-D__OPTIMIZER__=LSL PyOptimizer')
|
preproc_cmdline.append('-D__OPTIMIZER__=LSL PyOptimizer')
|
||||||
preproc_cmdline.append('-D__OPTIMIZER_VERSION__=' + VERSION)
|
preproc_cmdline.append('-D__OPTIMIZER_VERSION__=' + VERSION)
|
||||||
preproc_cmdline += preproc_user_args
|
|
||||||
|
|
||||||
if type(script) is unicode:
|
if type(script) is unicode:
|
||||||
script = script.encode('utf8')
|
script = script.encode('utf8')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue