Skip to content

Only use PGO data if clang can read it #114005

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
merged 2 commits into from
Mar 28, 2025
Merged

Only use PGO data if clang can read it #114005

merged 2 commits into from
Mar 28, 2025

Conversation

akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Mar 28, 2025

Fixes the Codespaces prebuild.
Fixes #34649

Contributes to #34649 and fixes the Codespaces prebuild.
@Copilot Copilot AI review requested due to automatic review settings March 28, 2025 09:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/coreclr/pgosupport.cmake: Language not supported

@akoeplinger akoeplinger changed the title Only use PGO data on recent enough clang Only use PGO data if clang can read it Mar 28, 2025
message(WARNING "PGO is not supported; Clang 16 or later is required for profile guided optimizations")
endif((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16))
else(HAVE_LTO_AND_PGO_DATA_SUPPORTED)
message(WARNING "LTO is not supported or PGO optimization data not compatible, skipping profile guided optimizations for ${TargetName}")
Copy link
Member

Choose a reason for hiding this comment

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

If we pass msbuild's OfficialBuildId != '' to cmake as CLR_IS_OFFICIAL_BUILD e.g., then we can use it to error out to make the problem visible (probably we don't want it to slip through unnoticed).

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea, but that is also set for source-build and afaik they can't use our PGO packages so we shouldn't error in that case. I'd do that in a separate PR.

@akoeplinger akoeplinger requested a review from LoopedBard3 March 28, 2025 17:05
@akoeplinger
Copy link
Member Author

/ba-g azurelinux timeouts are unrelated

@akoeplinger akoeplinger merged commit cef21d2 into main Mar 28, 2025
94 of 96 checks passed
@akoeplinger akoeplinger deleted the akoeplinger-patch-2 branch March 28, 2025 18:04
thaystg pushed a commit to thaystg/runtime that referenced this pull request Apr 1, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Build failing on tip : "./build.sh --subsetCategory CoreCLR -c Release -arch x64"
3 participants