From 7ba8ad31dfe15e0ad667f6ccd21b9073db89212a Mon Sep 17 00:00:00 2001 From: Mikhail Glushenkov Date: Sat, 18 Apr 2009 20:55:28 +0000 Subject: [PATCH] Add a configure check for llvm-gcc (reapply). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69474 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/configure.ac | 3 +++ tools/llvmc/plugins/Base/{Base.td => Base.td.in} | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) rename tools/llvmc/plugins/Base/{Base.td => Base.td.in} (93%) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index a55968956ba..1a355149dbd 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1065,6 +1065,9 @@ AC_CONFIG_FILES([llvm.spec]) dnl Configure doxygen's configuration file AC_CONFIG_FILES([docs/doxygen.cfg]) +dnl Configure llvmc's Base plugin +AC_CONFIG_FILES([tools/llvmc/plugins/Base/Base.td]) + dnl Do the first stage of configuration for llvm-config.in. AC_CONFIG_FILES([tools/llvm-config/llvm-config.in]) diff --git a/tools/llvmc/plugins/Base/Base.td b/tools/llvmc/plugins/Base/Base.td.in similarity index 93% rename from tools/llvmc/plugins/Base/Base.td rename to tools/llvmc/plugins/Base/Base.td.in index ec6f87cfc7c..4ea6ee1d105 100644 --- a/tools/llvmc/plugins/Base/Base.td +++ b/tools/llvmc/plugins/Base/Base.td.in @@ -80,10 +80,10 @@ class llvm_gcc_based : Tool< (sink) ]>; -def llvm_gcc_c : llvm_gcc_based<"llvm-gcc -x c", "c", "i">; -def llvm_gcc_cpp : llvm_gcc_based<"llvm-g++ -x c++", "c++", "i">; -def llvm_gcc_m : llvm_gcc_based<"llvm-gcc -x objective-c", "objective-c", "mi">; -def llvm_gcc_mxx : llvm_gcc_based<"llvm-gcc -x objective-c++", +def llvm_gcc_c : llvm_gcc_based<"@LLVMGCC@ -x c", "c", "i">; +def llvm_gcc_cpp : llvm_gcc_based<"@LLVMGXX@ -x c++", "c++", "i">; +def llvm_gcc_m : llvm_gcc_based<"@LLVMGCC@ -x objective-c", "objective-c", "mi">; +def llvm_gcc_mxx : llvm_gcc_based<"@LLVMGCC@ -x objective-c++", "objective-c++", "mi">; def opt : Tool< @@ -105,7 +105,7 @@ def llvm_gcc_assembler : Tool< [(in_language "assembler"), (out_language "object-code"), (output_suffix "o"), - (cmd_line "llvm-gcc -c -x assembler $INFILE -o $OUTFILE"), + (cmd_line "@LLVMGCC@ -c -x assembler $INFILE -o $OUTFILE"), (actions (case (switch_on "c"), (stop_compilation), (not_empty "Wa,"), (unpack_values "Wa,"))) @@ -136,9 +136,9 @@ class llvm_gcc_based_linker : Tool< ]>; // Default linker -def llvm_gcc_linker : llvm_gcc_based_linker<"llvm-gcc">; +def llvm_gcc_linker : llvm_gcc_based_linker<"@LLVMGCC@">; // Alternative linker for C++ -def llvm_gcc_cpp_linker : llvm_gcc_based_linker<"llvm-g++">; +def llvm_gcc_cpp_linker : llvm_gcc_based_linker<"@LLVMGXX@">; // Language map