'disable optimization for the C or C++ compiler'

def disable_optimization(self):

    badoptions = ('-O1', '-O2', '-O3')
    for (flag, option) in zip(self.flags, self.state):
        if (option is not None):
            L = [opt for opt in option.split() if (opt not in badoptions)]
            self.config_vars[flag] = '    '.join(L)
