Skip to content

Instantly share code, notes, and snippets.

@isuruf
Created October 21, 2024 13:48
Show Gist options
  • Save isuruf/f2c32c1249374835464a224975f82073 to your computer and use it in GitHub Desktop.
Save isuruf/f2c32c1249374835464a224975f82073 to your computer and use it in GitHub Desktop.
Create mingw toolchain
CONDA_SUBDIR=win-64 conda create -n mingw gcc gxx gfortran binutils clang clangxx flang lld
conda activate mingw
cd $CONDA_PREFIX/Library
echo "--target=x86_64-w64-mingw32" > bin/clang.cfg
echo "--target=x86_64-w64-mingw32" > bin/clang++.cfg
echo "--target=x86_64-w64-mingw32" > bin/flang.cfg
cp -r ../conda-meta share/
rm -f share/conda-meta/history
conda 3rdparty -n mingw > share/conda-meta/licenses.txt
cd ..
mv Library mingw-w64-ucrt-x86_64-toolchain
zip -r mingw-w64-ucrt-x86_64-toolchain.zip mingw-w64-ucrt-x86_64-toolchain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment