Author: jvesely
Date: Tue Nov 27 08:01:10 2018
New Revision: 347664

URL: http://llvm.org/viewvc/llvm-project?rev=347664&view=rev
Log:
configure: Add target specific asm rule.

Run the file through target specific preprocessing stage.
Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu>
Reviewer: Aaron Watry

Modified:
    libclc/trunk/configure.py

Modified: libclc/trunk/configure.py
URL: 
http://llvm.org/viewvc/llvm-project/libclc/trunk/configure.py?rev=347664&r1=347663&r2=347664&view=diff
==============================================================================
--- libclc/trunk/configure.py (original)
+++ libclc/trunk/configure.py Tue Nov 27 08:01:10 2018
@@ -213,6 +213,8 @@ for target in targets:
       clang_bc_flags += ' -mcpu=' + device['gpu']
     clang_bc_rule = "CLANG_CL_BC_" + target + "_" + device['gpu']
     c_compiler_rule(b, clang_bc_rule, "LLVM-CC", llvm_clang, clang_bc_flags)
+    as_bc_rule = "LLVM_AS_BC_" + target + "_" + device['gpu']
+    b.rule(as_bc_rule, "%s -E -P %s -x cl $in -o - | %s -o $out" % 
(llvm_clang, clang_bc_flags, llvm_as), 'LLVM-AS $out')
 
     objects = []
     sources_seen = set()
@@ -265,7 +267,7 @@ for target in targets:
           src_file = os.path.join(src_path, src)
           ext = os.path.splitext(src)[1]
           if ext == '.ll':
-            b.build(obj, 'LLVM_AS', src_file)
+            b.build(obj, as_bc_rule, src_file)
           else:
             b.build(obj, clang_bc_rule, src_file)
 


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to