Skip to content

llvm-core 19.1.7 #24317

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 40 commits into from
Mar 27, 2025
Merged

llvm-core 19.1.7 #24317

merged 40 commits into from
Mar 27, 2025

Conversation

planetmarshall
Copy link
Contributor

@planetmarshall planetmarshall commented Jun 13, 2024

Summary

Changes to recipe: llvm-core/19.1.7

Depends on #22997

Motivation

Add The latest LLVM release

Details


@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@planetmarshall planetmarshall changed the title llvm-core 18.1.7 llvm-core 19.1.0 Sep 30, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Hooks produced the following warnings for commit 5d75052
llvm-core/19.1.0@#a45fb0c3ae4a7a65121f822e088e1c9f
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/test/tools/dsymutil/Inputs/bar-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/bar-relink-variant.dylib.yml' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/foo-relink-variant.dylib.yml' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/images/06-extension-spill-sgpr-to-static-vpgr-lane.example.frame.1.png' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@planetmarshall planetmarshall force-pushed the llvm-core-18.1 branch 2 times, most recently from 68959cf to fb68722 Compare October 4, 2024 22:46
@planetmarshall planetmarshall changed the title llvm-core 19.1.0 llvm-core 19.1.1 Oct 4, 2024
@planetmarshall planetmarshall marked this pull request as ready for review October 4, 2024 22:49
@conan-center-bot

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 5, 2024

