Use from Windows Powershell like:
. clang_arm.ps1or
. gcc_ucrt.ps1| $r="$Env:SystemDrive/msys64" | |
| # The MSYS2 root directory is where MSYS2 is installed. It's CPU architecture dependent. | |
| # for ARM64 CPU: | |
| $r="$r/clangarm64" | |
| $b="$r/bin" | |
| $Env:CC="$b/clang.exe" | |
| $Env:CXX="$b/clang++.exe" | |
| $Env:FC="$b/flang.exe" | |
| $Env:AR="$b/llvm-ar.exe" | |
| # important to put UCRT first to avoid "collect2.exe: error: ld returned 116 exit status" and DLL Hell | |
| $Env:Path = "$b;$Env:Path" | |
| $Env:CMAKE_PREFIX_PATH="$r" |
| $r="$Env:SystemDrive/msys64" | |
| # The MSYS2 root directory is where MSYS2 is installed. It's CPU architecture dependent. | |
| # for x86_64 CPU: | |
| $r="$r/ucrt64" | |
| $b="$r/bin" | |
| $Env:CC="$b/gcc.exe" | |
| $Env:FC="$b/gfortran.exe" | |
| $Env:CXX="$b/g++.exe" | |
| # important to put UCRT first to avoid "collect2.exe: error: ld returned 116 exit status" and DLL Hell | |
| $Env:Path = "$b;$Env:Path" | |
| $Env:CMAKE_PREFIX_PATH="$r" |