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

Commits on Sep 24, 2023

  1. tc_build: llvm: Use a separate list variable for distribution components

    I find this a little easier to read and understand.
    
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    nathanchance committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    0c91f4d View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. tc_build: llvm: Only add llvm-profdata and profile to components when…

    … 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 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    2711ccd View commit details
    Browse the repository at this point in the history