File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ require 'bundler/gem_tasks'
55begin
66 require 'rake/extensiontask'
77 Rake ::ExtensionTask . new ( 'openssl' )
8+ # Run the debug_compiler task before the compile task.
9+ Rake ::Task [ 'compile' ] . prerequisites . unshift :debug_compiler
810rescue LoadError
911 warn "rake-compiler not installed. Run 'bundle install' to " \
1012 "install testing dependency gems."
@@ -22,6 +24,19 @@ RDoc::Task.new do |rdoc|
2224end
2325
2426task :test => [ :compile , :debug ]
27+
28+ # Print Ruby and compiler info for debugging purpose.
29+ task :debug_compiler do
30+ ruby '-v'
31+ compiler = RbConfig ::CONFIG [ 'CC' ]
32+ case compiler
33+ when 'gcc' , 'clang'
34+ sh "#{ compiler } --version"
35+ else
36+ puts "Compiler: #{ RbConfig ::CONFIG [ 'CC' ] } "
37+ end
38+ end
39+
2540task :debug do
2641 ruby "-I./lib -ropenssl -ve'puts OpenSSL::OPENSSL_VERSION, OpenSSL::OPENSSL_LIBRARY_VERSION'"
2742end
You can’t perform that action at this time.
0 commit comments