Skip to content

Commit

Permalink
PR #19669: Replace custom free-threading flag by rules_python is_py_f…
Browse files Browse the repository at this point in the history
…reethreaded in Nanobind

Imported from GitHub PR #19669

cc @hawkinsp
Copybara import of the project:

--
70a8fa8 by vfdev-5 <[email protected]>:

Replace custom free-threading flag by rules_python is_py_freethreaded in Nanobind

Merging this change closes #19669

FUTURE_COPYBARA_INTEGRATE_REVIEW=#19669 from vfdev-5:nanobind-use-rules-python-is_py_freethreaded-flag 70a8fa8
PiperOrigin-RevId: 700713072
  • Loading branch information
vfdev-5 authored and Google-ML-Automation committed Dec 2, 2024
1 parent 6070a19 commit e3c67d0
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions third_party/nanobind/nanobind.BUILD
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

bool_flag(
name = "enabled_free_threading",
build_setting_default = False,
)

config_setting(
name = "use_enabled_free_threading",
flag_values = {
":enabled_free_threading": "True",
},
)

cc_library(
name = "nanobind",
srcs = glob(
Expand All @@ -26,7 +12,7 @@ cc_library(
),
copts = ["-fexceptions"],
defines = select({
":use_enabled_free_threading": [
"@rules_python//python/config_settings:is_py_freethreaded": [
"NB_FREE_THREADED=1",
"NB_BUILD=1",
"NB_SHARED=1",
Expand Down

0 comments on commit e3c67d0

Please sign in to comment.