1 //===- Simple.td - A simple LLVMC-based driver ----------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // A simple LLVMC-based gcc wrapper. 11 // 12 // To compile, use this command: 13 // 14 // $ cd $LLVM_OBJ_DIR/tools/llvmc 15 // $ make BUILD_EXAMPLES=1 16 // 17 // Run as: 18 // 19 // $ $LLVM_OBJ_DIR/$(BuildMode)/bin/Simple 20 // 21 // For instructions on how to build your own LLVMC-based driver, see 22 // the 'examples/Skeleton' directory. 23 //===----------------------------------------------------------------------===// 24 25 include "llvm/CompilerDriver/Common.td" 26 27 def gcc : Tool< 28 [(in_language "c"), 29 (out_language "executable"), 30 (output_suffix "out"), 31 (command "gcc"), 32 (sink), 33 34 // -o is what is used by default, out_file_option here is included for 35 // instructive purposes. 36 (out_file_option "-o") 37 ]>; 38 39 def LanguageMap : LanguageMap<[(lang_to_suffixes "c", "c")]>; 40 41 def CompilationGraph : CompilationGraph<[(edge "root", "gcc")]>; 42