Пример #1
0
    def finalize(self):
        """
        Finalizes the model, i.e. checks it for validity, optimizes, creates
        per-toolset models etc.
        """
        logger.debug("finalizing the model")

        # call any custom steps first:
        self._call_custom_steps(self.model, "finalize")

        # then apply standard processing:
        passes.detect_potential_problems(self.model)
        passes.normalize_and_validate_bool_subexpressions(self.model)
        passes.normalize_vars(self.model)
        passes.validate_vars(self.model)
        passes.normalize_paths_in_model(self.model, toolset=None)
        passes.simplify_exprs(self.model)
Пример #2
0
    def finalize(self):
        """
        Finalizes the model, i.e. checks it for validity, optimizes, creates
        per-toolset models etc.
        """
        logger.debug("finalizing the model")

        # call any custom steps first:
        self._call_custom_steps(self.model, "finalize")

        # then apply standard processing:
        passes.detect_potential_problems(self.model)
        passes.normalize_and_validate_bool_subexpressions(self.model)
        passes.normalize_vars(self.model)
        passes.validate_vars(self.model)
        passes.normalize_paths_in_model(self.model, toolset=None)
        passes.simplify_exprs(self.model)
Пример #3
0
    def finalize_for_toolset(self, toolset_model, toolset):
        """
        Finalizes after "toolset" variable was set.
        """
        passes.remove_disabled_model_parts(toolset_model, toolset)

        # TODO: do this in finalize() instead
        passes.make_variables_for_missing_props(toolset_model, toolset)

        passes.eliminate_superfluous_conditionals(toolset_model)

        # This is done second time here (in addition to finalize()) to deal
        # with paths added by make_variables_for_missing_props() and paths with
        # @builddir (which is toolset specific and couldn't be resolved
        # earlier).  Ideally we wouldn't do it, but hopefully it's not all that
        # inefficient, as no real work is done for paths that are already
        # normalized:
        passes.normalize_paths_in_model(toolset_model, toolset)
Пример #4
0
    def finalize_for_toolset(self, toolset_model, toolset):
        """
        Finalizes after "toolset" variable was set.
        """
        passes.remove_disabled_model_parts(toolset_model, toolset)

        # TODO: do this in finalize() instead
        passes.make_variables_for_missing_props(toolset_model, toolset)

        passes.eliminate_superfluous_conditionals(toolset_model)

        # This is done second time here (in addition to finalize()) to deal
        # with paths added by make_variables_for_missing_props() and paths with
        # @builddir (which is toolset specific and couldn't be resolved
        # earlier).  Ideally we wouldn't do it, but hopefully it's not all that
        # inefficient, as no real work is done for paths that are already
        # normalized:
        passes.normalize_paths_in_model(toolset_model, toolset)