[vlc-devel] [PATCH 1/3] package/win32: build.sh: add options to do build with Universal Runtime

Jean-Baptiste Kempf jb at videolan.org
Thu Apr 30 12:47:45 CEST 2020



On Thu, Apr 30, 2020, at 12:15, Steve Lhomme wrote:
> +if [ ! -z "$BUILD_UCRT" ]; then
> +    SHORTARCH="$SHORTARCH-ucrt"
> +    CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 
> -D_UNICODE -DUNICODE"

Why? Those are forced by configure.ac

> +CONTRIB_PREFIX=$TRIPLET
>  mkdir -p contrib/contrib-$SHORTARCH && cd contrib/contrib-$SHORTARCH
>  if [ ! -z "$WITH_PDB" ]; then
>      CONTRIBFLAGS="$CONTRIBFLAGS --enable-pdb"
> @@ -169,7 +189,22 @@ fi
>  if [ "$RELEASE" != "yes" ]; then
>       CONTRIBFLAGS="$CONTRIBFLAGS --disable-optim"
>  fi
> -${SCRIPT_PATH}/../../../contrib/bootstrap --host=$TRIPLET $CONTRIBFLAGS
> +if [ ! -z "$BUILD_UCRT" ]; then
> +    CONTRIB_PREFIX="$CONTRIB_PREFIX$BUILD_UCRT"
> +fi
> +
> +if [ ! -z "$BUILD_UCRT" ]; then
> +    echo "EXTRA_CFLAGS=${CPPFLAGS}" >> config.mak
> +    echo "EXTRA_CXXFLAGS=${CPPFLAGS}" >> config.mak
> +    echo "LDFLAGS=${LDFLAGS}" >> config.mak
> +    echo "WIDL=${BASE_TRIPLET}-widl" >> config.mak
> +    if [ ! "$COMPILING_WITH_CLANG" -gt 0 ]; then
> +        echo "CC=${CC}" >> config.mak
> +        echo "CXX=${CXX}" >> config.mak
> +    fi
> +fi

Why is that code here and not in bootstrap of contribs?
This feels wrong.

> +if [ ! -z "$BUILD_UCRT" ]; then
> +    CFLAGS="$CFLAGS $CPPFLAGS"
> +    CXXFLAGS="$CXXFLAGS $CPPFLAGS"
> +fi

This feels wrong


-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


More information about the vlc-devel mailing list