[libclc] 98/291: Make C++ compiler configurable

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit ecdfb5939ee2f191f607317901111e85b174f87f
Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Wed Oct 23 02:49:27 2013 +0000

    Make C++ compiler configurable
    
    The C++ compiler used to build prepare-builtins
    may differ from the llvm/clang for which we are
    building libclc.
    
    Use 'clang++' as the default compiler.
    
    Patch by: Jeroen Ketema
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@193220 91177308-0d34-0410-b5e6-96231b3b80d8
---
 configure.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure.py b/configure.py
index 7208926..a829749 100755
--- a/configure.py
+++ b/configure.py
@@ -21,6 +21,8 @@ import metabuild
 p = OptionParser()
 p.add_option('--with-llvm-config', metavar='PATH',
              help='use given llvm-config script')
+p.add_option('--with-cxx-compiler', metavar='PATH',
+             help='use given C++ compiler')
 p.add_option('--prefix', metavar='PATH',
              help='install to given prefix')
 p.add_option('--libexecdir', metavar='PATH',
@@ -65,11 +67,14 @@ llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' '
                  llvm_config(['--ldflags'])
 llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'
 
-llvm_clang_cxx = os.path.join(llvm_bindir, 'clang++')
 llvm_clang = os.path.join(llvm_bindir, 'clang')
 llvm_link = os.path.join(llvm_bindir, 'llvm-link')
 llvm_opt = os.path.join(llvm_bindir, 'opt')
 
+cxx_compiler = options.with_cxx_compiler
+if not cxx_compiler:
+  cxx_compiler = os.path.join(llvm_bindir, 'clang++')
+
 available_targets = {
   'r600--' : { 'devices' :
                [{'gpu' : 'cedar',   'aliases' : ['palm', 'sumo', 'sumo2', 'redwood', 'juniper']},
@@ -96,8 +101,8 @@ b.rule("LLVM_LINK", command = llvm_link + " -o $out $in",
 b.rule("OPT", command = llvm_opt + " -O3 -o $out $in",
        description = 'OPT $out')
 
-c_compiler_rule(b, "LLVM_TOOL_CXX", 'LLVM-CXX', llvm_clang_cxx, llvm_cxxflags)
-b.rule("LLVM_TOOL_LINK", llvm_clang_cxx + " -o $out $in %s" % llvm_core_libs, 'LINK $out')
+c_compiler_rule(b, "LLVM_TOOL_CXX", 'CXX', cxx_compiler, llvm_cxxflags)
+b.rule("LLVM_TOOL_LINK", cxx_compiler + " -o $out $in %s" % llvm_core_libs, 'LINK $out')
 
 prepare_builtins = os.path.join('utils', 'prepare-builtins')
 b.build(os.path.join('utils', 'prepare-builtins.o'), "LLVM_TOOL_CXX",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list