MCPcopy Index your code
hub / github.com/nodejs/node / GetInstallName

Method GetInstallName

tools/gyp/pylib/gyp/xcode_emulation.py:814–861  ·  view source on GitHub ↗

Return LD_DYLIB_INSTALL_NAME for this target.

(self)

Source from the content-addressed store, hash-verified

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

Callers 2

GetLdflagsMethod · 0.95
_GetXcodeEnvFunction · 0.80

Calls 7

_IsBundleMethod · 0.95
GetPerTargetSettingMethod · 0.95
_StandardizePathMethod · 0.95
GetInstallNameBaseMethod · 0.95
GetWrapperNameMethod · 0.95
GetProductNameMethod · 0.95
GetExecutablePathMethod · 0.95

Tested by

no test coverage detected