-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[BOLT] [Profile] Compile error when building llvm with bolt on Windows systems #73006
Labels
Comments
gz83
changed the title
[BOLT] [Passes] [Profile] Compile error when building llvm with bolt on Windows systems
[BOLT] [Profile] Compile error when building llvm with bolt on Windows systems
Nov 21, 2023
gz83
added a commit
to gz83/llvm-project
that referenced
this issue
Nov 22, 2023
Fix build issue on Windows. issue:llvm#73006
Zentrik
added a commit
to Zentrik/Yggdrasil
that referenced
this issue
Mar 30, 2024
In the discord, I see someone built on FreeBSD and seems to build on windows here: llvm/llvm-project#73085. I haven't tested locally, as this takes hours to build for me. Might need a patch for windows: llvm/llvm-project#73006.
giordano
added a commit
to JuliaPackaging/Yggdrasil
that referenced
this issue
Apr 17, 2024
* Add BOLT to LLVM_full Tested locally with x86_64-linux-gnu-cxx11. * Build BOLT on all platforms In the discord, I see someone built on FreeBSD and seems to build on windows here: llvm/llvm-project#73085. I haven't tested locally, as this takes hours to build for me. Might need a patch for windows: llvm/llvm-project#73006. * Fix typo * Build Bolt on >= LLVM 14 Not sure why the code in common.jl uses `-gt` so much. * Don't build on LLVM 14.0.5 Seems like you cannot build on it and it shouldn't even exist in Yggdrasil. * Only build on LLVM >= 16 * Patch for ambiguity in `timespec` on FreeBSD builder * Backport fix to windows install * Disable building runtime library on windows Presumably this also prevents it being built on FreeBSD but according to https://reviews.llvm.org/D148742 it's not supported anyways. * Revert "Patch for ambiguity in `timespec` on FreeBSD builder" FreeBSD fails even with this patch and we've disabled building runtime as it's not supported. So this patch is useless. This reverts commit 9aa1a07. * Fix windows install patch * Trigger remaining builds * Only build BOLT on supported arches and OS Not sure if there's a better approach. I don't know if calling build_tarballs twice will cause problems. * Fix build script for assert build * Fix typo * Build BOLT separately from LLVM * Disable i686 build Cross compilation for it seems to be broken, llvm/llvm-project#84547. * Only build and install bolt binaries + libraries Cuts tarball size from ~400 mb to 32mb. Untarred llvm-bolt and llvm-bolt-heatmap are both 42mb and 99% of size. * Enable building bolt runtime and clean up script * Set Julia Compat to v1.6 Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> * Add all the binaries to the products Might as well, won't be hard to adjust if they are removed at some point. * Clarify comment * Format * Bump to 18.1.4 --------- Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The compilation parameters used:
cmake -G "Ninja" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-O2 -DNDEBUG -W4 /Gw /Gy" -DCMAKE_CXX_FLAGS="-O2 -DNDEBUG -W4 /Gw /Gy" -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -Wl,-z,keep-text-section-prefix -pthread -W4 -Wl,-O2 -Wl,--gc-sections" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld -Wl,-z,keep-text-section-prefix -pthread -W4 -Wl,-O2 -Wl,--gc-sections" -DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=lld -Wl,-z,keep-text-section-prefix -pthread -W4 -Wl,-O2 -Wl,--gc-sections" -DLLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra;polly;bolt" -DLLVM_ENABLE_RUNTIMES="compiler-rt" -DZLIB_LIBRARY="D:/llvm-build-tools/zlib/libz-static.lib" -DZLIB_INCLUDE_DIR="D:/llvm-build-tools/zlib" -DLIBXML2_LIBRARY="D:/llvm-build-tools/libxml2/libxml2.lib" -DLIBXML2_INCLUDE_DIR="D:/llvm-build-tools/libxml2" -DLLVM_INTEGRATED_CRT_ALLOC="D:/llvm-build-tools/mimalloc/mimalloc-static.lib" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_UNWIND_TABLES=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_ENABLE_Z3_SOLVER=OFF -DCLANG_PLUGIN_SUPPORT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DCLANG_ENABLE_ARCMT=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DLLVM_ENABLE_CURL=OFF -DLIBCLANG_BUILD_STATIC=ON -DLLVM_ENABLE_PIC=ON -DLLVM_ENABLE_ASSERTIONS=OFF ..\llvm\
Build with the
ninja all -j24
commandSpecific error messages
[3515/4854] Building CXX object tools\bolt\lib\Profile\CMakeFiles\LLVMBOLTProfile.dir\YAMLProfileReader.cpp.obj FAILED: tools/bolt/lib/Profile/CMakeFiles/LLVMBOLTProfile.dir/YAMLProfileReader.cpp.obj C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1439~1.332\bin\Hostx64\x64\cl.exe /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\Work\llvm-project\build\tools\bolt\lib\Profile -ID:\Work\llvm-project\bolt\lib\Profile -ID:\Work\llvm-project\build\include -ID:\Work\llvm-project\llvm\include -ID:\Work\llvm-project\bolt\include -ID:\Work\llvm-project\build\tools\bolt\include -O2 -DNDEBUG -W4 /Gw /Gy /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -std:c++17 -MT /EHs-c- /GR- /showIncludes /Fotools\bolt\lib\Profile\CMakeFiles\LLVMBOLTProfile.dir\YAMLProfileReader.cpp.obj /Fdtools\bolt\lib\Profile\CMakeFiles\LLVMBOLTProfile.dir\LLVMBOLTProfile.pdb /FS -c D:\Work\llvm-project\bolt\lib\Profile\YAMLProfileReader.cpp D:\Work\llvm-project\bolt\lib\Profile\YAMLProfileReader.cpp(357): error C2440: 'initializing': cannot convert from 'const ValueTy' to '_Ty2 &&' with [ ValueTy=std::vector<llvm::yaml::bolt::BinaryFunctionProfile *,std::allocator<llvm::yaml::bolt::BinaryFunctionProfile *>> ] and [ _Ty2=std::vector<llvm::yaml::bolt::BinaryFunctionProfile *,std::allocator<llvm::yaml::bolt::BinaryFunctionProfile *>> ]
Revision used when compiling: commit f85e7ab
The text was updated successfully, but these errors were encountered: