diff options
author | Jun Aruga <junaruga@users.noreply.github.com> | 2023-06-01 11:41:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 11:41:12 +0200 |
commit | 01f06fd26f6a5bdf31e0431909ec51eef43ac3f7 (patch) | |
tree | 1d3b9e747a5ba396c6d1a938dc670f4eae31dea6 | |
parent | bd7b593bffc3d68b8a179fa64f48c680b94f2f85 (diff) | |
parent | 8aee87305d6ef7b353e682e5dff9180b047948bf (diff) | |
download | ruby-openssl-01f06fd26f6a5bdf31e0431909ec51eef43ac3f7.tar.gz |
Merge pull request #630 from junaruga/wip/print-compiler-version
Print the Ruby and compiler info or the command itself before compiling.
-rw-r--r-- | Rakefile | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -5,6 +5,8 @@ require 'bundler/gem_tasks' begin require 'rake/extensiontask' Rake::ExtensionTask.new('openssl') + # Run the debug_compiler task before the compile task. + Rake::Task['compile'].prerequisites.unshift :debug_compiler rescue LoadError warn "rake-compiler not installed. Run 'bundle install' to " \ "install testing dependency gems." @@ -22,6 +24,19 @@ RDoc::Task.new do |rdoc| end task :test => [:compile, :debug] + +# Print Ruby and compiler info for debugging purpose. +task :debug_compiler do + ruby '-v' + compiler = RbConfig::CONFIG['CC'] + case compiler + when 'gcc', 'clang' + sh "#{compiler} --version" + else + puts "Compiler: #{RbConfig::CONFIG['CC']}" + end +end + task :debug do ruby "-I./lib -ropenssl -ve'puts OpenSSL::OPENSSL_VERSION, OpenSSL::OPENSSL_LIBRARY_VERSION'" end |