This commit is contained in:
		
							parent
							
								
									368ea7e1d0
								
							
						
					
					
						commit
						f9b1ac8c84
					
				
					 1 changed files with 198 additions and 52 deletions
				
			
		|  | @ -100,6 +100,15 @@ git clone \ | ||||||
|     --depth=1 \ |     --depth=1 \ | ||||||
|     https://github.com/llvm/llvm-project.git |     https://github.com/llvm/llvm-project.git | ||||||
| 
 | 
 | ||||||
|  | RUN git clone \ | ||||||
|  |     --branch='25.2'\ | ||||||
|  |     --depth=1 \ | ||||||
|  |     https://gitlab.freedesktop.org/mesa/mesa.git | ||||||
|  | 
 | ||||||
|  | RUN wget https://x.org/releases/individual/lib/libxcb-1.17.0.tar.xz | ||||||
|  | RUN wget https://x.org/releases/individual/lib/libX11-1.8.12.tar.xz | ||||||
|  | RUN wget 'https://sdk.lunarg.com/sdk/download/1.4.328.1/linux/vulkansdk-linux-x86_64-1.4.328.1.tar.xz' | ||||||
|  | 
 | ||||||
| RUN cd llvm-project/ \ | RUN cd llvm-project/ \ | ||||||
| \ | \ | ||||||
| && cmake \ | && cmake \ | ||||||
|  | @ -118,6 +127,7 @@ RUN cd llvm-project/ \ | ||||||
|     -D LIBCXX_INSTALL_MODULES=ON \ |     -D LIBCXX_INSTALL_MODULES=ON \ | ||||||
|     -D LIBCXXABI_USE_LLVM_UNWINDER=OFF \ |     -D LIBCXXABI_USE_LLVM_UNWINDER=OFF \ | ||||||
|     -D LLVM_USE_SANITIZER=Leaks \ |     -D LLVM_USE_SANITIZER=Leaks \ | ||||||
|  |     -D LLVM_USE_LINKER="MOLD" \ | ||||||
| && cd ./build-lsan/ && ninja cxx cxxabi && ninja install-cxx install-cxxabi && cd ../ \ | && cd ./build-lsan/ && ninja cxx cxxabi && ninja install-cxx install-cxxabi && cd ../ \ | ||||||
| \ | \ | ||||||
| && cmake \ | && cmake \ | ||||||
|  | @ -136,12 +146,15 @@ RUN cd llvm-project/ \ | ||||||
|     -D LIBCXX_INSTALL_MODULES=ON \ |     -D LIBCXX_INSTALL_MODULES=ON \ | ||||||
|     -D LIBCXXABI_USE_LLVM_UNWINDER=OFF \ |     -D LIBCXXABI_USE_LLVM_UNWINDER=OFF \ | ||||||
|     -D LLVM_USE_SANITIZER=MemoryWithOrigins \ |     -D LLVM_USE_SANITIZER=MemoryWithOrigins \ | ||||||
|  |     -D LLVM_USE_LINKER="MOLD" \ | ||||||
| && cd ./build-msan/ && ninja cxx cxxabi && ninja install-cxx install-cxxabi && cd ../ | && cd ./build-msan/ && ninja cxx cxxabi && ninja install-cxx install-cxxabi && cd ../ | ||||||
| 
 | 
 | ||||||
|  | RUN cd llvm-project/ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| ## libxcb ## | ## libxcb ## | ||||||
| RUN \ | RUN \ | ||||||
| wget https://x.org/releases/individual/lib/libxcb-1.17.0.tar.xz  \ | tar xf libxcb-1.17.0.tar.xz  \ | ||||||
| && tar xf libxcb-1.17.0.tar.xz  \ |  | ||||||
| && cd libxcb-1.17.0  \ | && cd libxcb-1.17.0  \ | ||||||
| && export CC=clang \ | && export CC=clang \ | ||||||
| && export CFLAGS=" \ | && export CFLAGS=" \ | ||||||
|  | @ -167,8 +180,7 @@ wget https://x.org/releases/individual/lib/libxcb-1.17.0.tar.xz  \ | ||||||
| 
 | 
 | ||||||
