SConstruct (13715:4ba223628b62) SConstruct (13758:f4b8f1be28fc)
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015-2017 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 83 unchanged lines hidden (view full) ---

92from os.path import abspath, basename, dirname, expanduser, normpath
93from os.path import exists, isdir, isfile
94from os.path import join as joinpath, split as splitpath
95from re import match
96
97# SCons includes
98import SCons
99import SCons.Node
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015-2017 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 83 unchanged lines hidden (view full) ---

92from os.path import abspath, basename, dirname, expanduser, normpath
93from os.path import exists, isdir, isfile
94from os.path import join as joinpath, split as splitpath
95from re import match
96
97# SCons includes
98import SCons
99import SCons.Node
100import SCons.Node.FS
100
101from m5.util import compareVersions, readCommand
102
103help_texts = {
104 "options" : "",
105 "global_vars" : "",
106 "local_vars" : ""
107}

--- 983 unchanged lines hidden (view full) ---

1091def add_local_rpath(env, *targets):
1092 '''Set up an RPATH for a library which lives in the build directory.
1093
1094 The construction environment variable BIN_RPATH_PREFIX should be set to
1095 the relative path of the build directory starting from the location of the
1096 binary.'''
1097 for target in targets:
1098 target = env.Entry(target)
101
102from m5.util import compareVersions, readCommand
103
104help_texts = {
105 "options" : "",
106 "global_vars" : "",
107 "local_vars" : ""
108}

--- 983 unchanged lines hidden (view full) ---

1092def add_local_rpath(env, *targets):
1093 '''Set up an RPATH for a library which lives in the build directory.
1094
1095 The construction environment variable BIN_RPATH_PREFIX should be set to
1096 the relative path of the build directory starting from the location of the
1097 binary.'''
1098 for target in targets:
1099 target = env.Entry(target)
1099 if not target.isdir():
1100 if not isinstance(target, SCons.Node.FS.Dir):
1100 target = target.dir
1101 relpath = os.path.relpath(target.abspath, env['BUILDDIR'])
1102 components = [
1103 '\\$$ORIGIN',
1104 '${BIN_RPATH_PREFIX}',
1105 relpath
1106 ]
1107 env.Append(RPATH=[env.Literal(os.path.join(*components))])

--- 193 unchanged lines hidden ---
1101 target = target.dir
1102 relpath = os.path.relpath(target.abspath, env['BUILDDIR'])
1103 components = [
1104 '\\$$ORIGIN',
1105 '${BIN_RPATH_PREFIX}',
1106 relpath
1107 ]
1108 env.Append(RPATH=[env.Literal(os.path.join(*components))])

--- 193 unchanged lines hidden ---