SConstruct (13577:70ab75eec40b) | SConstruct (13706:4c1d26d1766e) |
---|---|
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 --- 1058 unchanged lines hidden (view full) --- 1067 src_suffix='$SHOBJSUFFIX', 1068 src_builder='SharedObject', 1069 SHLINKFLAGS='$PSHLINKFLAGS', 1070 LIBS='') 1071 1072main.Append(BUILDERS = { 'PartialShared' : partial_shared_builder, 1073 'PartialStatic' : partial_static_builder }) 1074 | 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 --- 1058 unchanged lines hidden (view full) --- 1067 src_suffix='$SHOBJSUFFIX', 1068 src_builder='SharedObject', 1069 SHLINKFLAGS='$PSHLINKFLAGS', 1070 LIBS='') 1071 1072main.Append(BUILDERS = { 'PartialShared' : partial_shared_builder, 1073 'PartialStatic' : partial_static_builder }) 1074 |
1075def add_local_rpath(env, *targets): 1076 '''Set up an RPATH for a library which lives in the build directory. 1077 1078 The construction environment variable BIN_RPATH_PREFIX should be set to 1079 the relative path of the build directory starting from the location of the 1080 binary.''' 1081 for target in targets: 1082 target = env.Entry(target) 1083 if not target.isdir(): 1084 target = target.dir 1085 relpath = os.path.relpath(target.abspath, env['BUILDDIR']) 1086 components = [ 1087 '\\$$ORIGIN', 1088 '${BIN_RPATH_PREFIX}', 1089 relpath 1090 ] 1091 env.Append(RPATH=[env.Literal(os.path.join(*components))]) 1092 1093main.Append(LINKFLAGS=Split('-z origin')) 1094main.AddMethod(add_local_rpath, 'AddLocalRPATH') 1095 |
|
1075# builds in ext are shared across all configs in the build root. 1076ext_dir = abspath(joinpath(str(main.root), 'ext')) 1077ext_build_dirs = [] 1078for root, dirs, files in os.walk(ext_dir): 1079 if 'SConscript' in files: 1080 build_dir = os.path.relpath(root, ext_dir) 1081 ext_build_dirs.append(build_dir) 1082 main.SConscript(joinpath(root, 'SConscript'), --- 179 unchanged lines hidden --- | 1096# builds in ext are shared across all configs in the build root. 1097ext_dir = abspath(joinpath(str(main.root), 'ext')) 1098ext_build_dirs = [] 1099for root, dirs, files in os.walk(ext_dir): 1100 if 'SConscript' in files: 1101 build_dir = os.path.relpath(root, ext_dir) 1102 ext_build_dirs.append(build_dir) 1103 main.SConscript(joinpath(root, 'SConscript'), --- 179 unchanged lines hidden --- |