diff options
author | Ankit Agarwal <ankit@applied.co> | 2022-04-11 10:08:57 -0700 |
---|---|---|
committer | Ankit Agarwal <ankit@applied.co> | 2022-04-11 10:08:57 -0700 |
commit | 226cf8740904089e8864fa41b47538cce2a7c2ad (patch) | |
tree | a4cf66d654e33c98378a911e6340a334fd152294 | |
parent | 0f8bdd1eed990ca1e729dfceb4df63826f08de53 (diff) |
Added Linked Runtime feature to MinGW Build. Allows MinGW to be linked against UCRT
-rwxr-xr-x | mingw-w64-build | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mingw-w64-build b/mingw-w64-build index 88ce1b1..442a716 100755 --- a/mingw-w64-build +++ b/mingw-w64-build @@ -26,6 +26,8 @@ ENABLE_THREADS="--enable-threads=posix" JOB_COUNT=$(($(getconf _NPROCESSORS_ONLN) + 2)) +LINKED_RUNTIME="msvcrt" + show_help() { cat <<EOF @@ -47,6 +49,7 @@ Options: --binutils-branch <branch> set Binutils branch (default: $BINUTILS_BRANCH) --gcc-branch <branch> set GCC branch (default: $GCC_BRANCH) --mingw-w64-branch <branch> set MinGW-w64 branch (default: $MINGW_W64_BRANCH) + --linked-runtime <runtime> set MinGW Linked Runtime (default: $LINKED_RUNTIME) EOF } @@ -181,7 +184,8 @@ build() execute "($arch): configuring MinGW-w64 headers" "" \ "$SRC_PATH/mingw-w64/mingw-w64-headers/configure" --build="$BUILD" \ - --host="$host" --prefix="$prefix/$host" + --host="$host" --prefix="$prefix/$host" \ + --with-default-msvcrt=$LINKED_RUNTIME execute "($arch): installing MinGW-w64 headers" "" \ make install @@ -206,6 +210,7 @@ build() execute "($arch): configuring MinGW-w64 CRT" "" \ "$SRC_PATH/mingw-w64/mingw-w64-crt/configure" --build="$BUILD" \ --host="$host" --prefix="$prefix/$host" \ + --with-default-msvcrt=$LINKED_RUNTIME \ --with-sysroot="$prefix/$host" $crt_lib execute "($arch): building MinGW-w64 CRT" "" \ @@ -316,6 +321,20 @@ while :; do --gcc-branch=) arg_error "'--gcc-branch' requires a non-empty option argument" ;; + --linked-runtime) + if [ "$2" ]; then + LINKED_RUNTIME="$2" + shift + else + arg_error "'--linked-runtime' requires a non-empty option argument" + fi + ;; + --linked-runtime=?*) + LINKED_RUNTIME=${1#*=} + ;; + --linked-runtime=) + arg_error "'--linked-runtime' requires a non-empty option argument" + ;; --mingw-w64-branch) if [ "$2" ]; then MINGW_W64_BRANCH="$2" |