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

Compiler detection: Cache compiler hash #42994

Merged
merged 4 commits into from
Jan 16, 2025

Conversation

autoantwort
Copy link
Contributor

@autoantwort autoantwort commented Dec 30, 2024

Implements microsoft/vcpkg-tool#362 (comment)
Speeds up the compiler hashing if the compiler file is large like on macOS (250 MB for cc and c++ each)
image

@Mengna-Li Mengna-Li added the category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly label Dec 30, 2024
@Mengna-Li Mengna-Li added the info:reviewed Pull Request changes follow basic guidelines label Jan 2, 2025
@JavierMatosD JavierMatosD added the requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look. label Jan 3, 2025
set(${out_var} "${HASH}" PARENT_SCOPE)
endfunction()

if(VCPKG_COMPILER_CACHE_FILE)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be

Suggested change
if(VCPKG_COMPILER_CACHE_FILE)
if(DEFINED VCPKG_COMPILER_CACHE_FILE)

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The variable is passed to this port by -DVCPKG_COMPILER_CACHE_FILE=${VCPKG_COMPILER_CACHE_FILE}, but if an "old" vcpkg-tool is used the variable is not defined in the portfile and an empty variable gets defined.

Copy link
Member

Choose a reason for hiding this comment

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

What defines the empty value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BillyONeal BillyONeal merged commit 96dbba1 into microsoft:master Jan 16, 2025
17 checks passed
@BillyONeal
Copy link
Member

Thanks!

@autoantwort autoantwort deleted the feature/cache-compiler-hash branch January 17, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly info:reviewed Pull Request changes follow basic guidelines requires:vcpkg-team-review This PR or issue requires someone on the vcpkg team to take a further look.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants