Skip to content

[reproduce] Preserve linker inputs when reproduce link fails - #2068

Open
Steven Ramirez Rosa (Steven6798) wants to merge 1 commit into
qualcomm:mainfrom
Steven6798:issue-1014
Open

Steven Ramirez Rosa (Steven6798) wants to merge 1 commit into
qualcomm:mainfrom
Steven6798:issue-1014

Conversation

@Steven6798

Copy link
Copy Markdown
Contributor

Capture linker scripts and unresolved namespecs when input activation fails so the reproduce response preserves the original failure. Avoid applying mapping-file resolution to unmapped replay namespecs while retaining normal mapped namespec behavior.

Fix: #1014

Comment thread lib/Input/Input.cpp Outdated
// namespecs that have an explicit mapping entry, preserving normal mapped
// link behavior.
if (PConfig.options().hasMappingFile() && !isInternal() &&
(Type != Input::Namespec || PConfig.hasMappingForFile(FileName)))

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.

Can this condition be simplified or made into a seperate function ?

Input::resolveReproducePath() ?

This will allow the critical code without reproduce unaffected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me know if my latest change is what you were looking for.

@@ -1763,6 +1770,8 @@ bool GnuLdDriver::processReproduceOption(
break;
}

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.

I could not follow this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We cannot just return because we failed to resolve the action. That's how we end up without the input file in the reproduce.

Comment thread lib/LinkerWrapper/GnuLdDriver.cpp
Capture linker scripts and unresolved namespecs when input
activation fails so the reproduce response preserves the original
failure. Avoid applying mapping-file resolution to unmapped
replay namespecs while retaining normal mapped namespec behavior.

Fix: qualcomm#1014

Signed-off-by: Steven Ramirez Rosa <ramirezr@qti.qualcomm.com>
@Steven6798

Copy link
Copy Markdown
Contributor Author

Tests have to be updated after rebasing latest reproduce changes.

@Steven6798

Copy link
Copy Markdown
Contributor Author

check-llvm-test-suite

@github-actions

Copy link
Copy Markdown

LLVM test suite request accepted for d184caa3999014995a0f06dd40d0d492267a9f66. Build and test jobs are starting in this workflow run.

@github-actions

Copy link
Copy Markdown

✅ LLVM test suite passed for d184caa3999014995a0f06dd40d0d492267a9f66. View workflow run.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input files missing in the reproduce tarball when the link fails while reading inputs

4 participants