File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -721,10 +721,15 @@ if(EXECUTORCH_BUILD_PYBIND)
721
721
-fPIC
722
722
-frtti
723
723
-fexceptions
724
- # libtorch is built with the old ABI, so we need to do the same for any
725
- # .cpp files that include torch, c10, or ATen targets.
726
- -D_GLIBCXX_USE_CXX11_ABI=0
727
724
)
725
+ if (EXECUTORCH_DO_NOT_USE_CXX11_ABI )
726
+ # libtorch is built with the old ABI, so we need to do the same for any
727
+ # .cpp files that include torch, c10, or ATen targets. Note that PyTorch
728
+ # nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its
729
+ # CI build sets this to 1 (default)
730
+ list (APPEND _pybind_compile_options -D_GLIBCXX_USE_CXX11_ABI=0 )
731
+ endif ()
732
+
728
733
# util lib
729
734
add_library (
730
735
util ${CMAKE_CURRENT_SOURCE_DIR} /extension/evalue_util/print_evalue.cpp
You can’t perform that action at this time.
0 commit comments