mirror of
				https://github.com/bensuperpc/dockcross.git
				synced 2025-10-31 08:06:23 +01:00 
			
		
		
		
	web-wasi-threads: use target wasm32-wasi-threads in sysroot wrapper
And add -pthread flag.
This commit is contained in:
		| @@ -4,7 +4,11 @@ FROM ${ORG}/web-wasi:latest-${HOST_ARCH} | ||||
|  | ||||
| LABEL maintainer="Matt McCormick matt@mmmccormick.com" | ||||
|  | ||||
| COPY clang-wasi-threads-sysroot.sh clang++-wasi-threads-sysroot.sh /usr/local/bin/ | ||||
|  | ||||
| ENV CROSS_TRIPLE=wasm32-wasi-threads | ||||
| ENV CC=clang-wasi-threads-sysroot.sh \ | ||||
|     CXX=clang++-wasi-threads-sysroot.sh | ||||
|  | ||||
| COPY Toolchain.cmake ${CROSS_ROOT}/ | ||||
| ENV CMAKE_TOOLCHAIN_FILE=${CROSS_ROOT}/Toolchain.cmake | ||||
|   | ||||
| @@ -4,7 +4,7 @@ include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk-pthread.cmake) | ||||
| set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT}) | ||||
| set(CMAKE_SYSROOT $ENV{WASI_SYSROOT}) | ||||
|  | ||||
| set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-sysroot.sh) | ||||
| set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-sysroot.sh) | ||||
| set(CMAKE_C_COMPILER /usr/local/bin/clang-wasi-threads-sysroot.sh) | ||||
| set(CMAKE_CXX_COMPILER /usr/local/bin/clang++-wasi-threads-sysroot.sh) | ||||
|  | ||||
| set(CMAKE_CROSSCOMPILING_EMULATOR /wasi-runtimes/wasmtime/bin/wasmtime-pwd-threads.sh) | ||||
|   | ||||
							
								
								
									
										3
									
								
								web-wasi-threads/clang++-wasi-threads-sysroot.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								web-wasi-threads/clang++-wasi-threads-sysroot.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/usr/bin/env sh | ||||
|  | ||||
| exec ${WASI_SDK_PATH}/bin/clang++ -pthread --target=wasm32-wasi-threads --sysroot=${WASI_SYSROOT} "$@" | ||||
							
								
								
									
										3
									
								
								web-wasi-threads/clang-wasi-threads-sysroot.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								web-wasi-threads/clang-wasi-threads-sysroot.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/usr/bin/env sh | ||||
|  | ||||
| exec ${WASI_SDK_PATH}/bin/clang -pthread --target=wasm32-wasi-threads --sysroot=${WASI_SYSROOT} "$@" | ||||
		Reference in New Issue
	
	Block a user
	 Matt McCormick
					Matt McCormick