Sha256: 99f6dc48d803bebf68cad5798f8943f1d137d78455b73719842c1fd2e78f459b

Contents?: true

Size: 839 Bytes

Versions: 3

Compression:

Stored size: 839 Bytes

Contents

#!/usr/bin/env ruby

require 'logger'

LOG = Logger.new(STDOUT)
LOG.level = Logger::WARN
LOG.debug("original #{ARGV.join(' ')}")

require 'gcc_to_clang_analyzer/prepare_compiler_commandline'
require 'gcc_to_clang_analyzer/rewrite_plist_file'

command_line, output = PrepareCompilerCommandline.transform(ARGV)

cl = command_line.join(' ')
LOG.info("executing '#{cl}'")
            
res = system(cl)
unless res
  LOG.warn("problems while executing #{cl}")
  exit 1
end

if output.length > 0
  workspace_path = File.absolute_path('..')
  prefix = File.absolute_path('.').gsub(workspace_path+'/', '')
  tmp_output = output + ".tmp"
  File.open(tmp_output, 'w') do |io|
    output_data = File.read(output)
    io << RewritePlistFile.with_prefix(prefix, output_data, LOG)
  end
  File.delete(output)
  File.rename(tmp_output, output)
end
exit 0

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gcc-to-clang-analyzer-0.0.13 bin/g++
gcc-to-clang-analyzer-0.0.12 bin/g++
gcc-to-clang-analyzer-0.0.11 bin/g++