Returns a list of shell commands that contain the shell commands necessary to strip this target's binary. These should be run as postbuilds before the actual postbuilds run.
(self, configname, output_binary, quiet)
| 1055 | return result |
| 1056 | |
| 1057 | def _GetStripPostbuilds(self, configname, output_binary, quiet): |
| 1058 | """Returns a list of shell commands that contain the shell commands |
| 1059 | necessary to strip this target's binary. These should be run as postbuilds |
| 1060 | before the actual postbuilds run.""" |
| 1061 | self.configname = configname |
| 1062 | |
| 1063 | result = [] |
| 1064 | if self._Test("DEPLOYMENT_POSTPROCESSING", "YES", default="NO") and self._Test( |
| 1065 | "STRIP_INSTALLED_PRODUCT", "YES", default="NO" |
| 1066 | ): |
| 1067 | default_strip_style = "debugging" |
| 1068 | if ( |
| 1069 | self.spec["type"] == "loadable_module" or self._IsIosAppExtension() |
| 1070 | ) and self._IsBundle(): |
| 1071 | default_strip_style = "non-global" |
| 1072 | elif self.spec["type"] == "executable": |
| 1073 | default_strip_style = "all" |
| 1074 | |
| 1075 | strip_style = self._Settings().get("STRIP_STYLE", default_strip_style) |
| 1076 | strip_flags = {"all": "", "non-global": "-x", "debugging": "-S"}[ |
| 1077 | strip_style |
| 1078 | ] |
| 1079 | |
| 1080 | explicit_strip_flags = self._Settings().get("STRIPFLAGS", "") |
| 1081 | if explicit_strip_flags: |
| 1082 | strip_flags += " " + _NormalizeEnvVarReferences(explicit_strip_flags) |
| 1083 | |
| 1084 | if not quiet: |
| 1085 | result.append("echo STRIP\\(%s\\)" % self.spec["target_name"]) |
| 1086 | result.append(f"strip {strip_flags} {output_binary}") |
| 1087 | |
| 1088 | self.configname = None |
| 1089 | return result |
| 1090 | |
| 1091 | def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet): |
| 1092 | """Returns a list of shell commands that contain the shell commands |
no test coverage detected