diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-08 10:38:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-08 10:38:55 +0000 |
commit | b6ed3dce38e6fa54ee328d0df00410f9310ed1b5 (patch) | |
tree | 2c4bc04ddb75c38d28141c93cb99772c798c2b84 | |
parent | 9a99663fa97d49d30b192a2632f0c9ddfb6509bc (diff) | |
download | ruby-b6ed3dce38e6fa54ee328d0df00410f9310ed1b5.tar.gz |
* lib/mkmf.rb (try_link0): removes waste dSYM directories left
when debug and universal-binary are enabled.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/mkmf.rb | 15 |
2 files changed, 18 insertions, 2 deletions
@@ -1,4 +1,7 @@ -Fri May 8 19:17:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> +Fri May 8 19:38:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (try_link0): removes waste dSYM directories lef + when debug and universal-binary are enabled. * lib/mkmf.rb (check_sizeof): fixed wrong recuring result for intrinsic types. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 45346bfdbc..73866e229f 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -413,7 +413,20 @@ def libpathflag(libpath=$DEFLIBPATH|$LIBPATH) end def try_link0(src, opt="", &b) - try_do(src, link_command("", opt), &b) + cmd = link_command("", opt) + if $universal + require 'tmpdir' + Dir.mktmpdir("mkmf_", oldtmpdir = ENV["TMPDIR"]) do |tmpdir| + begin + ENV["TMPDIR"] = tmpdir + try_do(src, cmd, &b) + ensure + ENV["TMPDIR"] = oldtmpdir + end + end + else + try_do(src, cmd, &b) + end end def try_link(src, opt="", &b) |