<commit_before>def llvm_configure
  case Rubinius::BUILD_CONFIG[:llvm]
  when :svn, :prebuilt
    "vm/external_libs/llvm/Release/bin/llvm-config"
  when :config
    Rubinius::BUILD_CONFIG[:llvm_configure]
  else
    raise "Tried to use LLVM unconfigure!"
  end
end

def llvm_flags
  return [] unless LLVM_ENABLE

  return @llvm_flags if defined?(@llvm_flags)

  case Rubinius::BUILD_CONFIG[:llvm]
  when :svn, :prebuilt
    @llvm_flags = ["-Ivm/external_libs/llvm/include"]
  else
    @llvm_flags = []
  end

  @llvm_flags += `#{llvm_configure} --cflags`.split(/\s+/)
  @llvm_flags.delete_if { |e| e.index("-O") == 0 }
  @llvm_flags
end

def llvm_link_flags
  return "" unless LLVM_ENABLE

  `#{llvm_configure} --ldflags`.strip
end

def llvm_lib_files
  return [] unless LLVM_ENABLE

  files = `#{llvm_configure} --libfiles all`.split(/\s+/)
  files.select { |f| File.file? f }
end

def host_triple
  Rubinius::BUILD_CONFIG[:arch]
end

def llvm_config_flags
  "--build=#{host_triple} --host=#{host_triple} " \<commit_msg>Force llvm-config to be run through the system perl<commit_after>def llvm_configure
  case Rubinius::BUILD_CONFIG[:llvm]
  when :svn, :prebuilt
    "vm/external_libs/llvm/Release/bin/llvm-config"
  when :config
    Rubinius::BUILD_CONFIG[:llvm_configure]
  else
    raise "Tried to use LLVM unconfigure!"
  end
end

def llvm_flags
  return [] unless LLVM_ENABLE

  return @llvm_flags if defined?(@llvm_flags)

  case Rubinius::BUILD_CONFIG[:llvm]
  when :svn, :prebuilt
    @llvm_flags = ["-Ivm/external_libs/llvm/include"]
  else
    @llvm_flags = []
  end

  @llvm_flags += `perl #{llvm_configure} --cflags`.split(/\s+/)
  @llvm_flags.delete_if { |e| e.index("-O") == 0 }
  @llvm_flags
end

def llvm_link_flags
  return "" unless LLVM_ENABLE

  `perl #{llvm_configure} --ldflags`.strip
end

def llvm_lib_files
  return [] unless LLVM_ENABLE

  files = `perl #{llvm_configure} --libfiles all`.split(/\s+/)
  files.select { |f| File.file? f }
end

def host_triple
  Rubinius::BUILD_CONFIG[:arch]
end

def llvm_config_flags
  "--build=#{host_triple} --host=#{host_triple} " \
{'fraction_non_alphanumeric': 0.1369928400954654, 'fraction_numerical': 0.0009546539379474941, 'mean_word_length': 4.099756690997567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '606995', 'n_tokens_mistral': 780, 'n_tokens_neox': 775, 'n_words': 167}