Skip to content

Commit

Permalink
git subrepo pull (merge) deps/libchdr
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "deps/libchdr"
  merged:   "b3974651"
upstream:
  origin:   "https://github.com/rtissera/libchdr"
  branch:   "master"
  commit:   "b3974651"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "57de7d6"
  • Loading branch information
notaz committed Nov 14, 2024
1 parent 39999ef commit 279aa48
Show file tree
Hide file tree
Showing 7 changed files with 294 additions and 51 deletions.
4 changes: 2 additions & 2 deletions deps/libchdr/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/rtissera/libchdr
branch = master
commit = aaca599e18e43933fc193bd1b715c368c306208b
parent = e22f9f69d8191f859006cfa7d111423e18a41cd7
commit = b3974651d869c2f804e9879b063c23280d2ae617
parent = 39999efa35f7dd088e24c1e03cdb033d7add02af
method = merge
cmdver = 0.4.9
24 changes: 19 additions & 5 deletions deps/libchdr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if(CMAKE_PROJECT_NAME STREQUAL "chdr")
endif()
option(INSTALL_STATIC_LIBS "Install static libraries" OFF)
option(WITH_SYSTEM_ZLIB "Use system provided zlib library" OFF)
option(WITH_SYSTEM_ZSTD "Use system provided zstd library" OFF)

option(BUILD_LTO "Compile libchdr with link-time optimization if supported" OFF)
if(BUILD_LTO)
Expand All @@ -17,6 +18,14 @@ if(BUILD_LTO)
endif()
endif()

option(BUILD_FUZZER "Build instrumented binary for fuzzing with libfuzzer, requires clang")
if(BUILD_FUZZER)
# Override CFLAGS early for instrumentation. Disable shared libs for instrumentation.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,fuzzer-no-link")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,fuzzer-no-link")
set(BUILD_SHARED_LIBS OFF)
endif()

include(GNUInstallDirs)

#--------------------------------------------------
Expand All @@ -41,11 +50,16 @@ else()
endif()

# zstd
option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF)
option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" OFF)
option(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
add_subdirectory(deps/zstd-1.5.6/build/cmake EXCLUDE_FROM_ALL)
list(APPEND CHDR_LIBS libzstd_static)
if (WITH_SYSTEM_ZSTD)
find_package(zstd REQUIRED)
list(APPEND PLATFORM_LIBS zstd::libzstd_shared)
else()
option(ZSTD_BUILD_SHARED "BUILD SHARED LIBRARIES" OFF)
option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" OFF)
option(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
add_subdirectory(deps/zstd-1.5.6/build/cmake EXCLUDE_FROM_ALL)
list(APPEND CHDR_LIBS libzstd_static)
endif()
#--------------------------------------------------
# chdr
#--------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion deps/libchdr/include/libchdr/huffman.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ int huffman_build_tree(struct huffman_decoder* decoder, uint32_t totaldata, uint
enum huffman_error huffman_assign_canonical_codes(struct huffman_decoder* decoder);
enum huffman_error huffman_compute_tree_from_histo(struct huffman_decoder* decoder);

void huffman_build_lookup_table(struct huffman_decoder* decoder);
enum huffman_error huffman_build_lookup_table(struct huffman_decoder* decoder);

#endif
Loading

0 comments on commit 279aa48

Please sign in to comment.