This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Replace clang binary if using clang-bolt target
ClosedPublic

Authored by Amir on Dec 6 2022, 1:22 PM.

Details

Summary

Instead of creating an extra clang-bolt binary and clang++-bolt symlink,
replace the original clang binary with BOLT-optimized one.

This fixes the issue with installing optimized binary as install-clang
target now copies the new version.

Diff Detail

Event Timeline

Amir created this revision.Dec 6 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 1:22 PM
Amir requested review of this revision.Dec 6 2022, 1:22 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 6 2022, 1:22 PM
phosek added inline comments.Jan 26 2023, 1:16 AM
clang/CMakeLists.txt
958

We should consider placing this and all other intermediate outputs in ${CMAKE_CURRENT_BINARY_DIR}.

965

This makes assumptions about the name of the binary which is chosen by CMake and can in theory change. Can you try to use generator expression instead?

Amir updated this revision to Diff 492638.Jan 26 2023, 8:47 PM

Use generator expression, put clang-bolt temp binary to CMAKE_CURRENT_BINARY_DIR

phosek accepted this revision.Jan 27 2023, 12:02 AM

LGTM

This revision is now accepted and ready to land.Jan 27 2023, 12:02 AM
This revision was automatically updated to reflect the committed changes.