diff --git mesonbuild/build.py mesonbuild/build.py index a06979c..8b8d6ca 100644 --- mesonbuild/build.py +++ mesonbuild/build.py @@ -103,7 +103,7 @@ known_jar_kwargs = known_exe_kwargs | {'main_class'} @lru_cache(maxsize=None) def get_target_macos_dylib_install_name(ld) -> str: - name = ['@rpath/', ld.prefix, ld.name] + name = ['@loader_path/', ld.prefix, ld.name] if ld.soversion is not None: name.append('.' + ld.soversion) name.append('.dylib') --- mesonbuild/linkers/linkers.py +++ mesonbuild/llnkers/linkers.py @@ -678,7 +678,7 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str, suffix: str, soversion: str, darwin_versions: T.Tuple[str, str]) -> T.List[str]: - install_name = ['@rpath/', prefix, shlib_name] + install_name = ['@loader_path/', prefix, shlib_name] if soversion is not None: install_name.append('.' + soversion) install_name.append('.dylib') @@ -701,8 +701,8 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): all_paths = mesonlib.OrderedSet([os.path.join(origin_placeholder, p) for p in processed_rpaths]) if build_rpath != '': all_paths.add(build_rpath) - for rp in all_paths: - args.extend(self._apply_prefix('-rpath,' + rp)) + #KEN for rp in all_paths: + #KEN args.extend(self._apply_prefix('-rpath,' + rp)) return (args, set()) diff --git mesonbuild/modules/gnome.py mesonbuild/modules/gnome.py index 1faa128..4ef1b07 100644 --- mesonbuild/modules/gnome.py +++ mesonbuild/modules/gnome.py @@ -277,8 +277,8 @@ class GnomeModule(ExtensionModule): if isinstance(lib, build.SharedLibrary): libdir = os.path.join(state.environment.get_build_dir(), state.backend.get_target_dir(lib)) link_command.append('-L' + libdir) - if include_rpath: - link_command.append('-Wl,-rpath,' + libdir) + #KEN if include_rpath: + #KEN link_command.append('-Wl,-rpath,' + libdir) new_depends.append(lib) # Needed for the following binutils bug: # https://github.com/mesonbuild/meson/issues/1911 @@ -287,8 +287,8 @@ class GnomeModule(ExtensionModule): for d in state.backend.determine_rpath_dirs(lib): d = os.path.join(state.environment.get_build_dir(), d) link_command.append('-L' + d) - if include_rpath: - link_command.append('-Wl,-rpath,' + d) + #KEN if include_rpath: + #KEN link_command.append('-Wl,-rpath,' + d) if use_gir_args and self._gir_has_option('--extra-library'): link_command.append('--extra-library=' + lib.name) else: @@ -345,8 +345,8 @@ class GnomeModule(ExtensionModule): getattr(dep, 'is_libtool', False)): lib_dir = os.path.dirname(flag) external_ldflags.update([f'-L{lib_dir}']) - if include_rpath: - external_ldflags.update([f'-Wl,-rpath {lib_dir}']) + #KEN if include_rpath: + #KEN external_ldflags.update([f'-Wl,-rpath {lib_dir}']) libname = os.path.basename(flag) if libname.startswith("lib"): libname = libname[3:] diff --git mesonbuild/scripts/depfixer.py mesonbuild/scripts/depfixer.py index f927693..c1e4541 100644 --- mesonbuild/scripts/depfixer.py +++ mesonbuild/scripts/depfixer.py @@ -424,9 +424,9 @@ def fix_darwin(fname, new_rpath, final_path, install_name_mappings): stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) args = [] - if new_rpath: - args += ['-add_rpath', new_rpath] - # Rewrite -install_name @rpath/libfoo.dylib to /path/to/libfoo.dylib + #KEN if new_rpath: + #KEN args += ['-add_rpath', new_rpath] + # Rewrite -install_name @loader_path/libfoo.dylib to /path/to/libfoo.dylib if fname.endswith('dylib'): args += ['-id', final_path] if install_name_mappings: