Skip to content

Cherry-pick https://github.com/swiftlang/llvm-project/pull/9164 to stable/20240723 #9189

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

Merged

Conversation

rastogishubham
Copy link

When clang caching and MCCAS are enabled, on a cache miss, the object file is not written to in MachOCASWriter, instead the replay code is rerun and the object file is serialized and written out. However, in swift, the replay code isn't run on a cache miss at all, and it expects the object writer to write to the object file.

This patch makes it so that on a cache miss, the MachOCASWriter always writes to the raw_ostream buffer for the object file and doesn't serialize the object file in the replay code.

(cherry picked from commit ce65bfa)

When clang caching and MCCAS are enabled, on a cache miss, the object
file is not written to in MachOCASWriter, instead the replay code is
rerun and the object file is serialized and written out. However, in
swift, the replay code isn't run on a cache miss at all, and it expects
the object writer to write to the object file.

This patch makes it so that on a cache miss, the MachOCASWriter always
writes to the raw_ostream buffer for the object file and doesn't
serialize the object file in the replay code.

(cherry picked from commit ce65bfa)
@rastogishubham rastogishubham changed the title Swift MCCAS object files are 0 bytes on cache miss Cherry-pick https://github.com/swiftlang/llvm-project/pull/9164 to stable/20240723 Aug 28, 2024
@rastogishubham
Copy link
Author

@swift-ci please test llvm

@rastogishubham rastogishubham merged commit d8be3b1 into swiftlang:stable/20240723 Aug 28, 2024
2 checks passed
@rastogishubham rastogishubham deleted the FixReplayStable2024 branch August 28, 2024 04:39
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.

1 participant