| ## libx11 ## | ## libx11 ## | ||||||
| RUN \ | RUN \ | ||||||
| wget https://x.org/releases/individual/lib/libX11-1.8.12.tar.xz  \ | tar xf libX11-1.8.12.tar.xz  \ | ||||||
| && tar xf libX11-1.8.12.tar.xz  \ |  | ||||||
| && cd libX11-1.8.12  \ | && cd libX11-1.8.12  \ | ||||||
| && export CC=clang \ | && export CC=clang \ | ||||||
| && export CFLAGS=" \ | && export CFLAGS=" \ | ||||||
|  | @ -192,12 +204,12 @@ wget https://x.org/releases/individual/lib/libX11-1.8.12.tar.xz  \ | ||||||
| && make && make install \ | && make && make install \ | ||||||
| && cd .. && rm -rf libX11-1.8.12 libX11-1.8.12.tar.xz | && cd .. && rm -rf libX11-1.8.12 libX11-1.8.12.tar.xz | ||||||
| 
 | 
 | ||||||
| RUN wget 'https://sdk.lunarg.com/sdk/download/1.4.328.1/linux/vulkansdk-linux-x86_64-1.4.328.1.tar.xz' | 
 | ||||||
| RUN tar xf vulkansdk-linux-x86_64-1.4.328.1.tar.xz |  | ||||||
| 
 | 
 | ||||||
| ## Vulkan SDK ## | ## Vulkan SDK ## | ||||||
| RUN \ | RUN \ | ||||||
| cd /1.4.328.1 \ | tar xf 'vulkansdk-linux-x86_64-1.4.328.1.tar.xz' \ | ||||||
|  | && cd /1.4.328.1 \ | ||||||
| && chmod +x ./vulkansdk \ | && chmod +x ./vulkansdk \ | ||||||
| && chmod +x ./setup-env.sh \ | && chmod +x ./setup-env.sh \ | ||||||
| && export CC="$(which clang)" \ | && export CC="$(which clang)" \ | ||||||
|  | @ -228,23 +240,39 @@ cd /1.4.328.1 \ | ||||||
|     -lc++abi" \ |     -lc++abi" \ | ||||||
| && ./vulkansdk \ | && ./vulkansdk \ | ||||||
|     --debug \ |     --debug \ | ||||||
|  |     --skip-installing-deps \ | ||||||
|     --numjobs `nproc` \ |     --numjobs `nproc` \ | ||||||
|     vulkan-loader |     vulkan-loader \ | ||||||
|  |     spirv-tools | ||||||
| 
 | 
 | ||||||
| ## Mesa ## | ## Mesa ## | ||||||
| RUN git clone \ | 
 | ||||||
|     --branch='25.2'\ | 
 | ||||||
|     --depth=1 \ |  | ||||||
|     https://gitlab.freedesktop.org/mesa/mesa.git |  | ||||||
| 
 | 
 | ||||||
| RUN \ | RUN \ | ||||||
| export CXX=$(which clang++) \ | export build_llvm=/build-llvm \ | ||||||
| && export CC=$(which clang) \ | && export build_path=/b_llvm_normal \ | ||||||
| && export CXXFLAGS="\ | && export repo=/llvm-project \ | ||||||
|  | \ | ||||||
|  | && cmake \ | ||||||
|  |     -S $repo/llvm \ | ||||||
|  |     -G Ninja \ | ||||||
|  |     -B $build_path \ | ||||||
|  |     -D CMAKE_BUILD_TYPE=Release \ | ||||||
|  |     -D LLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \ | ||||||
|  |     -D CMAKE_C_COMPILER=$(which clang) \ | ||||||
|  |     -D CMAKE_CXX_COMPILER=$(which clang++) \ | ||||||
|  |     -D CMAKE_INSTALL_PREFIX=/opt/llvm-normal \ | ||||||
|  | && ninja -C $build_path install | ||||||
|  | 
 | ||||||
