Skip to content

Commit 06f03f5

Browse files
committed
Avoid -march=native when reproducible build is wanted
See https://reproducible-builds.org/ for why this is good. Without this patch, compiling on different machines produced different binaries, which made verification of results difficult. Fixes: #11317 This patch was done while working on reproducible builds for openSUSE.
1 parent 955a6c2 commit 06f03f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ else()
5858
set(GGML_BLAS_VENDOR_DEFAULT "Generic")
5959
endif()
6060

61-
if (CMAKE_CROSSCOMPILING)
61+
if (CMAKE_CROSSCOMPILING OR $ENV{SOURCE_DATE_EPOCH})
6262
set(GGML_NATIVE_DEFAULT OFF)
6363
else()
6464
set(GGML_NATIVE_DEFAULT ON)

0 commit comments

Comments
 (0)