[vlc-devel] [PATCH 1/3] package/win32: build.sh: add options to do build with Universal Runtime
Steve Lhomme
robux4 at ycbcr.xyz
Thu Apr 30 13:26:43 CEST 2020
On 2020-04-30 12:47, Jean-Baptiste Kempf wrote:
>
>
> 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
This is before building the contribs. There is no -enable-winstore in
those. But this line should be in the next patch (Winstore).
>> +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.
config.mak is how we set particular contrib values for a target.
We have the same in apple/build.sh.
This one is mostly copied from vlc-winrt/libvlc/compile.sh It might be
simplified.
The CC/CXX is needed because for gcc we add a -specs configuration (but
maybe it can be set via CFLAGS/CXXFLAGS).
>> +if [ ! -z "$BUILD_UCRT" ]; then
>> + CFLAGS="$CFLAGS $CPPFLAGS"
>> + CXXFLAGS="$CXXFLAGS $CPPFLAGS"
>> +fi
>
> This feels wrong
That's because so far a lot of flags that should be in CPP are set in C
and CXX flags. I don't feel like writing all lines twice every time.
More information about the vlc-devel
mailing list