From b98c67232854ccbb0bec50f266d3a23d4c18fe86 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 23 Nov 2004 23:33:08 +0000 Subject: [PATCH] Configurable language configuration files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18181 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvmc/c.in | 64 ++++++++++++++++++++++++++++++++++++++++++++++ tools/llvmc/cpp.in | 64 ++++++++++++++++++++++++++++++++++++++++++++++ tools/llvmc/ll.in | 12 +++++++++ tools/llvmc/st.in | 63 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+) create mode 100644 tools/llvmc/c.in create mode 100644 tools/llvmc/cpp.in create mode 100644 tools/llvmc/ll.in create mode 100644 tools/llvmc/st.in diff --git a/tools/llvmc/c.in b/tools/llvmc/c.in new file mode 100644 index 00000000000..9124e9ea77d --- /dev/null +++ b/tools/llvmc/c.in @@ -0,0 +1,64 @@ +# Stacker Configuration File For llvmc + +########################################################## +# Language definitions +########################################################## + lang.name=C + lang.opt1=-O1 + lang.opt2=-O2 + lang.opt3=-O3 + lang.opt4=-O3 + lang.opt5=-O3 + lang.libs=@LLVMGCCDIR@/lib @LLVMGCCDIR@/bytecode-libs \ + @LLVMGCCDIR@/lib/gcc/@LLVMGCCARCH@ + +########################################################## +# Pre-processor definitions +########################################################## + + # Stacker doesn't have a preprocessor but the following + # allows the -E option to be supported + preprocessor.command=g++ -E %in% -o %out% %incls% %defs% + preprocessor.required=false + +########################################################## +# Translator definitions +########################################################## + + # To compile stacker source, we just run the stacker + # compiler with a default stack size of 2048 entries. + translator.command=@LLVMCC1@ -quiet %in% -o %out% \ + %opt% %incls% %defs% %WOpts% %fOpts% %MOpts% %args% + + # stkrc doesn't preprocess but we set this to true so + # that we don't run the cp command by default. + translator.preprocesses=true + + # The translator is required to run. + translator.required=true + + # Output of the translator is assembly + translator.output=assembly + +########################################################## +# Optimizer definitions +########################################################## + + # For optimization, we use the LLVM "opt" program + optimizer.command=@LLVM_BINDIR@/gccas %in% -o %out% %args% + + optimizer.required = true + + # opt doesn't translate + optimizer.translates = false + + # opt doesn't preprocess + optimizer.preprocesses=false + + # opt produces bytecode + optimizer.output = bytecode + +########################################################## +# Assembler definitions +########################################################## + assembler.command=llc %in% -o %out% %target% %time% %stats% diff --git a/tools/llvmc/cpp.in b/tools/llvmc/cpp.in new file mode 100644 index 00000000000..0abc012c3c8 --- /dev/null +++ b/tools/llvmc/cpp.in @@ -0,0 +1,64 @@ +# Stacker Configuration File For llvmc + +########################################################## +# Language definitions +########################################################## + lang.name=C++ + lang.opt1=-O1 + lang.opt2=-O2 + lang.opt3=-O3 + lang.opt4=-O3 + lang.opt5=-O3 + lang.libs=@LLVMGCCDIR@/lib @LLVMGCCDIR@/bytecode-libs \ + @LLVMGCCDIR@/lib/gcc/@LLVMGCCARCH@ + +########################################################## +# Pre-processor definitions +########################################################## + + # Stacker doesn't have a preprocessor but the following + # allows the -E option to be supported + preprocessor.command=g++ -E %in% -o %out% %incls% %defs% + preprocessor.required=false + +########################################################## +# Translator definitions +########################################################## + + # To compile stacker source, we just run the stacker + # compiler with a default stack size of 2048 entries. + translator.command=@LLVMCC1PLUS@ -quiet %in% -o %out% \ + %opt% %incls% %defs% %WOpts% %fOpts% %MOpts% %args% + + # stkrc doesn't preprocess but we set this to true so + # that we don't run the cp command by default. + translator.preprocesses=true + + # The translator is required to run. + translator.required=true + + # stkrc doesn't handle the -On options + translator.output=assembly + +########################################################## +# Optimizer definitions +########################################################## + + # For optimization, we use the LLVM "opt" program + optimizer.command=@LLVM_BINDIR@/gccas %in% -o %out% %args% + + optimizer.required = true + + # opt doesn't translate + optimizer.translates = false + + # opt doesn't preprocess + optimizer.preprocesses=false + + # opt produces bytecode + optimizer.output = bytecode + +########################################################## +# Assembler definitions +########################################################## + assembler.command=llc %in% -o %out% %target% %time% %stats% diff --git a/tools/llvmc/ll.in b/tools/llvmc/ll.in new file mode 100644 index 00000000000..c6567a37c70 --- /dev/null +++ b/tools/llvmc/ll.in @@ -0,0 +1,12 @@ +# LLVM Assembly Config File For llvmc + version="1.0" + lang.name=LLVM Assembly + preprocessor.command= + preprocessor.required=false + translator.command=@bindir@/llvm-as %in% -o %out% + translator.optimizes=no + translator.preprocesses=true + translator.required=TRUE + optimizer.command=@bindir@/opt %in% -o %out% %opt% %args% + optimizer.translates=no + assembler.command=@bindir@/llc %in% -o %out% diff --git a/tools/llvmc/st.in b/tools/llvmc/st.in new file mode 100644 index 00000000000..7683101128f --- /dev/null +++ b/tools/llvmc/st.in @@ -0,0 +1,63 @@ +# Stacker Configuration File For llvmc + +########################################################## +# Language definitions +########################################################## + lang.name=Stacker + lang.opt1=-O1 + lang.opt2=-O2 + lang.opt3=-O3 + lang.opt4=-O4 + lang.opt5=-O5 + +########################################################## +# Pre-processor definitions +########################################################## + + # Stacker doesn't have a preprocessor but the following + # allows the -E option to be supported + preprocessor.command=cp %in% %out% + preprocessor.required=false + +########################################################## +# Translator definitions +########################################################## + + # To compile stacker source, we just run the stacker + # compiler with a default stack size of 2048 entries. + translator.command=@bindir@/stkrc -s 2048 %in% -f -o %out% %opt% \ + %time% %stats% %args% + + # stkrc doesn't preprocess but we set this to true so + # that we don't run the cp command by default. + translator.preprocesses=true + + # The translator is required to run. + translator.required=false + + # stkrc doesn't handle the -On options + translator.output=bytecode + +########################################################## +# Optimizer definitions +########################################################## + + # For optimization, we use the LLVM "opt" program + optimizer.command=@bindir@/stkrc -s 2048 %in% -f -o %out% %opt% \ + %time% %stats% %args% + + optimizer.required = yes + + # opt doesn't translate + optimizer.translates = yes + + # opt doesn't preprocess + optimizer.preprocesses=yes + + # opt produces bytecode + optimizer.output = bc + +########################################################## +# Assembler definitions +########################################################## + assembler.command=llc %in% -o %out% %target% %time% %stats%