Skip to content

[build-script] Add a flag for sccache #34133

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

porglezomp
Copy link
Contributor

This adds a flag to enable sccache in order to simplify the build-script invocation, particularly for new contributors.

The implementation is based on the implementation of the --distcc flag.
CC @gottesmm

This adds a flag to enable sccache in order to simplify the build-script
invocation, particularly for new contributors.
Copy link
Member

@shahmishal shahmishal 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 doing this!

@shahmishal
Copy link
Member

@swift-ci Python lint

@gottesmm
Copy link
Contributor

Thanks!

@shahmishal
Copy link
Member

@swift-ci Python lint

@shahmishal
Copy link
Member

@swift-ci smoke test

@varungandhi-apple
Copy link
Contributor

varungandhi-apple commented Oct 1, 2020

Maybe I'm missing something in the PR, but what part of the code is finding the path to sccache and setting toolchain.sccache to that path?

@porglezomp
Copy link
Contributor Author

The toolchains do a generic lazy lookup for tools, so this just adds this line that makes it eligible:

_register("sccache", "sccache")

@shahmishal
Copy link
Member

@swift-ci smoke test

@varungandhi-apple
Copy link
Contributor

Potential addition: Should this be checking if sccache's server is not on, and turn it on if that's not the case?

@porglezomp
Copy link
Contributor Author

According to the sccache README, that shouldn't be necessary:

The sccache command will spawn a server process if one is not already running

@varungandhi-apple
Copy link
Contributor

Nice, I didn't realize that. We could get rid of the --start-server in the Getting Started guide then.

@edymtt
Copy link
Contributor

edymtt commented Oct 2, 2020

@swift-ci please smoke test

@shahmishal
Copy link
Member

@swift-ci python lint

@shahmishal
Copy link
Member

00:03:20.173 ./utils/swift_build_support/tests/test_cmake.py:135:13: E128 continuation line under-indented for visual indent

@edymtt
Copy link
Contributor

edymtt commented Oct 2, 2020

@swift-ci please smoke test

@edymtt
Copy link
Contributor

edymtt commented Oct 2, 2020

@swift-ci python lint

@edymtt
Copy link
Contributor

edymtt commented Oct 2, 2020

@swift-ci please smoke test

@edymtt
Copy link
Contributor

edymtt commented Oct 5, 2020

@swift-ci please test Windows

@shahmishal
Copy link
Member

@swift-ci test windows

@shahmishal shahmishal merged commit 161899d into swiftlang:main Oct 5, 2020
@porglezomp porglezomp deleted the twist-it-bop-it-sccache-it branch October 5, 2020 18:17
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.

6 participants