File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3030,14 +3030,16 @@ def conftest_source
30303030
30313031 def cc_command ( opt = "" )
30323032 conf = cc_config ( opt )
3033+ cxx_command ( opt , conf )
30333034 RbConfig ::expand ( "$(CXX) #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #$ARCH_FLAG #{ opt } -c #{ CONFTEST_CXX } " ,
30343035 conf )
30353036 end
30363037
30373038 def cpp_command ( outfile , opt = "" )
30383039 conf = cpp_config ( opt )
3040+ cxx = cxx_command ( opt , conf )
30393041 cpp = conf [ 'CPP' ] . sub ( /(\A |\s )#{ Regexp . quote ( conf [ 'CC' ] ) } (?=\z |\s )/ ) {
3040- "#$1#{ conf [ 'CXX' ] } "
3042+ "#$1#{ cxx } "
30413043 }
30423044 RbConfig ::expand ( "#{ cpp } #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #{ opt } #{ CONFTEST_CXX } #{ outfile } " ,
30433045 conf )
@@ -3048,6 +3050,12 @@ def link_command(ldflags, *opts)
30483050 RbConfig ::expand ( TRY_LINK_CXX . dup , conf )
30493051 end
30503052
3053+ def cxx_command ( opt = "" , conf = cc_config ( opt ) )
3054+ cxx = conf [ 'CXX' ]
3055+ raise Errno ::ENOENT , "C++ compiler not found" if !cxx or cxx == 'false'
3056+ cxx
3057+ end
3058+
30513059 # :startdoc:
30523060 end
30533061
You can’t perform that action at this time.
0 commit comments