Sha256: 3c06313ca02534ff1178184e9d9c29780ea89c42d8d99318f6b28bd328adafe4
Contents?: true
Size: 1015 Bytes
Versions: 6
Compression:
Stored size: 1015 Bytes
Contents
from SCons.Scanner.Prog import scan from SCons.Builder import Builder import os def exists(env): return True def add_libraries(target, source, env): unique = [] lib_nodes = set() for x in scan(None, env, tuple(map(env.Dir, env['LIBPATH']))): if x in lib_nodes: continue lib_nodes.add(x) unique.append(x) return (target, source + unique) def generate(env): env.SetDefault( CLANG='clang', CLANGXX='clang++', LLVM_DIS='llvm-dis', LLVM_OPT='opt', LLVM_LINK='llvm-link') env['BUILDERS']['LLVMDis'] = Builder( action=os.path.join('${LLVM_ROOT}', '$LLVM_DIS') + ' -o $TARGET $SOURCE') env['BUILDERS']['LLVMOpt'] = Builder( action=os.path.join('${LLVM_ROOT}', '$LLVM_OPT') + ' $LLVM_OPT_FLAGS $LLVM_OPT_PASSES -o $TARGET $SOURCE') env['BUILDERS']['LLVMLink'] = Builder( action=os.path.join('${LLVM_ROOT}', '$LLVM_LINK') + ' -o $TARGET $SOURCES', emitter=add_libraries)
Version data entries
6 entries across 6 versions & 1 rubygems