aboutsummaryrefslogtreecommitdiffstats
path: root/tool/runruby.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-26 08:01:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-26 08:01:54 +0000
commit68c062b1f06f384df91a198e69495f185b12e334 (patch)
tree461c3a8b7ca3f2e38f52b67248c1ff922687a3b5 /tool/runruby.rb
parentfefdad109addb40e67bc9ad87c9c26c369b7691b (diff)
downloadruby-68c062b1f06f384df91a198e69495f185b12e334.tar.gz
configure.in: PRELOADENV
* configure.in (PRELOADENV): platform specific environment to pre-load the given shared libraries. * tool/runruby.rb: use config['PRELOADENV'] instead of hardcoded LD_PRELOAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/runruby.rb')
-rwxr-xr-xtool/runruby.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/tool/runruby.rb b/tool/runruby.rb
index ea1cb87aa6..7def5063b2 100755
--- a/tool/runruby.rb
+++ b/tool/runruby.rb
@@ -79,8 +79,12 @@ if File.file?(libruby_so)
if e = config['LIBPATHENV'] and !e.empty?
env[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR)
end
- if /linux/ =~ RUBY_PLATFORM
- env["LD_PRELOAD"] = [libruby_so, ENV["LD_PRELOAD"]].compact.join(' ')
+ if e = config['PRELOADENV']
+ e = nil if e.empty?
+ e ||= "LD_PRELOAD" if /linux/ =~ RUBY_PLATFORM
+ end
+ if e
+ env[e] = [libruby_so, ENV[e]].compact.join(' ')
end
end