append the compiler optimization flags
(self, has_baseline, final_targets, extra_flags)
| 2161 | return has_baseline, final_targets, extra_flags |
| 2162 | |
| 2163 | def _parse_policy_maxopt(self, has_baseline, final_targets, extra_flags): |
| 2164 | """append the compiler optimization flags""" |
| 2165 | if self.cc_has_debug: |
| 2166 | self.dist_log("debug mode is detected, policy 'maxopt' is skipped.") |
| 2167 | elif self.cc_noopt: |
| 2168 | self.dist_log("optimization is disabled, policy 'maxopt' is skipped.") |
| 2169 | else: |
| 2170 | flags = self.cc_flags["opt"] |
| 2171 | if not flags: |
| 2172 | self.dist_log( |
| 2173 | "current compiler doesn't support optimization flags, " |
| 2174 | "policy 'maxopt' is skipped", stderr=True |
| 2175 | ) |
| 2176 | else: |
| 2177 | extra_flags += flags |
| 2178 | return has_baseline, final_targets, extra_flags |
| 2179 | |
| 2180 | def _parse_policy_werror(self, has_baseline, final_targets, extra_flags): |
| 2181 | """force warnings to treated as errors""" |