mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Add fabi-version=11 to ensure compatibility between gcc7 and gcc9 binaries for _GLIBCXX_USE_CXX11_ABI=1 (#93835)
Fixes #https://github.com/pytorch/pytorch/pull/92550 Pull Request resolved: https://github.com/pytorch/pytorch/pull/93835 Approved by: https://github.com/malfet
This commit is contained in:
parent
ca74105377
commit
b562be793a
|
|
@ -44,11 +44,10 @@ if(DEFINED GLIBCXX_USE_CXX11_ABI)
|
||||||
if(${GLIBCXX_USE_CXX11_ABI} EQUAL 1)
|
if(${GLIBCXX_USE_CXX11_ABI} EQUAL 1)
|
||||||
set(CXX_STANDARD_REQUIRED ON)
|
set(CXX_STANDARD_REQUIRED ON)
|
||||||
string(APPEND CMAKE_CXX_FLAGS " -D_GLIBCXX_USE_CXX11_ABI=1")
|
string(APPEND CMAKE_CXX_FLAGS " -D_GLIBCXX_USE_CXX11_ABI=1")
|
||||||
else()
|
|
||||||
# Please note this is required in order to ensure compatibility between gcc 9 and gcc 7
|
|
||||||
# This could be removed when all Linux PyTorch binary builds are compiled by the same toolchain again
|
|
||||||
string(APPEND CMAKE_CXX_FLAGS " -fabi-version=11")
|
|
||||||
endif()
|
endif()
|
||||||
|
# Please note this is required in order to ensure compatibility between gcc 9 and gcc 7
|
||||||
|
# This could be removed when all Linux PyTorch binary builds are compiled by the same toolchain again
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS " -fabi-version=11")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user