Skip to content

Commit

Permalink
fix: add patch for abseil on jetson platform (#3196)
Browse files Browse the repository at this point in the history
- patch from
abseil/abseil-cpp@372124e

---------

Signed-off-by: wep21 <[email protected]>
  • Loading branch information
wep21 authored Nov 19, 2024
1 parent 0df1c55 commit 87593ef
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 1 deletion.
43 changes: 43 additions & 0 deletions modules/abseil-cpp/20240722.0.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2024 The Abseil Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# https://bazel.build/external/overview#bzlmod

module(
name = "abseil-cpp",
version = "20240722.0.bcr.1",
compatibility_level = 1,
bazel_compatibility = [">=7.2.1"],
)

cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc")

# Only direct dependencies need to be listed below.
# Please keep the versions in sync with the versions in the WORKSPACE file.

bazel_dep(name = "bazel_skylib",
version = "1.5.0")

bazel_dep(name = "google_benchmark",
version = "1.8.3",
repo_name = "com_github_google_benchmark",
dev_dependency = True)

bazel_dep(name = "googletest",
version = "1.15.2",
repo_name = "com_google_googletest")

bazel_dep(name = "platforms",
version = "0.0.10")
1 change: 1 addition & 0 deletions modules/abseil-cpp/20240722.0.bcr.1/overlay/MODULE.bazel
13 changes: 13 additions & 0 deletions modules/abseil-cpp/20240722.0.bcr.1/patches/jetson.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git absl/base/config.h absl/base/config.h
index 0b22167..4665bea 100644
--- absl/base/config.h
+++ absl/base/config.h
@@ -926,7 +926,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
// https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code
#ifdef ABSL_INTERNAL_HAVE_ARM_NEON
#error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set
-#elif defined(__ARM_NEON) && !defined(__CUDA_ARCH__)
+#elif defined(__ARM_NEON) && !(defined(__NVCC__) && defined(__CUDACC__))
#define ABSL_INTERNAL_HAVE_ARM_NEON 1
#endif

19 changes: 19 additions & 0 deletions modules/abseil-cpp/20240722.0.bcr.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
matrix:
bazel:
- 7.x
platform:
- centos7_java11_devtoolset10
- debian10
- ubuntu2004
- macos
- windows
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++14'
build_targets:
- '@abseil-cpp//absl/strings'
- '@abseil-cpp//absl/flags:flag'
12 changes: 12 additions & 0 deletions modules/abseil-cpp/20240722.0.bcr.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"url": "https://github.com/abseil/abseil-cpp/releases/download/20240722.0/abseil-cpp-20240722.0.tar.gz",
"integrity": "sha256-9Q5awxGoE4Laf6dblzEOS5AGR0+VYKxG9UqZZ/B9SuM=",
"strip_prefix": "abseil-cpp-20240722.0",
"patch_strip": 0,
"overlay": {
"MODULE.bazel": "sha256-wKperv/xEhtAIIOX8ilgTHF70v3yFP9nWG1icRjhdyA="
},
"patches": {
"jetson.patch": "sha256-KRONt49ouN+ytVat9Y9Lqqzcrd2HkZFPid1oj2wtmeg="
}
}
3 changes: 2 additions & 1 deletion modules/abseil-cpp/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"20240116.0",
"20240116.1",
"20240116.2",
"20240722.0"
"20240722.0",
"20240722.0.bcr.1"
],
"yanked_versions": {}
}

0 comments on commit 87593ef

Please sign in to comment.