Skip to content

Teach check-incremental about -emit-empty-object-file (which disables incremental LLVM codegen, so don't check timestamps if present) #76941

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

kubamracek
Copy link
Contributor

To resolve this ongoing CI build failure: https://ci.swift.org/job/oss-swift_tools-R_stdlib-RD_test-simulator/6524/

...where we are failing a build incrementality check. Given that the embedded _Concurrency.o is an empty object file, it seems like the simplest solution is to just silence the incremental check via -Xfrontend -disable-incremental-llvm-codegen.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@eeckstein
Copy link
Contributor

Do we know what's the underlying problem?

@kubamracek
Copy link
Contributor Author

Do we know what's the underlying problem?

My understanding is this: The incremental "avoid re-generating a .o file if the IR is the same" logic is based on a magic global in a magic section (__LLVM,__swift_modhash) and in the -emit-empty-object-file mode we just don't generate this symbol (because that would make the IR module non-empty).

… incremental LLVM codegen, so don't check timestamps if present)
@kubamracek kubamracek force-pushed the embedded-concurrency-no-incremental branch from ba995dd to 2e4e196 Compare October 10, 2024 16:30
@kubamracek kubamracek changed the title [embedded] When building embedded _Concurrency.o, disable incremental LLVM codegen Teach check-incremental about -emit-empty-object-file (which disables incremental LLVM codegen, so don't check timestamps if present) Oct 10, 2024
Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm!

@kubamracek
Copy link
Contributor Author

Changed the approach here a bit: Instead, check-incremental now knows about the -emit-empty-object-file flag. Result should be equivalent to the previous approach.

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

@swift-ci please test macOS platform

@kubamracek kubamracek enabled auto-merge October 11, 2024 05:18
@kubamracek kubamracek merged commit 087676d into swiftlang:main Oct 11, 2024
4 of 5 checks passed
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.

3 participants