1DOLLY 72TOOLCHAIN llvm-build3REQUIRES HOST runtime@04REQUIRES HOST display@05REQUIRES HOST download@06REQUIRES HOST dso@07REQUIRES HOST http@08REQUIRES HOST input@09REQUIRES HOST sockets@010REQUIRES HOST upload@01112# Build-only: the libraries of Clang, LLD and the WebAssembly backend that the13# seed compiler links, compiled inside Dolly by its own c++.14FROM /v0.1.2/demos/llvm/Dollyfile-llvm-tablegen e47b66b1a2449028e7de02a8ff5974585ef34f990beba18515b4cad7ef8ba7a415REQUIRES TOOL llvm-tblgen16REQUIRES TOOL clang-tblgen17REQUIRES TOOL cmake18REQUIRES TOOL make19REQUIRES TOOL python20REQUIRES TOOL cc21REQUIRES TOOL c++22REQUIRES TOOL ar23REQUIRES TOOL gzip24REQUIRES TOOL tar25REQUIRES TOOL patch26REQUIRES TOOL time27REQUIRES TOOL find28REQUIRES TOOL cp29REQUIRES TOOL mkdir30REQUIRES TOOL rm3132SOURCE /v0.1.2/dist/static/llvm/llvm-project.tar.gz 033390c4520e51f261eb7572f0a1b4a1592121a1c8c1fc0c3db4845b079a8882 /tmp/llvm-project.tar.gz33SLOP time slop -c 'gzip -dc /tmp/llvm-project.tar.gz | tar -xf - -C /'34SLOP rm /tmp/llvm-project.tar.gz35SOURCE /v0.1.2/dist/static/llvm/llvm-host-triple.patch ec739fd5932c1040d07344a8511bae4da4157ff2bcafa348f06a555b71a10981 /tmp/llvm-host-triple.patch36SLOP patch -p1 -d /tmp/llvm-project -i /tmp/llvm-host-triple.patch3738# Configured as llvm-tablegen is, and further:39# - A snapshot keeps no file times, so its Make tree cannot continue here: the40#   TableGen tools it kept run again, as the seed's native ones do.41# - The staged tree has no .git; the seed's revision is given.42# - Clang's headers define CLANG_ABI for ELF, Mach-O, Windows and Emscripten;43#   CLANG_BUILD_STATIC is their configuration for archives only.44# - LLVM's warning set includes -Wimplicit-fallthrough, whose visitor recurses45#   once per case label: SemaARM.cpp has 6,020 in a row, 1.4 MB of browser46#   stack where Chrome gives a process 950 KB.47FILE /usr/lib/llvm-build/Dolly.cmake48    set(CMAKE_BUILD_TYPE Release CACHE STRING "")49    set(CMAKE_C_FLAGS "-std=gnu17" CACHE STRING "")50    set(CMAKE_CXX_FLAGS "-include endian.h -DCLANG_BUILD_STATIC" CACHE STRING "")51    set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON CACHE BOOL "")52    set(CMAKE_RULE_MESSAGES OFF CACHE BOOL "")53    set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "")54    set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "")55    set(LLVM_TARGETS_TO_BUILD WebAssembly CACHE STRING "")56    set(LLVM_HOST_TRIPLE wasm64-unknown-emscripten CACHE STRING "")57    set(LLVM_DEFAULT_TARGET_TRIPLE wasm64-unknown-emscripten CACHE STRING "")58    set(LLVM_TABLEGEN /usr/bin/llvm-tblgen CACHE STRING "")59    set(CLANG_TABLEGEN /usr/bin/clang-tblgen CACHE STRING "")60    set(LLVM_FORCE_VC_REVISION 4bfd08c2d769736841ae4f5705d76fa6daa39027 CACHE STRING "")61    set(LLVM_FORCE_VC_REPOSITORY https://github.com/llvm/llvm-project.git CACHE STRING "")62    foreach(option THREADS TERMINFO LIBEDIT LIBPFM ZLIB ZSTD LIBXML2 CURL BINDINGS)63      set(LLVM_ENABLE_${option} OFF CACHE STRING "")64    endforeach()65    foreach(option TESTS EXAMPLES BENCHMARKS DOCS)66      set(LLVM_INCLUDE_${option} OFF CACHE BOOL "")67    endforeach()68    set(LLVM_BUILD_LLVM_DYLIB OFF CACHE BOOL "")69    set(LLVM_LINK_LLVM_DYLIB OFF CACHE BOOL "")70SLOP time cmake -C /usr/lib/llvm-build/Dolly.cmake -S /tmp/llvm-project/llvm -B /tmp/llvm-build7172# The seed's targets (scripts/build-toolchain.sh). Four jobs fit the 32-process73# cap; -k reports every failing unit of an hour's build, not only the first.74SLOP CWD /tmp/llvm-build time make -k -j4 clangFrontendTool clangCodeGen clang-resource-headers lldWasm LLVMWebAssemblyCodeGen75# The archives, Clang's resource directory, and the configured and generated76# headers a program including LLVM, Clang or LLD needs, by build-tree path.77SLOP CWD /tmp/llvm-build slop -c 'mkdir -p /usr/lib/llvm-build/lib && cp lib/*.a /usr/lib/llvm-build/lib && cp -R lib/clang /usr/lib/llvm-build/lib'78SLOP CWD /tmp/llvm-build slop -c 'for f in $(find include tools/clang/include tools/lld/include -name CMakeFiles -prune -o -type f \( -name "*.inc" -o -name "*.def" -o -name "*.h" \) -print); do mkdir -p "/usr/lib/llvm-build/${f%/*}"; cp "$f" "/usr/lib/llvm-build/$f"; done'7980FOLDER /usr/lib/llvm-build8182ENTRY /bin/foreground -i /bin/slop83