Skip to content

Commit 27d1f81

Browse files
authored
Fix cflags D_GLIBCXX_USE_CXX11_ABI takes no effect problem in customized op (#37878)
1 parent 2b479e1 commit 27d1f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/utils/cpp_extension/cpp_extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def unix_custom_single_compiler(obj, src, ext, cc_args, extra_postargs,
440440
# so we add this flag to ensure the symbol names from user compiled
441441
# shared library have same ABI suffix with core_(no)avx.so.
442442
# See https://stackoverflow.com/questions/34571583/understanding-gcc-5s-glibcxx-use-cxx11-abi-or-the-new-abi
443-
add_compile_flag(['-D_GLIBCXX_USE_CXX11_ABI=1'], cflags)
443+
add_compile_flag(cflags, ['-D_GLIBCXX_USE_CXX11_ABI=1'])
444444
# Append this macor only when jointly compiling .cc with .cu
445445
if not is_cuda_file(src) and self.contain_cuda_file:
446446
if core.is_compiled_with_rocm():

0 commit comments

Comments
 (0)