Skip to content

Commit 360b053

Browse files
authored
Merge pull request #4448 from branfosj/enable_rpath
enable RPATH linking by default
2 parents ceb2916 + 612b1c0 commit 360b053

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

easybuild/tools/options.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@
103103
from easybuild.tools.toolchain.compiler import DEFAULT_OPT_LEVEL, OPTARCH_MAP_CHAR, OPTARCH_SEP, Compiler
104104
from easybuild.tools.toolchain.toolchain import SYSTEM_TOOLCHAIN_NAME
105105
from easybuild.tools.repository.repository import avail_repositories
106-
from easybuild.tools.systemtools import UNKNOWN, check_python_version, get_cpu_architecture, get_cpu_family
107-
from easybuild.tools.systemtools import get_cpu_features, get_gpu_info, get_system_info
106+
from easybuild.tools.systemtools import DARWIN, UNKNOWN, check_python_version, get_cpu_architecture, get_cpu_family
107+
from easybuild.tools.systemtools import get_cpu_features, get_gpu_info, get_os_type, get_system_info
108108
from easybuild.tools.version import this_is_easybuild
109109

110110

@@ -131,6 +131,8 @@ def terminal_supports_colors(stream):
131131
DEFAULT_LIST_PR_ORDER = GITHUB_PR_ORDER_CREATED
132132
DEFAULT_LIST_PR_DIREC = GITHUB_PR_DIRECTION_DESC
133133

134+
RPATH_DEFAULT = False if get_os_type() == DARWIN else True
135+
134136
_log = fancylogger.getLogger('options', fname=False)
135137

136138

@@ -489,7 +491,7 @@ def override_options(self):
489491
'required-linked-shared-libs': ("Comma-separated list of shared libraries (names, file names, or paths) "
490492
"which must be linked in all installed binaries/libraries",
491493
'strlist', 'extend', None),
492-
'rpath': ("Enable use of RPATH for linking with libraries", None, 'store_true', False),
494+
'rpath': ("Enable use of RPATH for linking with libraries", None, 'store_true', RPATH_DEFAULT),
493495
'rpath-filter': ("List of regex patterns to use for filtering out RPATH paths", 'strlist', 'store', None),
494496
'rpath-override-dirs': ("Path(s) to be prepended when linking with RPATH (string, colon-separated)",
495497
None, 'store', None),

test/framework/options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,6 +4121,7 @@ def test_extended_dry_run(self):
41214121
'--buildpath=%s' % self.test_buildpath,
41224122
'--installpath=%s' % self.test_installpath,
41234123
'--debug',
4124+
'--disable-rpath',
41244125
]
41254126

41264127
msg_regexs = [

test/framework/toolchain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,6 +2269,7 @@ def test_compiler_cache(self):
22692269
"--force",
22702270
"--debug",
22712271
"--disable-cleanup-tmpdir",
2272+
"--disable-rpath",
22722273
]
22732274

22742275
ccache = which('ccache')

0 commit comments

Comments
 (0)