src: change UPX_CONFIG logic to permissive defaults
This commit is contained in:
@@ -316,8 +316,9 @@ jobs:
|
|||||||
set s=%H%\src
|
set s=%H%\src
|
||||||
cat .GITREV.txt
|
cat .GITREV.txt
|
||||||
set /p GITREV=<.GITREV.txt
|
set /p GITREV=<.GITREV.txt
|
||||||
|
set UPX_DEFS=-DUPX_CONFIG_DISABLE_WSTRICT=0 -DUPX_CONFIG_DISABLE_WERROR=0 -DWITH_ZSTD=0
|
||||||
set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp
|
set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp
|
||||||
%RUN_CL% -std:c++17 -Zc:__cplusplus -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" -DWITH_ZSTD=0 %DEFS% -I%H%\vendor -Feupx.exe %sources% %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib /link ${{ matrix.link_machine_flags }} setargv.obj
|
%RUN_CL% -std:c++17 -Zc:__cplusplus -EHsc -J -O2 -W4 -WX -DUPX_VERSION_GITREV="""%GITREV%""" %UPX_DEFS% %DEFS% -I%H%\vendor -Feupx.exe %sources% %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib /link ${{ matrix.link_machine_flags }} setargv.obj
|
||||||
- name: 'Make artifact'
|
- name: 'Make artifact'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+4
-4
@@ -256,11 +256,11 @@ endif()
|
|||||||
if(Threads_FOUND)
|
if(Threads_FOUND)
|
||||||
target_compile_definitions(${t} PRIVATE WITH_THREADS=1)
|
target_compile_definitions(${t} PRIVATE WITH_THREADS=1)
|
||||||
endif()
|
endif()
|
||||||
if(UPX_CONFIG_DISABLE_WSTRICT)
|
if(NOT UPX_CONFIG_DISABLE_WSTRICT)
|
||||||
target_compile_definitions(${t} PRIVATE UPX_CONFIG_DISABLE_WSTRICT=1)
|
target_compile_definitions(${t} PRIVATE UPX_CONFIG_DISABLE_WSTRICT=0)
|
||||||
endif()
|
endif()
|
||||||
if(UPX_CONFIG_DISABLE_WERROR)
|
if(NOT UPX_CONFIG_DISABLE_WERROR)
|
||||||
target_compile_definitions(${t} PRIVATE UPX_CONFIG_DISABLE_WERROR=1)
|
target_compile_definitions(${t} PRIVATE UPX_CONFIG_DISABLE_WERROR=0)
|
||||||
endif()
|
endif()
|
||||||
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
||||||
target_compile_definitions(${t} PRIVATE WITH_ZSTD=1)
|
target_compile_definitions(${t} PRIVATE WITH_ZSTD=1)
|
||||||
|
|||||||
+4
-2
@@ -48,7 +48,8 @@ ACC_COMPILE_TIME_ASSERT_HEADER(CHAR_MAX == 255) // -funsigned-char
|
|||||||
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
|
ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
|
||||||
|
|
||||||
// enable some more strict warnings for Git developer builds
|
// enable some more strict warnings for Git developer builds
|
||||||
#if !UPX_CONFIG_DISABLE_WSTRICT && !UPX_CONFIG_DISABLE_WERROR
|
#if defined(UPX_CONFIG_DISABLE_WSTRICT) && (UPX_CONFIG_DISABLE_WSTRICT + 0 == 0)
|
||||||
|
#if defined(UPX_CONFIG_DISABLE_WERROR) && (UPX_CONFIG_DISABLE_WERROR + 0 == 0)
|
||||||
#if (ACC_CC_CLANG >= 0x0b0000)
|
#if (ACC_CC_CLANG >= 0x0b0000)
|
||||||
# pragma clang diagnostic error "-Wsuggest-override"
|
# pragma clang diagnostic error "-Wsuggest-override"
|
||||||
#elif (ACC_CC_GNUC >= 0x0a0000)
|
#elif (ACC_CC_GNUC >= 0x0a0000)
|
||||||
@@ -70,7 +71,8 @@ ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char
|
|||||||
# pragma warning(error: 4319)
|
# pragma warning(error: 4319)
|
||||||
# pragma warning(error: 4805)
|
# pragma warning(error: 4805)
|
||||||
#endif
|
#endif
|
||||||
#endif // !UPX_CONFIG_DISABLE_WSTRICT && !UPX_CONFIG_DISABLE_WERROR
|
#endif // UPX_CONFIG_DISABLE_WSTRICT
|
||||||
|
#endif // UPX_CONFIG_DISABLE_WERROR
|
||||||
|
|
||||||
// multithreading (UPX currently does not use multithreading)
|
// multithreading (UPX currently does not use multithreading)
|
||||||
#if (WITH_THREADS)
|
#if (WITH_THREADS)
|
||||||
|
|||||||
Reference in New Issue
Block a user