1
1
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2
2
# See https://llvm.org/LICENSE.txt for license information.
3
3
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+ from __future__ import print_function
4
5
import os
5
6
import sys
6
7
wopt = " -w"
@@ -71,22 +72,22 @@ def build_linker_name(cn):
71
72
72
73
import subprocess
73
74
if __name__ == "__main__" :
74
- print sys .argv
75
+ print ( sys .argv )
75
76
litargs = [sys .argv [0 ]] # args for lit.main
76
77
c_compiler_name = sys .argv [1 ].strip ()
77
78
cxx_compiler_name = build_cxx_compiler_name (c_compiler_name )
78
79
linker_name = build_linker_name (c_compiler_name )
79
- #print "C++ compiler:", cxx_compiler_name
80
- #print "linker :", linker_name
80
+ #print( "C++ compiler:", cxx_compiler_name)
81
+ #print( "linker :", linker_name)
81
82
for la in sys .argv [2 :]:
82
83
litargs .append (la )
83
84
sys .argv = litargs
84
85
cmd = c_compiler_name .split () + [ "-o" , "b.exe" , "test/common/genselector.c" ]
85
- #print "cmd = ", cmd
86
+ #print( "cmd = ", cmd)
86
87
rv = subprocess .call (cmd )
87
- #print "rv = " , rv
88
+ #print( "rv = " , rv)
88
89
if rv != 0 :
89
- print "compiler failed: " , cmd
90
+ print ( "compiler failed: " , cmd )
90
91
sys .exit (1 )
91
92
rv = subprocess .call ("./b.exe" )
92
93
fp = open ("nselector.h" )
@@ -105,14 +106,14 @@ def build_linker_name(cn):
105
106
test_params ["linker" ] = linker_name
106
107
test_params ["Platform" ] = "linux-" + cmd [0 ]
107
108
108
- print "test_params = " , test_params
109
+ print ( "test_params = " , test_params )
109
110
builtin_parameters = {
110
111
'build_mode' : "Release" ,
111
112
'llvm_site_config' : os .path .join (os .getcwd (), 'lit.site.cfg' ),
112
113
'clang_site_config' : os .path .join (os .getcwd (), 'lit.site.cfg' ),
113
114
'test_params' : test_params
114
115
}
115
- #print "builtin_params = " , test_params
116
+ #print( "builtin_params = " , test_params)
116
117
from lit .main import main
117
118
main (builtin_parameters )
118
119
0 commit comments