Steve,
Sorry for slow responses, I'm on vacation, so checking my mail not frequently.
1. You need to apply only patches starting with LLVM number that you build (i.e. only 5_0_* patches). Usually we report the bugs to LLVM community and they are fixed in later versions, but they may be late for already release versions.
2. Your analysis is correct, LLVM removed dump() from release version in LLVM 5.0. We use it for debugging. If you look at our build scripts (alloy.py), you'll find the following function, which deals with it:
# ISPC uses LLVM dumps for debug output, so build correctly it requires these functions to be
# present in LLVM libraries. In LLVM 5.0 they are not there by default and require explicit enabling.
# In later version this functionality is triggered by enabling assertions.
def get_llvm_enable_dump_switch(version_LLVM):
if version_LLVM in ["3_2", "3_3", "3_4", "3_5", "3_6", "3_7", "3_8", "3_9", "4_0"]:
return ""
elif version_LLVM == "5_0":
return " -DCMAKE_C_FLAGS=-DLLVM_ENABLE_DUMP -DCMAKE_CXX_FLAGS=-DLLVM_ENABLE_DUMP "
else:
return " -DLLVM_ENABLE_DUMP=ON "
So you may use the same approach (these are CMake switches). Or you may just use our build scripts.
For the pull request with your changes - I'm not sure if specifying triple for cross-OS compilation makes sense if it's not universally usable and I'm not sure if we can make it universal. But submitting a how-to to our wiki is definitely would be very useful, as cross compilation questions pop up regularly.
Dmitry.