|  | RUN \ | ||||||
|  | export CXXFLAGS="\ | ||||||
|         -fsanitize=memory \ |         -fsanitize=memory \ | ||||||
|         -fsanitize-memory-track-origins \ |         -fsanitize-memory-track-origins \ | ||||||
|  |         -fsanitize-ignorelist=/msan/ignorelist_all_sources \ | ||||||
|         -fno-omit-frame-pointer \ |         -fno-omit-frame-pointer \ | ||||||
|         -g \ |         -g \ | ||||||
|  |         -std=c++23 \ | ||||||
|         -nostdinc++ \ |         -nostdinc++ \ | ||||||
|         -isystem /libcxx_msan/include/c++/v1/"\ |         -isystem /libcxx_msan/include/c++/v1/"\ | ||||||
| && export CFLAGS="\ | && export CFLAGS="\ | ||||||
|  | @ -255,11 +283,66 @@ export CXX=$(which clang++) \ | ||||||
| && export LDFLAGS="\ | && export LDFLAGS="\ | ||||||
|     -fsanitize=memory \ |     -fsanitize=memory \ | ||||||
|     -fsanitize-memory-track-origins \ |     -fsanitize-memory-track-origins \ | ||||||
|  |     -fsanitize-ignorelist=/msan/ignorelist_all_sources \ | ||||||
|     -g \ |     -g \ | ||||||
|  |     -std=c++23 \ | ||||||
|     -L/msan/lib -Wl,-rpath,/msan/lib \ |     -L/msan/lib -Wl,-rpath,/msan/lib \ | ||||||
|     -L/libcxx_msan/lib -Wl,-rpath,/libcxx_msan/lib \ |     -L/libcxx_msan/lib -Wl,-rpath,/libcxx_msan/lib \ | ||||||
|     -lc++ \ |     -lc++ \ | ||||||
|     -lc++abi" \ |     -lc++abi" \ | ||||||
|  | && export build_path=/b_llvm_msan \ | ||||||
|  | && export repo=/llvm-project \ | ||||||
|  | \ | ||||||
|  | && cmake \ | ||||||
|  |     -S $repo/llvm \ | ||||||
|  |     -G Ninja \ | ||||||
|  |     -B $build_path \ | ||||||
|  |     -D CMAKE_BUILD_TYPE=Release \ | ||||||
|  |     -D LLVM_ENABLE_PROJECTS="clang;lld" \ | ||||||
|  |     -D LLVM_TARGETS_TO_BUILD="X86;SPIRV" \ | ||||||
|  |     -D LLVM_ENABLE_PIC=ON \ | ||||||
|  |     -D LLVM_NATIVE_TOOL_DIR=/opt/llvm-normal/bin/ \ | ||||||
|  |     -D LLVM_USE_SANITIZER=MemoryWithOrigins \ | ||||||
|  |     -D LLVM_TABLEGEN=/opt/llvm-normal/bin/llvm-tblgen \ | ||||||
|  |     -D LLVM_CONFIG_PATH=/opt/llvm-normal/bin/llvm-config \ | ||||||
|  |     -D CMAKE_C_COMPILER=/opt/llvm-normal/bin/clang \ | ||||||
|  |     -D CMAKE_CXX_COMPILER=/opt/llvm-normal/bin/clang++ \ | ||||||
|  |     -D CMAKE_INSTALL_PREFIX=/opt/llvm-msan \ | ||||||
|  | && ninja -C $build_path install | ||||||
|  | 
 | ||||||
|  | # && cmake \ | ||||||
|  | #     -G Ninja \ | ||||||
|  | #     -S $llvm/llvm \ | ||||||
|  | #     -B $build_llvm \ | ||||||
|  | #     -D LLVM_INSTALL_UTILS=ON \ | ||||||
|  | #     -D CMAKE_INSTALL_PREFIX=$installprefix \ | ||||||
|  | #     -D CMAKE_BUILD_TYPE=Release \ | ||||||
|  | #     -D LLVM_TARGETS_TO_BUILD="X86;SPIRV" \ | ||||||
|  | #     -D CMAKE_C_COMPILER=$(which clang) \ | ||||||
|  | #     -D CMAKE_CXX_COMPILER=$(which clang++) \ | ||||||
|  | # \ | ||||||
|  | #     -D LLVM_USE_SANITIZER=MemoryWithOrigins \ | ||||||
|  | #     -D LIBCXXABI_USE_LLVM_UNWINDER=OFF \ | ||||||
|  | # \ | ||||||
|  | # && ninja -C $build_llvm install | ||||||
|  | # | ||||||
|  | # && cmake  \ | ||||||
|  | #     -G Ninja  \ | ||||||
|  | #     -S $llvm/clang  \ | ||||||
|  | #     -B $build_clang \ | ||||||
|  | #     -D LLVM_EXTERNAL_LIT=$build_llvm/utils/lit \ | ||||||
|  | #     -D LLVM_ROOT=$installprefix \ | ||||||
|  | # \ | ||||||
|  | # && ninja -C $build_clang | ||||||
|  | 
 | ||||||
|  | RUN \ | ||||||
|  | cd /mesa \ | ||||||
|  | && export CXX='clang++' \ | ||||||
|  | && export CC='clang' \ | ||||||
|  | && export CFLAGS="-fsanitize=memory  -fsanitize-memory-track-origins  -fno-omit-frame-pointer  -g" \ | ||||||
|  | && export CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -g -nostdinc++ -isystem /libcxx_msan/include/c++/v1/" \ | ||||||
|  | && export LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins -g -L/libcxx_msan/lib -Wl,-rpath,/libcxx_msan/lib -L/msan/lib -Wl,-rpath,/msan/lib -lc++ -lc++abi"  \ | ||||||
|  | && export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH" \ | ||||||
| && meson setup ./ _build \ | && meson setup ./ _build \ | ||||||
|     -D build-tests=false  \ |     -D build-tests=false  \ | ||||||
|     -D enable-glcpp-tests=false  \ |     -D enable-glcpp-tests=false  \ | ||||||
|  | @ -299,3 +382,66 @@ export CXX=$(which clang++) \ | ||||||
|     --force-fallback-for=syn,paste,rustc-hash  \ |     --force-fallback-for=syn,paste,rustc-hash  \ | ||||||
| && ninja -C _build | && ninja -C _build | ||||||
| 
 | 
 | ||||||
