Skip to content

enable RPATH linking by default #4448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
from easybuild.tools.toolchain.compiler import DEFAULT_OPT_LEVEL, OPTARCH_MAP_CHAR, OPTARCH_SEP, Compiler
from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME
from easybuild.tools.repository.repository import avail_repositories
from easybuild.tools.systemtools import UNKNOWN, check_python_version, get_cpu_architecture, get_cpu_family
from easybuild.tools.systemtools import get_cpu_features, get_gpu_info, get_system_info
from easybuild.tools.systemtools import DARWIN, UNKNOWN, check_python_version, get_cpu_architecture, get_cpu_family
from easybuild.tools.systemtools import get_cpu_features, get_gpu_info, get_os_type, get_system_info
from easybuild.tools.version import this_is_easybuild


Expand All @@ -131,6 +131,8 @@ def terminal_supports_colors(stream):
DEFAULT_LIST_PR_ORDER = GITHUB_PR_ORDER_CREATED
DEFAULT_LIST_PR_DIREC = GITHUB_PR_DIRECTION_DESC

RPATH_DEFAULT = False if get_os_type() == DARWIN else True

_log = fancylogger.getLogger('options', fname=False)


Expand Down Expand Up @@ -489,7 +491,7 @@ def override_options(self):
'required-linked-shared-libs': ("Comma-separated list of shared libraries (names, file names, or paths) "
"which must be linked in all installed binaries/libraries",
'strlist', 'extend', None),
'rpath': ("Enable use of RPATH for linking with libraries", None, 'store_true', False),
'rpath': ("Enable use of RPATH for linking with libraries", None, 'store_true', RPATH_DEFAULT),
'rpath-filter': ("List of regex patterns to use for filtering out RPATH paths", 'strlist', 'store', None),
'rpath-override-dirs': ("Path(s) to be prepended when linking with RPATH (string, colon-separated)",
None, 'store', None),
Expand Down
1 change: 1 addition & 0 deletions test/framework/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4121,6 +4121,7 @@ def test_extended_dry_run(self):
'--buildpath=%s' % self.test_buildpath,
'--installpath=%s' % self.test_installpath,
'--debug',
'--disable-rpath',
]

msg_regexs = [
Expand Down
1 change: 1 addition & 0 deletions test/framework/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,7 @@ def test_compiler_cache(self):
"--force",
"--debug",
"--disable-cleanup-tmpdir",
"--disable-rpath",
]

ccache = which('ccache')
Expand Down