From 81be365fa4813f7aa80c238d53c43c8670debfcc Mon Sep 17 00:00:00 2001 From: Aurelius84 Date: Tue, 7 Dec 2021 14:49:13 +0800 Subject: [PATCH] Fix cflags D_GLIBCXX_USE_CXX11_ABI takes no effect problem in customized op (#37878) (#37899) Fix cflags D_GLIBCXX_USE_CXX11_ABI takes no effect problem in customized op --- python/paddle/utils/cpp_extension/cpp_extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/utils/cpp_extension/cpp_extension.py b/python/paddle/utils/cpp_extension/cpp_extension.py index 19fa84046ed..73d2eed1753 100644 --- a/python/paddle/utils/cpp_extension/cpp_extension.py +++ b/python/paddle/utils/cpp_extension/cpp_extension.py @@ -433,7 +433,7 @@ class BuildExtension(build_ext, object): # 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_compile_flag(cflags, ['-D_GLIBCXX_USE_CXX11_ABI=1']) # Append this macor only when jointly compiling .cc with .cu if not is_cuda_file(src) and self.contain_cuda_file: cflags.append('-DPADDLE_WITH_CUDA') -- GitLab