Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions python/private/cc/py_extension_macro.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,23 @@ def py_extension(
"//conditions:default": ["-fPIC"],
})

linkopts = linkopts + select({
# Windows MinGW linker flags are needed for Python upb windows x86 wheels test
"//python/dist:windows_x86_32": ["-static-libgcc"],
"//conditions:default": [],
}) + select({
"//python/dist:windows_x86_64_mingw": [
"-Wl,--dynamicbase",
"-Wl,--nxcompat",
"-Wl,--high-entropy-va",
],
"//python/dist:windows_x86_32_mingw": [
"-Wl,--dynamicbase",
"-Wl,--nxcompat",
],
"//conditions:default": [],
})

# Private alias targets are appended to avoid "duplicate dependency label" errors
# if a user explicitly passes //python/cc:current_py_cc_headers or //python/cc:current_py_cc_libs
# in their deps attribute (including when deps is a select() expression).
Expand Down
Loading