def LinkBC(inputs, output): '''Input: a bunch of bc/o/lib input files Output: a combined & optimized bitcode file ''' # Produce combined bitcode file RunWithEnv('${RUN_BCLD}', inputs=inputs, output=output)
def RunCC(infile, output, mode): intype = filetype.FileType(infile) typespec = filetype.FileTypeToGCCType(intype) include_cxx_headers = (env.get('LANGUAGE') == 'CXX') or (intype == 'c++') env.setbool('INCLUDE_CXX_HEADERS', include_cxx_headers) if IsStdinInput(infile): infile = '-' RunWithEnv("${RUN_CC}", infile=infile, output=output, mode=mode, typespec=typespec)
def RunCC(infile, output, mode, emit_llvm_flag='-emit-llvm'): intype = filetype.FileType(infile) typespec = filetype.FileTypeToGCCType(intype) include_cxx_headers = ((env.get('LANGUAGE') == 'CXX') or (intype in ('c++', 'c++-header'))) env.setbool('INCLUDE_CXX_HEADERS', include_cxx_headers) if IsStdinInput(infile): infile = '-' RunWithEnv("${RUN_CC}", infile=infile, output=output, emit_llvm_flag=emit_llvm_flag, mode=mode, typespec=typespec)