We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c567f70 commit 5f4179eCopy full SHA for 5f4179e
tests/cc/current_py_cc_libs/BUILD.bazel
@@ -42,6 +42,7 @@ cc_test(
42
name = "python_libs_linking_windows_test",
43
srcs = ["python_libs_linking_test.cc"],
44
defines = ["Py_LIMITED_API=0x030A0000"],
45
+ env = {"HELLO": "world"},
46
target_compatible_with = ["@platforms//os:windows"],
47
deps = [
48
"@rules_python//python/cc:current_py_cc_headers",
tests/cc/current_py_cc_libs/python_libs_linking_test.cc
@@ -1,8 +1,10 @@
1
+#include <cstdlib>
2
#include <Python.h>
3
4
int main(int argc, char** argv) {
5
// Early return to prevent the broken code below from running.
- if (argc >= 1) {
6
+ char* val = std::getenv("HELLO");
7
+ if (val || argc >= 1) {
8
return 0;
9
}
10
0 commit comments