-
Notifications
You must be signed in to change notification settings - Fork 791
bazel/tcl: Replace the rules_hdl tcl version with the bcr tcl version #9490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5aea982
004b5fe
3157515
676e7e9
b3d6b36
359e41e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| #include <unistd.h> | ||
|
|
||
| #include <climits> | ||
| #include <cstdlib> | ||
| #include <iostream> | ||
| #include <memory> | ||
| #include <optional> | ||
|
|
@@ -55,11 +56,11 @@ class BazelInitializer | |
| } | ||
|
|
||
| // Set the TCL_LIBRARY environment variable | ||
| const std::string tcl_path = runfiles->Rlocation("tk_tcl/library/"); | ||
| const std::string tcl_path = runfiles->Rlocation("tcl_lang/library/"); | ||
| if (!tcl_path.empty()) { | ||
| setenv("TCL_LIBRARY", tcl_path.c_str(), 0); | ||
| setenv("TCL_LIBRARY", tcl_path.c_str(), true); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: no header providing "setenv" is directly included [misc-include-cleaner] bazel/InitRunFiles.cpp:1: - #include <unistd.h>
+ #include <stdlib.h>
+ #include <unistd.h> |
||
| } else { | ||
| std::cerr << "Error: Could not locate 'tk_tcl/library/' in runfiles." | ||
| std::cerr << "Error: Could not locate 'tcl_lang/library/' in runfiles." | ||
| << std::endl; | ||
| std::exit(1); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,10 +24,6 @@ def _tcl_encode_sta_impl(ctx): | |
| arguments = [args], | ||
| tools = [ctx.executable._tclsh, ctx.file._encode_script], | ||
| executable = ctx.executable._tclsh, | ||
| env = { | ||
| # FIXME why is this needed? | ||
| "TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tk_tcl/library", | ||
| }, | ||
| ) | ||
| return [DefaultInfo(files = depset([output_file]))] | ||
|
|
||
|
|
@@ -51,7 +47,7 @@ tcl_encode_sta = rule( | |
| allow_single_file = True, | ||
| ), | ||
| "_tclsh": attr.label( | ||
| default = "@tk_tcl//:tclsh", | ||
| default = "@tcl_lang//:tclsh", | ||
| executable = True, | ||
| cfg = "exec", | ||
| ), | ||
|
Comment on lines
49
to
53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While you've correctly updated the default env = {
# FIXME why is this needed?
"TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tk_tcl/library",
},This should be updated to use env = {
# FIXME why is this needed?
"TCL_LIBRARY": ctx.executable._tclsh.path + ".runfiles/tcl_lang/library",
},Without this change, the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sounds reasonable but i can run the regression without that change. Can this be removed?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed this environment setting. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,7 @@ cc_library( | |
| "//src/odb", | ||
| "//src/utl", | ||
| "@boost.stacktrace", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ cc_library( | |
| "//src/utl", | ||
| "@abc", | ||
| "@boost.stacktrace", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,7 +98,7 @@ cc_library( | |
| "//src/rsz", | ||
| "//src/utl", | ||
| "@boost.stacktrace", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ cc_library( | |
| "//src/odb", | ||
| "//src/utl", | ||
| "@boost.stacktrace", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,7 +80,7 @@ cc_library( | |
| "//src/odb", | ||
| "//src/utl", | ||
| "@boost.stacktrace", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,6 +158,6 @@ cc_test( | |
| "@abc", | ||
| "@googletest//:gtest", | ||
| "@googletest//:gtest_main", | ||
| "@tk_tcl//:tcl", | ||
| "@tcl_lang//:tcl", | ||
| ], | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "setenv" is directly included [misc-include-cleaner]
bazel/InitRunFiles.cpp:0: