Sha256: ef27e04fd01a6d9596b5a5535e6813c13896a2f2afe307bbdb45db8cbb3acdc6

Contents?: true

Size: 1.45 KB

Versions: 12

Compression:

Stored size: 1.45 KB

Contents

require 'cxxproject/utils/utils'
require 'cxxproject/toolchain/provider'
require 'cxxproject/errorparser/error_parser'
require 'cxxproject/errorparser/gcc_compiler_error_parser'

module Cxxproject
  module Toolchain
    gccCompilerErrorParser = GCCCompilerErrorParser.new

    CLANG_CHAIN = Provider.add("CLANG")

    CLANG_CHAIN[:COMPILER][:CPP].update({
      :COMMAND => "llvm-g++",
      :DEFINE_FLAG => "-D",
      :OBJECT_FILE_FLAG => "-o",
      :INCLUDE_PATH_FLAG => "-I",
      :COMPILE_FLAGS => "-c ",
      :DEP_FLAGS => "-MMD -MF ", # empty space at the end is important!
      :ERROR_PARSER => gccCompilerErrorParser
    })

    CLANG_CHAIN[:COMPILER][:C] = Utils.deep_copy(CLANG_CHAIN[:COMPILER][:CPP])
    CLANG_CHAIN[:COMPILER][:C][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:C][:SOURCE_FILE_ENDINGS]
    CLANG_CHAIN[:COMPILER][:C][:COMMAND] = "llvm-gcc"

    CLANG_CHAIN[:COMPILER][:ASM] = Utils.deep_copy(CLANG_CHAIN[:COMPILER][:C])
    CLANG_CHAIN[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS]

    CLANG_CHAIN[:ARCHIVER][:COMMAND] = "ar"
    CLANG_CHAIN[:ARCHIVER][:ARCHIVE_FLAGS] = "r"

    CLANG_CHAIN[:LINKER][:COMMAND] = "llvm-g++"
    CLANG_CHAIN[:LINKER][:SCRIPT] = "-T"
    CLANG_CHAIN[:LINKER][:USER_LIB_FLAG] = "-l:"
    CLANG_CHAIN[:LINKER][:EXE_FLAG] = "-o"
    CLANG_CHAIN[:LINKER][:LIB_FLAG] = "-l"
    CLANG_CHAIN[:LINKER][:LIB_PATH_FLAG] = "-L"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cxxproject-0.5.70 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.69 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.68 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.67 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.66 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.65 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.64 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.63 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.62 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.61 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.60 lib/cxxproject/toolchain/clang.rb
cxxproject-0.5.59 lib/cxxproject/toolchain/clang.rb