Skip to content

Commit 1d87f50

Browse files
committed
Fix free-threaded DLL name, add ABI3 lib to free-threaded libpython
The former was probably an oversight, the latter is a consequence of the addition of free-threading, which wasn't there when this PR was first opened.
1 parent 5012a5c commit 1d87f50

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

python/private/hermetic_runtime_repo_setup.bzl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ def define_hermetic_runtime_toolchain_impl(
9191
)
9292
cc_import(
9393
name = "abi3_interface",
94-
interface_library = "libs/python3.lib",
94+
interface_library = select({
95+
_IS_FREETHREADED: "libs/python3t.lib",
96+
"//conditions:default": "libs/python3.lib",
97+
}),
9598
system_provided = True,
9699
)
97100

@@ -161,8 +164,10 @@ def define_hermetic_runtime_toolchain_impl(
161164
"lib/libpython{major}.{minor}t.dylib".format(**version_dict),
162165
],
163166
":is_freethreaded_windows": [
164-
"python3.dll",
167+
"python3t.dll",
168+
"python{python_version_nodot}t.dll",
165169
"libs/python{major}{minor}t.lib".format(**version_dict),
170+
"libs/python3t.lib",
166171
],
167172
"@platforms//os:linux": [
168173
"lib/libpython{major}.{minor}.so".format(**version_dict),
@@ -174,7 +179,7 @@ def define_hermetic_runtime_toolchain_impl(
174179
"python{python_version_nodot}.dll",
175180
"libs/python{major}{minor}.lib".format(**version_dict),
176181
"libs/python3.lib",
177-
],
182+
],
178183
}),
179184
)
180185

0 commit comments

Comments
 (0)