|  | # RUN cd mesa/ \ | ||||||
|  | # && source '/1.4.328.1/setup-env.sh' \ | ||||||
|  | # && export CXX='clang++' \ | ||||||
|  | # && export CC='clang' \ | ||||||
|  | # && export CFLAGS="\ | ||||||
|  | #         -fsanitize=memory \ | ||||||
|  | #         -fsanitize-memory-track-origins \ | ||||||
|  | #         -fno-omit-frame-pointer \ | ||||||
|  | #         -g" \ | ||||||
|  | # && export CXXFLAGS="\ | ||||||
|  | #         -fsanitize=memory \ | ||||||
|  | #         -fsanitize-memory-track-origins \ | ||||||
|  | #         -fno-omit-frame-pointer \ | ||||||
|  | #         -g \ | ||||||
|  | #         -nostdinc++ \ | ||||||
|  | #         -isystem /libcxx_msan/include/c++/v1/"\ | ||||||
|  | # && export LDFLAGS="\ | ||||||
|  | #     -fsanitize=memory \ | ||||||
|  | #     -fsanitize-memory-track-origins \ | ||||||
|  | #     -g \ | ||||||
|  | #     -L/libcxx_msan/lib -Wl,-rpath,/libcxx_msan/lib \ | ||||||
|  | #     -L/msan/lib -Wl,-rpath,/msan/lib \ | ||||||
|  | #     -lc++ \ | ||||||
|  | #     -lc++abi" \ | ||||||
|  | # && meson setup ./ _build  \ | ||||||
|  | #     -D build-tests=false \ | ||||||
|  | #     -D enable-glcpp-tests=false \ | ||||||
|  | #     -D build-radv-tests=false \ | ||||||
|  | #     -D build-aco-tests=false \ | ||||||
|  | #     -D install-intel-gpu-tests=false \ | ||||||
|  | #     -D gallium-mediafoundation-test=false \ | ||||||
|  | #     -D android-libbacktrace=disabled \ | ||||||
|  | #     -D split-debug=disabled \ | ||||||
|  | #     -D b_ndebug=true \ | ||||||
|  | #     -D b_lto=false \ | ||||||
|  | #     -D egl=enabled \ | ||||||
|  | #     -D gallium-drivers=r300,r600,radeonsi,nouveau,virgl,svga,softpipe,llvmpipe,i915,iris,crocus,zink \ | ||||||
|  | #     -D gallium-extra-hud=true \ | ||||||
|  | #     -D gallium-rusticl=true \ | ||||||
|  | #     -D gallium-va=enabled \ | ||||||
|  | #     -D gbm=enabled \ | ||||||
|  | #     -D gles1=disabled \ | ||||||
|  | #     -D gles2=enabled \ | ||||||
|  | #     -D glvnd=enabled \ | ||||||
|  | #     -D glx=dri \ | ||||||
|  | #     -D libunwind=enabled \ | ||||||
|  | #     -D llvm=enabled \ | ||||||
|  | #     -D lmsensors=disabled \ | ||||||
|  | #     -D microsoft-clc=disabled \ | ||||||
|  | #     -D platforms=x11,wayland \ | ||||||
|  | #     -D valgrind=disabled \ | ||||||
|  | #     -D video-codecs=all \ | ||||||
|  | #     -D vulkan-drivers=amd,intel,intel_hasvk,swrast,virtio,nouveau \ | ||||||
|  | #     -D vulkan-layers=device-select,intel-nullhw,overlay \ | ||||||
|  | #     -D tools='' \ | ||||||
|  | #     -D zstd=enabled \ | ||||||
|  | #     -D buildtype=plain \ | ||||||
|  | #     -D prefix=/usr \ | ||||||
|  | #     -D sysconfdir=/etc \ | ||||||
|  | #     --wrap-mode=nofallback \ | ||||||
|  | #     --force-fallback-for=syn,paste,rustc-hash \ | ||||||
|  | # && ninja -C _build | ||||||
|  | # | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue