mirror of
https://github.com/upx/upx.git
synced 2026-05-07 20:12:50 +00:00
CI updates
This commit is contained in:
@@ -712,9 +712,10 @@ jobs:
|
||||
echo -e '#!/bin/sh\n'$log'exec zig ar "$@"' > zig-ar
|
||||
echo -e '#!/bin/sh\n'$log'exec zig cc -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CFLAGS "$@"' > zig-cc
|
||||
echo -e '#!/bin/sh\n'$log'exec zig c++ -target $ZIG_TARGET $ZIG_PIC $ZIG_FLAGS $ZIG_CPPFLAGS $ZIG_CXXFLAGS "$@"' > zig-cxx
|
||||
echo -e '#!/bin/sh\n'$log'exec zig objcopy "$@"' > zig-objcopy
|
||||
echo -e '#!/bin/sh\n'$log'exec zig ranlib "$@"' > zig-ranlib
|
||||
chmod +x zig-ar zig-cc zig-cxx zig-ranlib
|
||||
ls -la; head zig-ar zig-cc zig-cxx zig-ranlib
|
||||
chmod +x zig-ar zig-cc zig-cxx zig-objcopy zig-ranlib
|
||||
ls -la; head zig-ar zig-cc zig-cxx zig-objcopy zig-ranlib
|
||||
# update ZIG_TARGET
|
||||
[[ $ZIG_TARGET == mips-linux-musleabi-* ]] && ZIG_TARGET=mips-linux-musleabi
|
||||
[[ $ZIG_TARGET == mips-linux-musleabihf-* ]] && ZIG_TARGET=mips-linux-musleabihf
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
/.cache*
|
||||
/.idea/
|
||||
/.gram/
|
||||
/.hg*
|
||||
/.idea/
|
||||
/.jj/
|
||||
/.vscode*
|
||||
/.zed/
|
||||
/CMakeCache*
|
||||
|
||||
+4
-4
@@ -297,12 +297,12 @@ if(Threads_FOUND)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT UPX_CONFIG_DISABLE_BZIP2)
|
||||
upx_add_glob_files(bzip2_SOURCES "vendor/bzip2/*.c")
|
||||
add_library(upx_vendor_bzip2 STATIC ${bzip2_SOURCES})
|
||||
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
|
||||
set_property(TARGET upx_vendor_bzip2 PROPERTY C_STANDARD 11)
|
||||
endif()
|
||||
if(NOT UPX_CONFIG_DISABLE_BZIP2)
|
||||
endif() # UPX_CONFIG_DISABLE_BZIP2
|
||||
|
||||
upx_add_glob_files(ucl_SOURCES "vendor/ucl/src/*.c")
|
||||
@@ -317,12 +317,12 @@ if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
|
||||
set_property(TARGET upx_vendor_zlib PROPERTY C_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
||||
upx_add_glob_files(zstd_SOURCES "vendor/zstd/lib/*/*.c")
|
||||
add_library(upx_vendor_zstd STATIC ${zstd_SOURCES})
|
||||
if(NOT UPX_CONFIG_DISABLE_C_STANDARD)
|
||||
set_property(TARGET upx_vendor_zstd PROPERTY C_STANDARD 11)
|
||||
endif()
|
||||
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
||||
endif() # UPX_CONFIG_DISABLE_ZSTD
|
||||
|
||||
upx_add_glob_files(upx_SOURCES "src/*.cpp" "src/[cfu]*/*.cpp")
|
||||
@@ -347,7 +347,6 @@ endif()
|
||||
|
||||
upx_cmake_include_hook(5_target_compilation_flags)
|
||||
|
||||
if(NOT UPX_CONFIG_DISABLE_BZIP2)
|
||||
set(t upx_vendor_bzip2)
|
||||
upx_compile_target_debug_with_O2(${t})
|
||||
upx_sanitize_target(${t})
|
||||
@@ -358,6 +357,7 @@ elseif(GNU_FRONTEND)
|
||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||
endif()
|
||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_BZIP2)
|
||||
if(NOT UPX_CONFIG_DISABLE_BZIP2)
|
||||
endif() # UPX_CONFIG_DISABLE_BZIP2
|
||||
|
||||
set(t upx_vendor_ucl)
|
||||
@@ -386,7 +386,6 @@ elseif(GNU_FRONTEND)
|
||||
endif()
|
||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZLIB)
|
||||
|
||||
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
||||
set(t upx_vendor_zstd)
|
||||
upx_compile_target_debug_with_O2(${t})
|
||||
upx_sanitize_target(${t})
|
||||
@@ -397,6 +396,7 @@ elseif(GNU_FRONTEND)
|
||||
target_compile_options(${t} PRIVATE ${warn_Wall} ${warn_Werror})
|
||||
endif()
|
||||
upx_add_target_extra_compile_options(${t} UPX_CONFIG_EXTRA_COMPILE_OPTIONS_ZSTD)
|
||||
if(NOT UPX_CONFIG_DISABLE_ZSTD)
|
||||
endif() # UPX_CONFIG_DISABLE_ZSTD
|
||||
|
||||
set(t upx)
|
||||
|
||||
+4
-4
@@ -983,14 +983,14 @@ inline bele_constexpr T align_down(const LE32 &a, const T &b) noexcept {
|
||||
return align_down(T(a), b);
|
||||
}
|
||||
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const T &a, const LE32 &b) noexcept { return align_up(a, T(b)); }
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const LE32 &a, const T &b) noexcept { return align_up(T(a), b); }
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const T &a, const BE32 &b) noexcept { return align_up(a, T(b)); }
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const BE32 &a, const T &b) noexcept { return align_up(T(a), b); }
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const T &a, const LE32 &b) noexcept { return align_up(a, T(b)); }
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T align_up(const LE32 &a, const T &b) noexcept { return align_up(T(a), b); }
|
||||
|
||||
REQUIRE_UINT32
|
||||
inline bele_constexpr T min(const T &a, const BE16 &b) noexcept { return min(a, T(b)); }
|
||||
|
||||
@@ -304,41 +304,41 @@ inline void set_le64(const C<T> &a, upx_uint64_t v) {
|
||||
#ifndef XSPAN_FWD_C_IS_MEMBUFFER
|
||||
template <class T>
|
||||
inline C<T> operator+(const C<T> &a, const BE16 &v) {
|
||||
return a + unsigned(v);
|
||||
return a + size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator+(const C<T> &a, const BE32 &v) {
|
||||
return a + unsigned(v);
|
||||
return a + size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator+(const C<T> &a, const LE16 &v) {
|
||||
return a + unsigned(v);
|
||||
return a + size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator+(const C<T> &a, const LE32 &v) {
|
||||
return a + unsigned(v);
|
||||
return a + size_t(unsigned(v));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline C<T> operator-(const C<T> &a, const BE16 &v) {
|
||||
return a - unsigned(v);
|
||||
return a - size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator-(const C<T> &a, const BE32 &v) {
|
||||
return a - unsigned(v);
|
||||
return a - size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator-(const C<T> &a, const LE16 &v) {
|
||||
return a - unsigned(v);
|
||||
return a - size_t(unsigned(v));
|
||||
}
|
||||
template <class T>
|
||||
inline C<T> operator-(const C<T> &a, const LE32 &v) {
|
||||
return a - unsigned(v);
|
||||
return a - size_t(unsigned(v));
|
||||
}
|
||||
#endif // XSPAN_FWD_C_IS_MEMBUFFER
|
||||
|
||||
template <class T>
|
||||
typename std::enable_if<sizeof(T) == 1, upx_rsize_t>::type upx_safe_strlen(const C<T> &a) {
|
||||
inline typename std::enable_if<sizeof(T) == 1, upx_rsize_t>::type upx_safe_strlen(const C<T> &a) {
|
||||
// not fully checked, but can require at least 1 byte
|
||||
upx_rsize_t len = upx_safe_strlen(a.raw_bytes(1));
|
||||
(void) a.raw_bytes(len + 1); // now can do a full check
|
||||
|
||||
Reference in New Issue
Block a user