[libclc] 116/291: Fixed rules names so they are unique when aliases are present.
Andreas Beckmann
anbe at moszumanska.debian.org
Tue Sep 8 10:53:39 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 b5d4321672f17837f09d475df938bb7981c704e9
Author: Tom Stellard <thomas.stellard at amd.com>
Date: Wed Jan 29 20:03:27 2014 +0000
Fixed rules names so they are unique when aliases are present.
This is necessary for building with Ninja because it does not allow
duplicate rule names.
Patch by: Dan Liew
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@200415 91177308-0d34-0410-b5e6-96231b3b80d8
---
configure.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.py b/configure.py
index 525fdbe..37ac4c2 100755
--- a/configure.py
+++ b/configure.py
@@ -164,7 +164,7 @@ for target in targets:
"-emit-llvm" % (target, clang_cl_includes)
if device['gpu'] != '':
clang_bc_flags += ' -mcpu=' + device['gpu']
- clang_bc_rule = "CLANG_CL_BC_" + target
+ clang_bc_rule = "CLANG_CL_BC_" + target + "_" + device['gpu']
c_compiler_rule(b, clang_bc_rule, "LLVM-CC", llvm_clang, clang_bc_flags)
objects = []
@@ -210,11 +210,13 @@ for target in targets:
install_files_bc.append((builtins_bc, builtins_bc))
install_deps.append(builtins_bc)
for alias in device['aliases']:
- b.rule("CREATE_ALIAS", "ln -fs %s $out" % os.path.basename(builtins_bc)
+ # Ninja cannot have multiple rules with same name so append suffix
+ ruleName = "CREATE_ALIAS_{0}_for_{1}".format(alias, device['gpu'])
+ b.rule(ruleName, "ln -fs %s $out" % os.path.basename(builtins_bc)
,"CREATE-ALIAS $out")
alias_file = os.path.join('built_libs', alias + '-' + target + '.bc')
- b.build(alias_file, "CREATE_ALIAS", builtins_bc)
+ b.build(alias_file, ruleName, builtins_bc)
install_files_bc.append((alias_file, alias_file))
install_deps.append(alias_file)
b.default(builtins_bc)
--
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