@@ -181,8 +181,12 @@ def load_dep_info():
181
181
sys .exit ("Could not find bazel in PATH" )
182
182
183
183
184
- def build_libtorchtrt_pre_cxx11_abi (
185
- develop = True , use_dist_dir = True , pre_cxx11_abi = True , rt_only = False
184
+ def build_libtorchtrt_cxx11_abi (
185
+ develop = True ,
186
+ use_dist_dir = True ,
187
+ pre_cxx11_abi = False ,
188
+ rt_only = False ,
189
+ target_python = True ,
186
190
):
187
191
cmd = [BAZEL_EXE , "build" ]
188
192
if rt_only :
@@ -196,9 +200,15 @@ def build_libtorchtrt_pre_cxx11_abi(
196
200
cmd .append ("--compilation_mode=opt" )
197
201
if use_dist_dir :
198
202
cmd .append ("--distdir=third_party/dist_dir/x86_64-linux-gnu" )
199
- if pre_cxx11_abi :
203
+
204
+ if target_python :
200
205
cmd .append ("--config=python" )
206
+
207
+ if pre_cxx11_abi :
208
+ cmd .append ("--config=pre_cxx11_abi" )
209
+ print ("using PRE CXX11 ABI build" )
201
210
else :
211
+ cmd .append ("--config=cxx11_abi" )
202
212
print ("using CXX11 ABI build" )
203
213
204
214
if IS_WINDOWS :
@@ -293,7 +303,7 @@ def run(self):
293
303
294
304
if not PY_ONLY :
295
305
global PRE_CXX11_ABI
296
- build_libtorchtrt_pre_cxx11_abi (
306
+ build_libtorchtrt_cxx11_abi (
297
307
develop = True , pre_cxx11_abi = PRE_CXX11_ABI , rt_only = NO_TS
298
308
)
299
309
copy_libtorchtrt (rt_only = NO_TS )
@@ -317,7 +327,7 @@ def run(self):
317
327
318
328
if not PY_ONLY :
319
329
global PRE_CXX11_ABI
320
- build_libtorchtrt_pre_cxx11_abi (
330
+ build_libtorchtrt_cxx11_abi (
321
331
develop = False , pre_cxx11_abi = PRE_CXX11_ABI , rt_only = NO_TS
322
332
)
323
333
copy_libtorchtrt (rt_only = NO_TS )
@@ -340,7 +350,7 @@ def finalize_options(self):
340
350
def run (self ):
341
351
if not PY_ONLY :
342
352
global PRE_CXX11_ABI
343
- build_libtorchtrt_pre_cxx11_abi (
353
+ build_libtorchtrt_cxx11_abi (
344
354
develop = False , pre_cxx11_abi = PRE_CXX11_ABI , rt_only = NO_TS
345
355
)
346
356
copy_libtorchtrt (rt_only = NO_TS )
@@ -366,7 +376,7 @@ def run(self):
366
376
editable_wheel .run (self )
367
377
else :
368
378
global PRE_CXX11_ABI
369
- build_libtorchtrt_pre_cxx11_abi (
379
+ build_libtorchtrt_cxx11_abi (
370
380
develop = True , pre_cxx11_abi = PRE_CXX11_ABI , rt_only = NO_TS
371
381
)
372
382
gen_version_file ()
0 commit comments