2010-08-19 20:04:19 +00:00
|
|
|
//===- Simple.td - A simple LLVMC-based driver ----------------------------===//
|
2009-03-03 10:04:57 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2010-08-19 20:04:19 +00:00
|
|
|
// A simple LLVMC-based gcc wrapper.
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
2009-03-03 10:04:57 +00:00
|
|
|
// To compile, use this command:
|
|
|
|
//
|
2010-08-19 20:04:19 +00:00
|
|
|
// $ cd $LLVM_OBJ_DIR/tools/llvmc
|
|
|
|
// $ make BUILD_EXAMPLES=1
|
2008-10-16 14:02:29 +00:00
|
|
|
//
|
|
|
|
// Run as:
|
|
|
|
//
|
2010-08-19 20:04:19 +00:00
|
|
|
// $ $LLVM_OBJ_DIR/$(BuildMode)/bin/Simple
|
2009-03-03 10:04:57 +00:00
|
|
|
//
|
|
|
|
// For instructions on how to build your own LLVMC-based driver, see
|
2010-08-19 20:04:19 +00:00
|
|
|
// the 'examples/Skeleton' directory.
|
2009-03-03 10:04:57 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2008-10-16 14:02:29 +00:00
|
|
|
|
|
|
|
include "llvm/CompilerDriver/Common.td"
|
|
|
|
|
|
|
|
def gcc : Tool<
|
|
|
|
[(in_language "c"),
|
|
|
|
(out_language "executable"),
|
|
|
|
(output_suffix "out"),
|
2010-08-19 20:04:19 +00:00
|
|
|
(command "gcc"),
|
|
|
|
(sink),
|
|
|
|
|
|
|
|
// -o is what is used by default, out_file_option here is included for
|
|
|
|
// instructive purposes.
|
|
|
|
(out_file_option "-o")
|
2008-10-16 14:02:29 +00:00
|
|
|
]>;
|
|
|
|
|
2010-08-23 23:21:23 +00:00
|
|
|
def LanguageMap : LanguageMap<[(lang_to_suffixes "c", "c")]>;
|
2008-10-16 14:02:29 +00:00
|
|
|
|
2010-08-23 23:21:23 +00:00
|
|
|
def CompilationGraph : CompilationGraph<[(edge "root", "gcc")]>;
|