ruby-changes:57812
From: Nobuyoshi <ko1@a...>
Date: Thu, 19 Sep 2019 19:12:50 +0900 (JST)
Subject: [ruby-changes:57812] 6180f1fede (master): Added link_command for C++
https://git.ruby-lang.org/ruby.git/commit/?id=6180f1fede From 6180f1fede487bf5dfdd00cbae2ee7f2b4613a7e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 19 Sep 2019 19:06:18 +0900 Subject: Added link_command for C++ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index e671ac9..eabccd4 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2792,6 +2792,11 @@ realclean: distclean https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2792 CONFTEST_CXX = "#{CONFTEST}.#{config_string('CXX_EXT') || CXX_EXT[0]}" + TRY_LINK_CXX = config_string('TRY_LINK_CXX') || + ((cmd = TRY_LINK.gsub(/\$\(C(?:C|(FLAGS))\)/, '$(CXX\1)')) != TRY_LINK && cmd) || + "$(CXX) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \ + "$(CXXFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)" + def have_devel? unless defined? @have_devel @have_devel = true @@ -2809,6 +2814,11 @@ realclean: distclean https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2814 RbConfig::expand("$(CXX) #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_CXX}", conf) end + + def link_command(ldflags, *opts) + conf = link_config(ldflags, *opts) + RbConfig::expand(TRY_LINK_CXX.dup, conf) + end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/