Return LD_DYLIB_INSTALL_NAME for this target.
(self)
| 812 | return path |
| 813 | |
| 814 | def GetInstallName(self): |
| 815 | """Return LD_DYLIB_INSTALL_NAME for this target.""" |
| 816 | # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. |
| 817 | if self.spec["type"] != "shared_library" and ( |
| 818 | self.spec["type"] != "loadable_module" or self._IsBundle() |
| 819 | ): |
| 820 | return None |
| 821 | |
| 822 | default_install_name = ( |
| 823 | "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)" |
| 824 | ) |
| 825 | install_name = self.GetPerTargetSetting( |
| 826 | "LD_DYLIB_INSTALL_NAME", default=default_install_name |
| 827 | ) |
| 828 | |
| 829 | # Hardcode support for the variables used in chromium for now, to |
| 830 | # unblock people using the make build. |
| 831 | if "$" in install_name: |
| 832 | assert install_name in ( |
| 833 | "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/" |
| 834 | "$(WRAPPER_NAME)/$(PRODUCT_NAME)", |
| 835 | default_install_name, |
| 836 | ), ( |
| 837 | "Variables in LD_DYLIB_INSTALL_NAME are not generally supported " |
| 838 | "yet in target '%s' (got '%s')" |
| 839 | % (self.spec["target_name"], install_name) |
| 840 | ) |
| 841 | |
| 842 | install_name = install_name.replace( |
| 843 | "$(DYLIB_INSTALL_NAME_BASE:standardizepath)", |
| 844 | self._StandardizePath(self.GetInstallNameBase()), |
| 845 | ) |
| 846 | if self._IsBundle(): |
| 847 | # These are only valid for bundles, hence the |if|. |
| 848 | install_name = install_name.replace( |
| 849 | "$(WRAPPER_NAME)", self.GetWrapperName() |
| 850 | ) |
| 851 | install_name = install_name.replace( |
| 852 | "$(PRODUCT_NAME)", self.GetProductName() |
| 853 | ) |
| 854 | else: |
| 855 | assert "$(WRAPPER_NAME)" not in install_name |
| 856 | assert "$(PRODUCT_NAME)" not in install_name |
| 857 | |
| 858 | install_name = install_name.replace( |
| 859 | "$(EXECUTABLE_PATH)", self.GetExecutablePath() |
| 860 | ) |
| 861 | return install_name |
| 862 | |
| 863 | def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path): |
| 864 | """Checks if ldflag contains a filename and if so remaps it from |
no test coverage detected