Skip to content

Commit

Permalink
abseil: fix build on macOS when using LLVM clang (#26107)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
  • Loading branch information
AbrilRBS and perseoGI authored Dec 6, 2024
1 parent 8fb3b74 commit 13febde
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions recipes/abseil/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ patches:
patch_description: "Do not build test_allocator target when tests are disabled"
patch_type: "portability"
patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5"
- patch_file: "patches/0006-backport-arm-compilation-fix.patch"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1710"
"20240116.1":
- patch_file: "patches/0003-absl-string-libm-20240116.patch"
patch_description: "link libm to absl string"
Expand All @@ -52,6 +54,8 @@ patches:
patch_description: "Do not build test_allocator target when tests are disabled"
patch_type: "portability"
patch_source: "https://github.com/abseil/abseil-cpp/commit/779a3565ac6c5b69dd1ab9183e500a27633117d5"
- patch_file: "patches/0006-backport-arm-compilation-fix.patch"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1710"
"20230802.1":
- patch_file: "patches/0003-absl-string-libm-20230802.patch"
patch_description: "link libm to absl string"
Expand All @@ -61,10 +65,14 @@ patches:
patch_description: "Fix build with MinGW"
patch_type: "portability"
patch_source: "https://github.com/abseil/abseil-cpp/commit/2f77684e8dc473a48dbc19167ffe69c40ce8ada4"
- patch_file: "patches/0006-backport-arm-compilation-fix.patch"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1710"
"20230125.3":
- patch_file: "patches/0003-absl-string-libm.patch"
patch_description: "link libm to absl string"
patch_type: "portability"
- patch_file: "patches/0006-backport-arm-compilation-fix.patch"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1710"
"20220623.1":
- patch_file: "patches/0003-absl-string-libm.patch"
patch_description: "link libm to absl string"
Expand All @@ -73,6 +81,8 @@ patches:
patch_description: "Workaround bug in GCC 7.2"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1250"
patch_type: "portability"
- patch_file: "patches/0006-backport-arm-compilation-fix.patch"
patch_source: "https://github.com/abseil/abseil-cpp/pull/1710"
"20211102.0":
- patch_file: "patches/0003-absl-string-libm.patch"
patch_description: "link libm to absl string"
Expand Down
13 changes: 13 additions & 0 deletions recipes/abseil/all/patches/0006-backport-arm-compilation-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/absl/copts/AbseilConfigureCopts.cmake b/absl/copts/AbseilConfigureCopts.cmake
index 73435e9..f95ea36 100644
--- a/absl/copts/AbseilConfigureCopts.cmake
+++ b/absl/copts/AbseilConfigureCopts.cmake
@@ -42,7 +42,7 @@ if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES [[Clang]])
string(TOUPPER "${_arch}" _arch_uppercase)
string(REPLACE "X86_64" "X64" _arch_uppercase ${_arch_uppercase})
foreach(_flag IN LISTS ABSL_RANDOM_HWAES_${_arch_uppercase}_FLAGS)
- list(APPEND ABSL_RANDOM_RANDEN_COPTS "-Xarch_${_arch}" "${_flag}")
+ list(APPEND ABSL_RANDOM_RANDEN_COPTS "SHELL:-Xarch_${_arch} ${_flag}")
endforeach()
endforeach()
# If a compiler happens to deal with an argument for a currently unused

0 comments on commit 13febde

Please sign in to comment.