Building the Windows libraries¶
They go into a DOS sysroot, so build that with clang-dos/dos-sdk and give
it this checkout; its scripts/build-sysroot.sh runs build-sysroot.sh
here after the DOS libraries:
LLVM_SRC=~/llvm-project PICOLIBC_SRC=~/picolibc BIN=~/llvm-build/bin \
WIN16_SDK=~/win16-sdk SYSROOT=$PWD/sysroot sh ~/dos-sdk/scripts/build-sysroot.sh
or on its own, into a sysroot that has the DOS libraries already:
LLVM_SRC=~/llvm-project PICOLIBC_SRC=~/picolibc BIN=~/llvm-build/bin \
DOS_SDK=~/dos-sdk SYSROOT=$PWD/sysroot sh build-sysroot.sh
picolibc's DOS layer serves Windows too (Windows programs call DOS for
files and the clock), with picolibc's cross-clang-i8086-win16-<model>.txt
cross files. The builtins and libc++ are built again with dos-sdk's
scripts/build-builtins.sh and scripts/build-libcxx.sh (OS=win16), as
Windows returns structures through far pointers in every model.
DOS_SDK defaults to ../dos-sdk next to this checkout. WIN16_MODELS=
picks the models (default: small medium compact large) and NO_CXX=1
skips libc++.