Skip to content

Conversation

@Rutpiv
Copy link
Contributor

@Rutpiv Rutpiv commented Dec 29, 2025

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture (x86_64)

@Rutpiv
Copy link
Contributor Author

Rutpiv commented Dec 29, 2025

The build fails when llvm18 is built with LTO enabled (-o lto), as pointed out by @JkktBkkt:
#58276 (comment)

This fails to build if llvm18 has been built with -o lto, solution is simple — rebuild llvm18 with -o ~lto.

I reproduced this locally by rebuilding llvm18 with LTO enabled. The failure is caused by an unresolved llvm::demangle symbol during linking. Even when ImHex is built with IMHEX_ENABLE_LTO, the demangle object is not pulled in when linking against system LLVM built with LTO.

This PR adds a small CMake adjustment to explicitly handle the demangle linkage when both IMHEX_ENABLE_LTO and USE_SYSTEM_LLVM are enabled. With this change, ImHex builds correctly against llvm18 built with LTO, without requiring rebuilding LLVM with ~lto.

Please let me know if there’s a more idiomatic way to handle this in CMake.

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.

1 participant