Skip to content

Commit cdd9cd3

Browse files
committed
Make reproducible
1 parent b515aec commit cdd9cd3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3855,8 +3855,12 @@ function(build_awssdk)
38553855
prepare_fetchcontent()
38563856
set(BUILD_DEPS OFF)
38573857
set(BUILD_TOOL OFF)
3858-
message("XXX: ${CMAKE_ASM_FLAGS}")
3859-
if(CMAKE_CXX_FLAGS MATCHES "-ffile-prefix-map=" AND NOT CMAKE_ASM_FLAGS MATCHES "-ffile-prefix-map=")
3858+
# This is for aws-lc. -ffile-prefix-map is needed for reproducible
3859+
# builds. If ASM flags doesn't have --file-prefix-map, it may
3860+
# produce different binaries. Only aws-lc uses assembler. So this is
3861+
# for aws-lc.
3862+
if(CMAKE_CXX_FLAGS MATCHES "-ffile-prefix-map=" AND NOT CMAKE_ASM_FLAGS MATCHES
3863+
"-ffile-prefix-map=")
38603864
string(REGEX MATCH " -ffile-prefix-map=[^ ]+ " FFILE_PREFIX_MAP "${CMAKE_CXX_FLAGS}")
38613865
string(APPEND CMAKE_ASM_FLAGS "${FFILE_PREFIX_MAP}")
38623866
endif()

0 commit comments

Comments
 (0)