Closed Vexu closed 1 year ago
Upstreams definitions are here: https://github.com/Kitware/CMake/blob/master/Modules/CMakeDetermineRCCompiler.cmake
CMake debugging commands are these:
# Debugging
# --trace, --trace-expand, --debug-output
# run cmake with -LH to get all variables printed after configuration.
# function(PRINT_VAR VARNAME)
# message(STATUS "${VARNAME}: ${${VARNAME}}")
# endfunction()
# PRINT_VAR("CMAKE_CXX_COMPILER")
# cmake -P to run a single script
You could either use some of the debugging commands or "printf" on the module code.
I updated my system and pulled the latest changes and was able to build LLVM using system C++ compiler, stage1, stage2 and then failing stage3 with:
[100%] Building stage3
error(compilation): clang failed with stderr: zig-bootstrap/zig/src/stage1/codegen.cpp:4838:17: error: use of undeclared identifier 'LLVMPointerTypeInContext'
zig-bootstrap/zig/src/stage1/codegen.cpp:5183:17: error: use of undeclared identifier 'LLVMPointerTypeInContext'
This looks exactly like https://github.com/ziglang/zig/issues/12888, which was fixed in some later Zig commit https://github.com/ziglang/zig/pull/12898 (0b47e69).
I had that commit patched separately but then also accidentally reverted it in a merge conflict. With the revert reverted it now builds stage3 successfully. I'll let the build run and close when it succeeds.
I tried to build Windows tarball for https://github.com/ziglang/zig/issues/12994 but got
I fixed this with
but I'm not sure how correct that is.
I ran into #127 which I was able to fix by applying https://github.com/ziglang/zig/pull/12898 after which I ran into: