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)
721721 -fPIC
722722 -frtti
723723 -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
727724 )
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+
728733 # util lib
729734 add_library (
730735 util ${CMAKE_CURRENT_SOURCE_DIR} /extension/evalue_util/print_evalue.cpp
You can’t perform that action at this time.
0 commit comments