blob: 7ceee93d7cd5d460c6eb4fc33b36110027494d96 [file] [log] [blame]
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +00001//===- Simple.td - A simple LLVMC-based driver ----------------------------===//
Mikhail Glushenkov03c050f2009-03-03 10:04:57 +00002//
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//
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +000010// A simple LLVMC-based gcc wrapper.
Mikhail Glushenkov03c050f2009-03-03 10:04:57 +000011//
Mikhail Glushenkovcc30d9c2008-10-16 14:02:29 +000012// To compile, use this command:
13//
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +000014// $ cd $LLVM_OBJ_DIR/tools/llvmc
15// $ make BUILD_EXAMPLES=1
Mikhail Glushenkovcc30d9c2008-10-16 14:02:29 +000016//
17// Run as:
18//
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +000019// $ $LLVM_OBJ_DIR/$(BuildMode)/bin/Simple
Mikhail Glushenkov03c050f2009-03-03 10:04:57 +000020//
21// For instructions on how to build your own LLVMC-based driver, see
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +000022// the 'examples/Skeleton' directory.
Mikhail Glushenkov03c050f2009-03-03 10:04:57 +000023//===----------------------------------------------------------------------===//
Mikhail Glushenkovcc30d9c2008-10-16 14:02:29 +000024
25include "llvm/CompilerDriver/Common.td"
26
27def gcc : Tool<
28[(in_language "c"),
29 (out_language "executable"),
30 (output_suffix "out"),
Mikhail Glushenkovb57326c2010-08-19 20:04:19 +000031 (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")
Mikhail Glushenkovcc30d9c2008-10-16 14:02:29 +000037]>;
38
39def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>;
40
Mikhail Glushenkov01088772008-11-17 17:29:18 +000041def CompilationGraph : CompilationGraph<[Edge<"root", "gcc">]>;