File tree Expand file tree Collapse file tree 5 files changed +15
-5
lines changed
packages/Python/lldbsuite/test
test/API/functionalities/archives Expand file tree Collapse file tree 5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ def getToolchainSpec(self, compiler):
110
110
if not cc :
111
111
return []
112
112
113
+ exe_ext = ""
114
+ if lldbplatformutil .getHostPlatform () == "windows" :
115
+ exe_ext = ".exe"
116
+
113
117
cc = cc .strip ()
114
118
cc_path = pathlib .Path (cc )
115
119
@@ -149,9 +153,9 @@ def getToolchainSpec(self, compiler):
149
153
cc_dir = cc_path .parent
150
154
151
155
def getToolchainUtil (util_name ):
152
- return cc_dir / ( cc_prefix + util_name + cc_ext )
156
+ return os . path . join ( configuration . llvm_tools_dir , util_name + exe_ext )
153
157
154
- cxx = getToolchainUtil ( cxx_type )
158
+ cxx = cc_dir / ( cc_prefix + cxx_type + cc_ext )
155
159
156
160
util_names = {
157
161
"OBJCOPY" : "objcopy" ,
@@ -161,6 +165,11 @@ def getToolchainUtil(util_name):
161
165
}
162
166
utils = []
163
167
168
+ # Required by API TestBSDArchives.py tests.
169
+ # TODO don't forget to fix the test's Makefile when porting to mainline
170
+ if not os .getenv ("LLVM_AR" ):
171
+ utils .extend (["LLVM_AR=%s" % getToolchainUtil ("llvm-ar" )])
172
+
164
173
if not lldbplatformutil .platformIsDarwin ():
165
174
if cc_type in ["clang" , "cc" , "gcc" ]:
166
175
util_paths = {}
Original file line number Diff line number Diff line change 118
118
# same base name.
119
119
all_tests = set ()
120
120
121
+ # Path to LLVM tools to be used by tests.
122
+ llvm_tools_dir = None
123
+
121
124
# LLDB library directory.
122
125
lldb_libs_dir = None
123
126
lldb_obj_root = None
Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ def parseOptionsAndInitTestdirs():
280
280
"xcrun -find -toolchain default dsymutil"
281
281
)
282
282
if args .llvm_tools_dir :
283
+ configuration .llvm_tools_dir = args .llvm_tools_dir
283
284
configuration .filecheck = shutil .which ("FileCheck" , path = args .llvm_tools_dir )
284
285
configuration .yaml2obj = shutil .which ("yaml2obj" , path = args .llvm_tools_dir )
285
286
Original file line number Diff line number Diff line change @@ -12,12 +12,10 @@ libfoo.a: a.o b.o
12
12
13
13
# This tests whether lldb can load a thin archive
14
14
libbar.a : c.o
15
- $(eval LLVM_AR := $(LLVM_TOOLS_DIR ) /llvm-ar)
16
15
$(eval LLVM_ARFLAGS := -rcsDT)
17
16
$(LLVM_AR ) $(LLVM_ARFLAGS ) $@ $^
18
17
19
18
libfoo-thin.a : a.o b.o
20
- $(eval LLVM_AR := $(LLVM_TOOLS_DIR ) /llvm-ar)
21
19
$(eval LLVM_ARFLAGS := -rcsUT)
22
20
$(LLVM_AR ) $(LLVM_ARFLAGS ) $@ $^
23
21
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ def setUp(self):
25
25
oslist = ["windows" ],
26
26
bugnumber = "llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows" ,
27
27
)
28
- @expectedFailureAll (remote = True )
29
28
def test (self ):
30
29
"""Break inside a() and b() defined within libfoo.a."""
31
30
self .build ()
You can’t perform that action at this time.
0 commit comments