Skip to content
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

Update find runfiles manifest file logic #12650

Closed
wants to merge 10 commits into from

Conversation

mai93
Copy link
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
Copy link
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!

tools/cpp/runfiles/runfiles_src.cc Show resolved Hide resolved
@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