Skip to content

We're not using runfiles anymore, don't use associated macro define.#371

Open
hzeller wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260611-runfile
Open

We're not using runfiles anymore, don't use associated macro define.#371
hzeller wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
hzeller:feature-20260611-runfile

Conversation

@hzeller

@hzeller hzeller commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

We used to use runfiles to work with tcl dependencies. Since we don't need that anymore, just add a regular BAZEL_BUILD define to choose the behavior in the bazel build and remove the unneeded dependency.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the preprocessor macro BAZEL_CURRENT_REPOSITORY with BAZEL_BUILD in app/Main.cc and defines BAZEL_BUILD in the BUILD file. The reviewer notes that @rules_cc//cc/runfiles is still listed in the dependencies of the binary and should be removed to complete the cleanup as described in the pull request.

Comment thread BUILD
@hzeller
hzeller force-pushed the feature-20260611-runfile branch from 7bb4d4e to c08d761 Compare June 11, 2026 15:32
@hzeller

hzeller commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Can this be merged ?

@hzeller

hzeller commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Ping.

@hzeller

hzeller commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

did this fall under the radar ?

@hzeller

hzeller commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Regular ping :)

@hzeller

hzeller commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Maybe 'pong' helps ?

@hzeller

hzeller commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Regular ping...

@hzeller

hzeller commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

We used to use runfiles to work with tcl dependencies. Since we don't
need that anymore, just add a regular `BAZEL_BUILD` define to
choose the behavior in the bazel build and remove the unneeded
dependency.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller
hzeller force-pushed the feature-20260611-runfile branch from c08d761 to 379c5c3 Compare July 15, 2026 05:32
@maliberty
maliberty requested a review from dsengupta0628 July 16, 2026 16:43
@dsengupta0628

Copy link
Copy Markdown
Contributor

taking a look right now!

@dsengupta0628 dsengupta0628 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness ✅

  • Root reason sound: remove runfiles dependency--> BAZEL_CURRENT_REPOSITORY vanishes --> guarded blocks silently drop out (readline + tcl env setup lost in bazel build). Explicit BAZEL_BUILD define restores intent.
  • All 3 #ifdef sites flipped consistently. No stray BAZEL_CURRENT_REPOSITORY left.
  • @rules_cc//cc/runfiles referenced only at this one dep line — safe to remove.
  • Transitive deps //bazel:tcl_library_init + //:tcl_readline_setup still present, so headers bazel/tcl_library_init.h / src/tcl_readline_setup.h keep their own build inputs. Binary-level
    runfiles dep was serving only the macro. Clean.

Style / conventions ✅

  • BAZEL_BUILD clearer intent than repurposing a toolchain-internal macro. This is good as BAZEL_CURRENT_REPOSITORY was never meant as a build-mode flag, just happened to exist.
  • Matches OpenSTA bazel patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants