Returns the name of the non-bundle binary represented by this target. E.g. hello_world. Only valid for non-bundles.
(self)
| 468 | ) |
| 469 | |
| 470 | def _GetStandaloneBinaryPath(self): |
| 471 | """Returns the name of the non-bundle binary represented by this target. |
| 472 | E.g. hello_world. Only valid for non-bundles.""" |
| 473 | assert not self._IsBundle() |
| 474 | assert self.spec["type"] in { |
| 475 | "executable", |
| 476 | "shared_library", |
| 477 | "static_library", |
| 478 | "loadable_module", |
| 479 | }, "Unexpected type %s" % self.spec["type"] |
| 480 | target = self.spec["target_name"] |
| 481 | if self.spec["type"] in {"loadable_module", "shared_library", "static_library"}: |
| 482 | if target[:3] == "lib": |
| 483 | target = target[3:] |
| 484 | |
| 485 | target_prefix = self._GetStandaloneExecutablePrefix() |
| 486 | target = self.spec.get("product_name", target) |
| 487 | target_ext = self._GetStandaloneExecutableSuffix() |
| 488 | return target_prefix + target + target_ext |
| 489 | |
| 490 | def GetExecutableName(self): |
| 491 | """Returns the executable name of the bundle represented by this target. |
no test coverage detected