未验证 提交 5363dade 编写于 作者: A Aurelius84 提交者: GitHub

[CustomOP]Set GLIBCXX_USE_CXX11_ABI=1 to fix potential GCC ABI problem (#33153)

* Add GLIBCXX_USE_CXX11_ABI flag

* fix typo

* fix typo
上级 2d3cbb49
......@@ -427,6 +427,12 @@ class BuildExtension(build_ext, object):
elif isinstance(cflags, dict):
cflags = cflags['cxx']
# NOTE(Aurelius84): Since Paddle 2.0, we require gcc version > 5.x,
# so we add this flag to ensure the symbol names from user compiled
# shared library have same ABI suffix with core_(no)avx.so.
# See https://stackoverflow.com/questions/34571583/understanding-gcc-5s-glibcxx-use-cxx11-abi-or-the-new-abi
add_compile_flag(['-D_GLIBCXX_USE_CXX11_ABI=1'], cflags)
add_std_without_repeat(
cflags, self.compiler.compiler_type, use_std14=False)
original_compile(obj, src, ext, cc_args, cflags, pp_opts)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册