From 397dc896fbcd13f08dec173c85a9a1959d73302c Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Tue, 29 Nov 2016 23:03:14 +0100 Subject: [PATCH] Fix --optimizer-options=-optimize still applying some optimizations. This option normally takes effect through the base class in lsloptimize.py, which doesn't call the optimization techniques if deactivated. However, lsloutput.py is not called by it, and it applied some optimizations on its own. Fixed on the reading of the optimization options, by filtering them by whether the optimize option is active. --- lslopt/lsloutput.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lslopt/lsloutput.py b/lslopt/lsloutput.py index 1dfffea..4f12ddd 100644 --- a/lslopt/lsloutput.py +++ b/lslopt/lsloutput.py @@ -437,9 +437,12 @@ class outscript(object): self.tree, self.symtab = treesymtab # Grab options - self.optsigns = 'optsigns' in options - self.optfloats = 'optfloats' in options - self.foldconst = 'constfold' in options + self.optimize = 'optimize' in options + # These are optimization options that depend on the above: + self.optsigns = self.optimize and 'optsigns' in options + self.optfloats = self.optimize and 'optfloats' in options + self.foldconst = self.optimize and 'constfold' in options + self.warntabs = 'warntabs' in options ret = ''