CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
"""Re-export a cc_library with added LLVM specific settings.
|
|
|
|
This re-exports the dependent libraries in a way that satisfies layering_check
|
|
|
|
cc_library_wrapper(
|
|
name = "library_wrapper",
|
|
deps = [
|
|
"@example//:library",
|
|
],
|
|
defines = [
|
|
"LLVM_ENABLE_EXAMPLE=1",
|
|
],
|
|
)
|
|
"""
|
|
|
|
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
|
|
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
|
|
|
|
visibility("private")
|
|
|
|
def _cc_library_wrapper_impl(ctx):
|
|
all_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps]
|
|
if ctx.attr.defines:
|
|
all_cc_infos.append(CcInfo(
|
|
compilation_context = cc_common.create_compilation_context(
|
|
defines = depset(ctx.attr.defines),
|
|
),
|
|
))
|
|
|
|
return cc_common.merge_cc_infos(direct_cc_infos = all_cc_infos)
|
|
|
|
cc_library_wrapper = rule(
|
|
implementation = _cc_library_wrapper_impl,
|
|
attrs = {
|
|
"deps": attr.label_list(
|
|
doc = "Dependencies to cc_library targets to re-export.",
|
|
providers = [CcInfo],
|
|
),
|
|
"defines": attr.string_list(
|
|
doc = "Additional preprocessor definitions to add to all dependent targets.",
|
|
default = [],
|
|
),
|
|
},
|
|
doc = "Re-export a cc_library with added LLVM specific settings.",
|
|
provides = [CcInfo],
|
|
)
|