Skip to content

Commit

Permalink
Enable Large-file Support (#1726)
Browse files Browse the repository at this point in the history
* Enable Large-file Support

This should fix #1725

* Use whitespaces instead of tab in BUILD.bazel

---------

Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
  • Loading branch information
oToToT and dmah42 authored Jan 4, 2024
1 parent 99bdb21 commit c213e41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ cc_library(
}),
defines = [
"BENCHMARK_STATIC_DEFINE",
# Turn on Large-file Support
"_FILE_OFFSET_BITS=64",
"_LARGEFILE64_SOURCE",
"_LARGEFILE_SOURCE",
] + select({
":perfcounters": ["HAVE_LIBPFM"],
"//conditions:default": [],
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} /LTCG")
endif()
else()
# Turn on Large-file Support
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-D_LARGEFILE64_SOURCE)
add_definitions(-D_LARGEFILE_SOURCE)
# Turn compiler warnings up to 11
add_cxx_compiler_flag(-Wall)
add_cxx_compiler_flag(-Wextra)
Expand Down

0 comments on commit c213e41

Please sign in to comment.