Skip to content

Commit

Permalink
Fix free-threaded DLL name, add ABI3 lib to free-threaded libpython
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicholasjng committed Nov 29, 2024
1 parent 5012a5c commit 1d87f50
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions python/private/hermetic_runtime_repo_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def define_hermetic_runtime_toolchain_impl(
)
cc_import(
name = "abi3_interface",
interface_library = "libs/python3.lib",
interface_library = select({
_IS_FREETHREADED: "libs/python3t.lib",
"//conditions:default": "libs/python3.lib",
}),
system_provided = True,
)

Expand Down Expand Up @@ -161,8 +164,10 @@ def define_hermetic_runtime_toolchain_impl(
"lib/libpython{major}.{minor}t.dylib".format(**version_dict),
],
":is_freethreaded_windows": [
"python3.dll",
"python3t.dll",
"python{python_version_nodot}t.dll",
"libs/python{major}{minor}t.lib".format(**version_dict),
"libs/python3t.lib",
],
"@platforms//os:linux": [
"lib/libpython{major}.{minor}.so".format(**version_dict),
Expand All @@ -174,7 +179,7 @@ def define_hermetic_runtime_toolchain_impl(
"python{python_version_nodot}.dll",
"libs/python{major}{minor}.lib".format(**version_dict),
"libs/python3.lib",
],
],
}),
)

Expand Down

0 comments on commit 1d87f50

Please sign in to comment.