Skip to content

Instantly share code, notes, and snippets.

@sztomi
Created November 6, 2023 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sztomi/ff051599cf318cb72eff91b01f86a343 to your computer and use it in GitHub Desktop.
Save sztomi/ff051599cf318cb72eff91b01f86a343 to your computer and use it in GitHub Desktop.
clang-bootstrap cmake defs
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_X86_RELAX_RELOCATIONS=ON',
'-DCLANG_DEFAULT_CXX_STDLIB=libc++',
'-DCLANG_DEFAULT_LINKER=lld',
'-DCLANG_DEFAULT_OBJCOPY=llvm-objcopy',
'-DCLANG_DEFAULT_RTLIB=compiler-rt',
'-DCLANG_DEFAULT_UNWINDLIB=libunwind',
'-DCLANG_ENABLE_BOOTSTRAP=ON',
'-DCLANG_LINKS_TO_CREATE=clang++;clang-cpp',
'-DLLVM_BUILD_TESTS=OFF',
'-DLLVM_CCACHE_BUILD=ON',
'-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-buildroot-linux-gnu',
'-DLLVM_ENABLE_ASSERTIONS=OFF',
'-DLLVM_ENABLE_BINDINGS=OFF',
'-DLLVM_ENABLE_LIBXML2=OFF',
'-DLLVM_ENABLE_NEW_PASS_MANAGER=ON',
'-DLLVM_ENABLE_TERMINFO=OFF',
'-DLLVM_ENABLE_ZLIB=FORCE_ON',
'-DLLVM_ENABLE_ZSTD=FORCE_ON',
'-DLLVM_INCLUDE_BENCHMARKS=OFF',
'-DLLVM_INCLUDE_EXAMPLES=OFF',
'-DLLVM_INCLUDE_GO_TESTS=OFF',
'-DLLVM_INCLUDE_TESTS=OFF',
'-DLLVM_STATIC_LINK_CXX_STDLIB=ON',
'-DZLIB_ROOT=/home/tamas/projects/llvmcraft/workspace/packages/zlib-bootstrap',
'-Dzstd_ROOT=/home/tamas/projects/llvmcraft/workspace/packages/zstd-bootstrap',
'-DCMAKE_INSTALL_PREFIX=/home/tamas/projects/llvmcraft/workspace/packages/clang-stage1',
'-DCMAKE_TOOLCHAIN_FILE=/home/tamas/projects/llvmcraft/workspace/toolchains/gcc-toolchain.cmake',
'-DLLVM_TARGETS_TO_BUILD=X86',
'-DLLVM_ENABLE_PROJECTS=clang;lld',
'-DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind',
'-DLLVM_DISTRIBUTION_COMPONENTS=clang-resource-headers;clang;lld;llvm-ar;llvm-config;llvm-nm;llvm-objcopy;llvm-profdata;llvm-ranlib;llvm-strip;llvm-tblgen;llvm-strip;llvm-readelf;llvm-windres;LTO;llvm-lipo;runtimes;buil
'-DLLVM_RUNTIME_TARGETS=x86_64-buildroot-linux-gnu',
'-DLLVM_BUILTIN_TARGETS=x86_64-buildroot-linux-gnu',
'-DLLVM_ENABLE_RUNTIMES=compiler-rt;libcxx;libcxxabi;libunwind',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_SYSTEM_NAME=Linux',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_BUILD_TYPE=Release',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_SYSTEM_PROCESSOR=x86_64',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_C_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_CXX_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_ASM_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DBUILTINS_x86_64-buildroot-linux-gnu_CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY',
'-DBUILTINS_x86_64-buildroot-linux-gnu_LLVM_USE_LINKER=lld',
'-DBUILTINS_x86_64-buildroot-linux-gnu_COMPILER_RT_BAREMETAL_BUILD=ON',
'-DBUILTINS_x86_64-buildroot-linux-gnu_COMPILER_RT_DEFAULT_TARGET_ONLY=ON',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_SYSTEM_NAME=Linux',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_BUILD_TYPE=Release',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_SYSTEM_PROCESSOR=x86_64',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_C_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_CXX_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_ASM_COMPILER_TARGET=x86_64-buildroot-linux-gnu',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_CMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_LLVM_USE_LINKER=lld',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BAREMETAL_BUILD=ON',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_DEFAULT_TARGET_ONLY=ON',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_SANITIZERS=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_XRAY=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_LIBFUZZER=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_MEMPROF=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_ORC=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_GWP_ASAN=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_BUILD_PROFILE=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_COMPILER_RT_USE_BUILTINS_LIBRARY=ON',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_LIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_LIBCXXABI_ENABLE_SHARED=OFF',
'-DRUNTIMES_x86_64-buildroot-linux-gnu_LIBCXX_ABI_VERSION=2',
'-DCLANG_LINKS_TO_CREATE=clang++;clang-cpp;x86_64-buildroot-linux-gnu-clang;x86_64-buildroot-linux-gnu-clang++'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment