Skip to content

Commit c0aa028

Browse files
committed
[fix release error
1 parent f05a16c commit c0aa028

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pytron/build_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def get_safe_linker_flags(module_name, build_dir):
3535
flags.append("-Clink-arg=-Wl,--exclude-libs,ALL")
3636

3737
elif sys.platform == "darwin":
38-
# macOS Export List
39-
# Note: macOS symbols in the linker often have a leading underscore.
40-
# We use -undefined dynamic_lookup to allow linking against Python symbols
38+
# macOS symbols in the linker often have a leading underscore, but rustc
39+
# already generates an exported_symbols_list for cdylib targets, so we must
40+
# NOT use -exported_symbol here as it will conflict.
41+
# We only need -undefined dynamic_lookup to allow linking against Python symbols
4142
# provided at runtime.
4243
flags.append("-Clink-arg=-Wl,-undefined,dynamic_lookup")
43-
flags.append(f"-Clink-arg=-Wl,-exported_symbol,_PyInit_{module_name}")
4444

4545
return flags

0 commit comments

Comments
 (0)