summaryrefslogtreecommitdiffstats
path: root/libclc/configure.py
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-01-29 20:03:27 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-01-29 20:03:27 +0000
commit8a3770ab971dd50d40b3465d4ff725755ab8763a (patch)
treec6e8f0fdfef84b292da5304e1f9b77a7530401dc /libclc/configure.py
parent91d51db80065a692a5f1a371ad7717f6f2ee3189 (diff)
downloadbcm5719-llvm-8a3770ab971dd50d40b3465d4ff725755ab8763a.tar.gz
bcm5719-llvm-8a3770ab971dd50d40b3465d4ff725755ab8763a.zip
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 llvm-svn: 200415
Diffstat (limited to 'libclc/configure.py')
-rwxr-xr-xlibclc/configure.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/libclc/configure.py b/libclc/configure.py
index 525fdbeeaf4..37ac4c2b786 100755
--- a/libclc/configure.py
+++ b/libclc/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)
OpenPOWER on IntegriCloud