Hooks produced the following warnings for commit fb68722
llvm-core/19.1.1@#9a372edc7a3f021f8cb4a83c23f67ad7
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/test/tools/dsymutil/Inputs/bar-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/bar-relink-variant.dylib.yml' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/test/tools/dsymutil/Inputs/foo-relink-variant.dylib.dSYM/Contents/Resources/Relocations/aarch64/foo-relink-variant.dylib.yml' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_source(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './llvm-main/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/images/06-extension-spill-sgpr-to-static-vpgr-lane.example.frame.1.png' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@planetmarshall planetmarshall changed the title llvm-core 19.1.1 llvm-core 19.1.2 Oct 20, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Warning

Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement.

Failure in build 17 (bec58e00cde1d7480742beaf3abcf8d46efb0654):

  • llvm-core/12.0.0:
    Didn't run or was cancelled before finishing

  • llvm-core/11.1.0:
    CI failed to create some packages (All logs)

    Logs for packageID b41c4aed2576e316288ae1e922d2e7ba1adb404e:
    [settings]
    arch=x86_64
    build_type=Debug
    compiler=Visual Studio
    compiler.runtime=MDd
    compiler.version=16
    os=Windows
    [options]
    llvm-core:shared=False
    
    [...]
    Call Stack (most recent call first):
      tools/llvm-rc/CMakeLists.txt:8 (tablegen)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning in tools/llvm-special-case-list-fuzzer/CMakeLists.txt:
      The object file directory
    
        C:/J/workspace/prod-v1/bsr@3/112436/bfadf/.conan/data/llvm-core/11.1.0/_/_/build/b41c4aed2576e316288ae1e922d2e7ba1adb404e/build/tools/llvm-special-case-list-fuzzer/CMakeFiles/llvm-special-case-list-fuzzer.dir/./
    
      has 211 characters.  The maximum full path to an object file is 250
      characters (see CMAKE_OBJECT_PATH_MAX).  Object file
    
        __/__/resources/windows_version_resource.rc.res
    
      cannot be safely placed under this directory.  The build may not work
      correctly.
    
    
    CMake Warning in tools/llvm-yaml-numeric-parser-fuzzer/CMakeLists.txt:
      The object file directory
    
        C:/J/workspace/prod-v1/bsr@3/112436/bfadf/.conan/data/llvm-core/11.1.0/_/_/build/b41c4aed2576e316288ae1e922d2e7ba1adb404e/build/tools/llvm-yaml-numeric-parser-fuzzer/CMakeFiles/llvm-yaml-numeric-parser-fuzzer.dir/./
    
      has 215 characters.  The maximum full path to an object file is 250
      characters (see CMAKE_OBJECT_PATH_MAX).  Object file
    
        __/__/resources/windows_version_resource.rc.res
    
      cannot be safely placed under this directory.  The build may not work
      correctly.
    
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        DISABLE_LLVM_LINK_LLVM_DYLIB
    
    
    WARN: **************************************************
    WARN: *** Conan 1 is legacy and on a deprecation path **
    WARN: *********** Please upgrade to Conan 2 ************
    WARN: **************************************************
    WARN: libxml2/2.13.4: requirement zlib/[>=1.2.11 <2] overridden by llvm-core/11.1.0 to zlib/1.3.1 
    llvm-core/11.1.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    llvm-core/11.1.0: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    llvm-core/11.1.0: ERROR: Package 'b41c4aed2576e316288ae1e922d2e7ba1adb404e' build failed
    llvm-core/11.1.0: WARN: Build folder C:\J\workspace\prod-v1\bsr@3\112436\bfadf\.conan\data\llvm-core\11.1.0\_\_\build\b41c4aed2576e316288ae1e922d2e7ba1adb404e\build
    ERROR: llvm-core/11.1.0: Error in build() method, line 400
    	cmake.build()
    	ConanException: Error 1 while executing cmake --build "C:\J\workspace\prod-v1\bsr@3\112436\bfadf\.conan\data\llvm-core\11.1.0\_\_\build\b41c4aed2576e316288ae1e922d2e7ba1adb404e\build" -- -j8
    
  • llvm-core/13.0.0:
    Didn't run or was cancelled before finishing

  • llvm-core/19.1.2:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

Failure in build 17 (bec58e00cde1d7480742beaf3abcf8d46efb0654):

  • llvm-core/19.1.2:
    CI failed to create some packages (All logs)

    Logs for packageID 538751cd46dab0c64c8a64563e268d3f3dbe51c9:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=msvc
    compiler.cppstd=17
    compiler.runtime=dynamic
    compiler.runtime_type=Release
    compiler.version=192
    os=Windows
    [options]
    */*:shared=False
    
    [...]
    -- Conan: Component target declared 'LLVMAArch64CodeGen'
    -- Conan: Component target declared 'LLVMPasses'
    -- Conan: Component target declared 'LLVMARMCodeGen'
    -- Conan: Component target declared 'LLVMMipsCodeGen'
    -- Conan: Component target declared 'LLVMPowerPCCodeGen'
    -- Conan: Component target declared 'LLVMRISCVCodeGen'
    -- Conan: Component target declared 'LLVMX86CodeGen'
    -- Conan: Component target declared 'LLVMAMDGPUCodeGen'
    -- Conan: Component target declared 'LLVMBPFCodeGen'
    -- Conan: Component target declared 'LLVMLTO'
    -- Conan: Component target declared 'LLVMOrcJIT'
    -- Conan: Component target declared 'LLVMOrcDebugging'
    -- Conan: Component target declared 'LLVMOptDriver'
    -- Conan: Component target declared 'LLVM-C'
    -- Conan: Target declared 'llvm-core::llvm-core'
    -- Conan: Target declared 'LibXml2::LibXml2'
    -- Conan: Target declared 'ZLIB::ZLIB'
    -- Conan: Target declared 'Iconv::Iconv'
    -- Conan: Including build module from 'C:/J/workspace/prod-v2/bsr/100285/aafcb/p/libxmce381cedc3c55/p/lib/cmake/conan-official-libxml2-variables.cmake'
    -- Conan: Component target declared 'z3::libz3'
    -- Conan: Component target declared 'zstd::libzstd_static'
    -- Conan: Including build module from 'C:/J/workspace/prod-v2/bsr/100285/aafcb/p/b/llvm-74f4d513bdc2b/p/lib/cmake/llvm/conan-official-llvm-core-variables.cmake'
    -- Conan: Including build module from 'C:/J/workspace/prod-v2/bsr/100285/aafcb/p/b/llvm-74f4d513bdc2b/p/lib/cmake/llvm/LLVM-ConfigInternal.cmake'
    -- Testing LLVM Build Module Variables
    -- LLVM_PACKAGE_VERSION: 19.1.2
    -- LLVM_BUILD_TYPE: Release
    -- LLVM_CMAKE_DIR: C:/J/workspace/prod-v2/bsr/100285/aafcb/p/b/llvm-74f4d513bdc2b/p/lib/cmake/llvm
    -- LLVM_TOOLS_BINARY_DIR: C:/J/workspace/prod-v2/bsr/100285/aafcb/p/b/llvm-74f4d513bdc2b/p/bin
    -- LLVM_ALL_TARGETS: MSP430;Lanai;VE;X86;Sparc;AArch64;Mips;AMDGPU;LoongArch;ARM;Hexagon;XCore;RISCV;PowerPC;BPF;NVPTX;AVR;SystemZ;WebAssembly
    -- LLVM_TARGETS_TO_BUILD: MSP430;Lanai;VE;X86;Sparc;AArch64;Mips;AMDGPU;LoongArch;ARM;Hexagon;XCore;RISCV;PowerPC;BPF;NVPTX;AVR;SystemZ;WebAssembly
    -- LLVM_TARGETS_WITH_JIT: X86;PowerPC;AArch64;ARM;Mips;SystemZ
    -- LLVM_NATIVE_ARCH: X86
    -- Configuring done (4.4s)
    -- Generating done (0.1s)
    -- Build files have been written to: C:/J/workspace/prod-v2/bsr/cci-ed7096af/recipes/llvm-core/all/test_package/build/msvc-192-x86_64-17-release
    
    llvm-core/19.1.2 (test package): Running CMake.build()
    llvm-core/19.1.2 (test package): RUN: cmake --build "C:\J\workspace\prod-v2\bsr\cci-ed7096af\recipes\llvm-core\all\test_package\build\msvc-192-x86_64-17-release" --config Release
    Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.
    
      1>Checking Build System
      Building Custom Rule C:/J/workspace/prod-v2/bsr/cci-ed7096af/recipes/llvm-core/all/test_package/CMakeLists.txt
      test_package.cpp
    LLVMSupport.lib(ErrorHandling.cpp.obj) : error LNK2019: unresolved external symbol __imp_RtlGetLastNtStatus referenced in function "class std::error_code __cdecl llvm::mapLastWindowsError(void)" (?mapLastWindowsError@llvm@@YA?AVerror_code@std@@XZ) [C:\J\workspace\prod-v2\bsr\cci-ed7096af\recipes\llvm-core\all\test_package\build\msvc-192-x86_64-17-release\test_package.vcxproj]
    C:\J\workspace\prod-v2\bsr\cci-ed7096af\recipes\llvm-core\all\test_package\build\msvc-192-x86_64-17-release\Release\test_package.exe : fatal error LNK1120: 1 unresolved externals [C:\J\workspace\prod-v2\bsr\cci-ed7096af\recipes\llvm-core\all\test_package\build\msvc-192-x86_64-17-release\test_package.vcxproj]
    
    ERROR: llvm-core/19.1.2 (test package): Error in build() method, line 37
    	cmake.build()
    	ConanException: Error 1 while executing
    
  • llvm-core/11.1.0:
    Built 5 packages out of 10 (All logs)

  • llvm-core/13.0.0:
    Built 5 packages out of 10 (All logs)

  • llvm-core/12.0.0:
    Built 5 packages out of 10 (All logs)


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@planetmarshall planetmarshall changed the title llvm-core 19.1.2 llvm-core 19.1.6 Jan 3, 2025
@jcar87 jcar87 removed the Failed label Jan 14, 2025
@planetmarshall planetmarshall force-pushed the llvm-core-18.1 branch 2 times, most recently from 7663daa to c235c3e Compare January 26, 2025 13:13
@planetmarshall planetmarshall changed the title llvm-core 19.1.6 llvm-core 19.1.7 Jan 26, 2025
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

@planetmarshall Thank you for your PR, updating the llvm-core project.

I see this is not a simple bump version, but has several changes and misses details about the motivation behind these changes. Could please add more details, as this recipe is really complex and hard to maintain? Thank you!

Comment on lines 9 to 11
"third-party":
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/third-party-19.1.7.src.tar.xz
sha256: b96deca1d3097c7ffd4ff2bb904a50bdd56bec7ed1413ffb0d1d01af87b72c12
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"third-party":
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/third-party-19.1.7.src.tar.xz
sha256: b96deca1d3097c7ffd4ff2bb904a50bdd56bec7ed1413ffb0d1d01af87b72c12

What is the case needed third-party? It only contains unittest and benchmark folders. Both are unrelated when consuming or packaging the project in most cases. The benchmark headers can be disabled by using the CMake definitions LLVM_INCLUDE_BENCHMARKS=False

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@@ -52,13 +53,75 @@
"XCore"
}

def components_from_dotfile(dotfile):
Copy link
Member

Choose a reason for hiding this comment

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

Why is it required only now? I saw your feature request in Conan client for Dot (Graphviz), still, this is a bit complex to maintain, so I would avoid it if possible. Boost is a good example of how opaque the recipe becomes after receiving customizations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See this comment from #22997 for the context behind this decision.

In summary, parsing CMake Graphviz output was how the original (Conan 1.x) LLVM recipe generated component dependencies - I removed this in favour of parsing CMake output, however in the above referenced comment it was suggested that Graphviz was the "least-worst" option, so I've added it back in here.

Copy link
Member

Choose a reason for hiding this comment

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

Could you please add more detailed comments in the recipe, including the method description, and what is happening in the key steps? As I commented before, it not only increases the recipe's complexity but also makes its maintenance harder. More information will be welcome to understand it in future PRs.

@@ -137,6 +211,11 @@ def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
del self.options.with_libedit # not supported on windows
if Version(self.version) < 18:
Copy link
Member

Choose a reason for hiding this comment

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

Do you have a reference about zstd inclusion? Could please add a comment in the recipe, I did not find a reference in https://releases.llvm.org/18.1.0/projects/libcxx/docs/ReleaseNotes/18.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not explicit in the release notes. It's available since LLVM 15 - see https://reviews.llvm.org/D128465

Comment on lines 360 to 363
if is_msvc(self):
# https://discourse.llvm.org/t/failing-to-compile-llvm-on-windows-with-clang
cmake_variables["MSVC"] = True

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if is_msvc(self):
# https://discourse.llvm.org/t/failing-to-compile-llvm-on-windows-with-clang
cmake_variables["MSVC"] = True

I would not enforce this native cmake variable. Using clang on Windows has several flavours, msvc is only one case: https://blog.conan.io/2022/10/13/Different-flavors-Clang-compiler-Windows.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed. This was fixed in llvm/llvm-project#95505

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

@planetmarshall Thank you for keeping this PR, I saw your last changes and CI is passing again. Still, I have some comments.

Comment on lines 285 to 289
if Version(self.version) < 18:
get(self, **sources, strip_root=True)
else:
get(self, **sources["llvm"], destination='llvm-main', strip_root=True)
get(self, **sources["cmake"], destination='cmake', strip_root=True)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if Version(self.version) < 18:
get(self, **sources, strip_root=True)
else:
get(self, **sources["llvm"], destination='llvm-main', strip_root=True)
get(self, **sources["cmake"], destination='cmake', strip_root=True)
if Version(self.version) < 15:
get(self, **sources, strip_root=True)
else:
# LLVM >=15 split up several components in its release, including cmake
get(self, **sources["llvm"], destination='llvm-main', strip_root=True)
get(self, **sources["cmake"], destination='cmake', strip_root=True)

@@ -231,6 +318,7 @@ def generate(self):
tc = CMakeToolchain(self, generator="Ninja")
# https://releases.llvm.org/12.0.0/docs/CMake.html
# https://releases.llvm.org/13.0.0/docs/CMake.html
# https://releases.llvm.org/19.1.1/docs/CMake.html
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# https://releases.llvm.org/19.1.1/docs/CMake.html
# https://releases.llvm.org/19.1.0/docs/CMake.html

Other patch versions has no online documentation, they will return HTTP 404.

@@ -52,13 +53,75 @@
"XCore"
}

def components_from_dotfile(dotfile):
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add more detailed comments in the recipe, including the method description, and what is happening in the key steps? As I commented before, it not only increases the recipe's complexity but also makes its maintenance harder. More information will be welcome to understand it in future PRs.

Copy link
Member

Choose a reason for hiding this comment

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

In case needing to touch those patches because CMakeDeps.set_property was not able to fit the expected native names by llvm, then I would avoid using it. My intention was to avoid patching anything, using CMakeDeps to match what is expected by llvm project without using any patch.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

AS this PR has several changes, I did a diff between the package llvm-core/13.0.0 in Conan Center and the produced by this PR:

llvm-core-13.0.0.diff.txt

The artifacts are still there, no missing library/header. Some configuration changed, or just moved the position, which is fine IMO.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

@planetmarshall THank you for updating this recipe, it's more clear now how the dot file is working to list llvm dependencies.

It took a while to be reviewed, most because this recipe not updates a version, but also changes the way of processing the llvm dependencies. Please, consider doing separated PRs in the future, when having more than one topic in the changes, so it may be faster to have merged. Regards!

@jcar87
Copy link
Contributor

jcar87 commented Mar 27, 2025

Merging this as to not delay this any further - but I don't understand why PurePosixPath is being used compared to what it was before, for example here:

    def _package_folder_path(self):
        return PurePosixPath(self.package_folder)

Please sympathise with the fact that we have a high volume of pull requests to review. This recipe is bringing back an implementation that was removed here #22997 - and both versions of this implementation are far from trivial and difficult to review.

I would very strongly advise that if there is any sense of urgency in merging a PR, to limit the scope of the changes to only what's necessary to achieve the goal of the PR (e.g. adding the new version) - and if there are changes that are not trivial to a casual reviewer (e.g PosixPath), please explain them. We tend to limit the use of "pure python" imports to make sure recipes remain compatible irrespective of version of Python.

@jcar87 jcar87 merged commit f932e28 into conan-io:master Mar 27, 2025
9 checks passed
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.

4 participants