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

Adjust distribution components style and fix building with PGO #245

Merged

Conversation

nathanchance
Copy link
Member

See the individual commits for the finer details.

I find this a little easier to read and understand.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
… building runtimes

In the instrumented stage of the LLVM build when performing PGO, we set
LLVM_BUILD_RUNTIME to OFF, as recommended by the LLVM documentation:

https://llvm.org/docs/HowToBuildWithPGO.html#building-clang-with-pgo

This breaks adding 'profile' to the distribution components, which was
done in ClangBuiltLinux#243, as shown by the following cmake error:

  $ build-llvm.py \
        --llvm-folder . \
        --pgo kernel-defconfig \
        --projects clang compiler-rt lld \
        --targets X86
  ...
  CMake Error at cmake/modules/LLVMDistributionSupport.cmake:276 (message):
    Specified distribution component 'profile' doesn't have an install target
  Call Stack (most recent call first):
    CMakeLists.txt:1340 (llvm_distribution_add_targets)

  CMake Error at cmake/modules/LLVMDistributionSupport.cmake:284 (message):
    Specified distribution component 'profile' doesn't have an install-stripped
    target.  Its installation target creation should be changed to use
    add_llvm_install_targets, or you should manually create the
    'install-profile-stripped' target.
  Call Stack (most recent call first):
    CMakeLists.txt:1340 (llvm_distribution_add_targets)

compiler-rt is only included when LLVM_BUILD_RUNTIME is ON, so don't
include the 'llvm-profdata' and 'profile' targets when
LLVM_BUILD_RUNTIME is OFF.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance nathanchance merged commit 203b23e into ClangBuiltLinux:main Oct 3, 2023
6 checks passed
@nathanchance nathanchance deleted the update-distribution-components branch October 3, 2023 21:32
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.

2 participants