Skip to content

Update find runfiles manifest file logic#12650

Closed
mai93 wants to merge 10 commits intobazelbuild:masterfrom
mai93:run_under_runfiles
Closed

Update find runfiles manifest file logic#12650
mai93 wants to merge 10 commits intobazelbuild:masterfrom
mai93:run_under_runfiles

Conversation

@mai93
Copy link
Copy Markdown
Contributor

@mai93 mai93 commented Dec 7, 2020

This pull request updates the FindManifestFileImpl function to look for the runfiles manifest file of the binary first. If it is not found, it can use the manifest file specified in the environment variables RUNFILES_MANIFEST_FILE if it exists. The same logic is applied in runfiles_src.cc to find runfiles manifest file / directory of cc binaries.

This is done to avoid using the manifest file in RUNFILES_MANIFEST_FILE environment variable if the binary already has its own runfiles manifest file. While, at the same time, allow using the value in the environment variables for binaries run as data-dependency that have no runfiles manifest/directory and should use the main binary's.

Fixes: #10598

@google-cla google-cla Bot added the cla: yes label Dec 7, 2020
@mai93 mai93 requested a review from meteorcloudy December 9, 2020 23:48
Copy link
Copy Markdown
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Comment thread tools/cpp/runfiles/runfiles_src.cc
@bazel-io bazel-io closed this in bfdfa6e Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary targets on Windows use --run_under's runfiles manifest if the argument is a rule

2 participants