aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/__init__.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-08 00:50:39 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-18 06:33:23 +0000
commit96b7fdb723e5a8d2d7143c7c7a6abc433e0b3da0 (patch)
tree04bcc0057f228675f1c0c183a0927754bab40c23 /mesonbuild/compilers/__init__.py
parent69f817b0e36f8fba7d2bd81cf569d9ad09bb7a2b (diff)
downloadmeson-96b7fdb723e5a8d2d7143c7c7a6abc433e0b3da0.zip
meson-96b7fdb723e5a8d2d7143c7c7a6abc433e0b3da0.tar.gz
meson-96b7fdb723e5a8d2d7143c7c7a6abc433e0b3da0.tar.bz2
macos: Rewrite install_name for dependent built libraries on install
On macOS, we set the install_name for built libraries to @rpath/libfoo.dylib, and when linking to the library, we set the RPATH to its path in the build directory. This allows all built binaries to be run as-is from the build directory (uninstalled). However, on install, we have to strip all the RPATHs because they point to the build directory, and we change the install_name of all built libraries to the absolute path to the library. This causes the install name in binaries to be out of date. We now change that install name to point to the absolute path to each built library after installation. Fixes https://github.com/mesonbuild/meson/issues/3038 Fixes https://github.com/mesonbuild/meson/issues/3077 With this, the default workflow on macOS matches what everyone seems to do, including Autotools and CMake. The next step is providing a way for build files to override the install_name that is used after installation for use with, f.ex., private libraries when combined with the install_rpath: kwarg on targets.
Diffstat (limited to 'mesonbuild/compilers/__init__.py')
-rw-r--r--mesonbuild/compilers/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py
index 849e229..122f969 100644
--- a/mesonbuild/compilers/__init__.py
+++ b/mesonbuild/compilers/__init__.py
@@ -30,6 +30,7 @@ __all__ = [
'clike_langs',
'c_suffixes',
'cpp_suffixes',
+ 'get_macos_dylib_install_name',
'get_base_compile_args',
'get_base_link_args',
'is_assembly',
@@ -105,6 +106,7 @@ from .compilers import (
clike_langs,
c_suffixes,
cpp_suffixes,
+ get_macos_dylib_install_name,
get_base_compile_args,
get_base_link_args,
is_header,