Skip to content

Commit

Permalink
Rename target_cc_library() to krnlmon_cc_library() (#118)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek G Foster <[email protected]>
  • Loading branch information
ffoulkes authored Apr 9, 2024
1 parent 624b5c1 commit 2ad8d83
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 120 deletions.
4 changes: 2 additions & 2 deletions bazel/rules.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2018-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0

load("//bazel:rules/library_rule.bzl", _target_cc_library = "target_cc_library")
load("//bazel:rules/library_rule.bzl", _target_cc_library = "krnlmon_cc_library")

target_cc_library = _target_cc_library
krnlmon_cc_library = _target_cc_library
5 changes: 2 additions & 3 deletions bazel/rules/library_rule.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:defs.bzl", "TARGET_DEFINES")

def target_cc_library(
def krnlmon_cc_library(
name,
deps = None,
srcs = None,
Expand All @@ -23,14 +23,13 @@ def target_cc_library(
visibility = None,
arches = None,
linkopts = []):

cc_library(
name = name,
deps = deps,
srcs = srcs,
data = data,
hdrs = hdrs,
# alwayslink = alwayslink,
# alwayslink = alwayslink,
copts = copts,
defines = TARGET_DEFINES + defines,
include_prefix = include_prefix,
Expand Down
62 changes: 31 additions & 31 deletions switchapi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("@rules_cc//cc:defs.bzl", "cc_library")
load("//bazel:defs.bzl", "NO_MATCH_ERROR")
load("//bazel:rules.bzl", "target_cc_library")
load("//bazel:rules.bzl", "krnlmon_cc_library")
load("//bazel:sde.bzl", "TARGET_SDE")

package(default_visibility = ["//visibility:public"])
Expand All @@ -18,7 +18,7 @@ PD_ROUTING_DEPS = select(
no_match_error = NO_MATCH_ERROR,
)

target_cc_library(
krnlmon_cc_library(
name = "switch_base_types",
hdrs = ["switch_base_types.h"],
deps = [
Expand All @@ -28,7 +28,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_config",
hdrs = ["switch_config.h"],
deps = [
Expand All @@ -39,7 +39,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_config_int",
hdrs = ["switch_config_int.h"],
deps = [
Expand All @@ -50,7 +50,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_device",
hdrs = ["switch_device.h"],
deps = [
Expand All @@ -59,15 +59,15 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_device_int",
hdrs = ["switch_device_int.h"],
deps = [
":switch_base_types",
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_fdb",
hdrs = ["switch_fdb.h"],
deps = [
Expand All @@ -77,7 +77,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_handle",
hdrs = ["switch_handle.h"],
deps = [
Expand All @@ -87,23 +87,23 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_handle_int",
hdrs = ["switch_handle_int.h"],
deps = [
"@target_utils",
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_id",
hdrs = ["switch_id.h"],
deps = [
":switch_base_types",
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_interface",
hdrs = ["switch_interface.h"],
deps = [
Expand All @@ -113,7 +113,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_internal",
hdrs = ["switch_internal.h"],
deps = [
Expand All @@ -126,7 +126,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_l3",
hdrs = ["switch_l3.h"],
deps = [
Expand All @@ -136,15 +136,15 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_l3_int",
hdrs = ["switch_l3_int.h"],
deps = [
":switch_types_int",
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_lag",
hdrs = ["switch_lag.h"],
deps = [
Expand All @@ -153,7 +153,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_neighbor",
hdrs = ["switch_neighbor.h"],
deps = [
Expand All @@ -163,7 +163,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_neighbor_int",
hdrs = ["switch_neighbor_int.h"],
deps = [
Expand All @@ -173,7 +173,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_nhop",
hdrs = ["switch_nhop.h"],
deps = [
Expand All @@ -183,7 +183,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_nhop_int",
hdrs = ["switch_nhop_int.h"],
deps = [
Expand All @@ -193,18 +193,18 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_pd_routing",
hdrs = ["switch_pd_routing.h"],
deps = PD_ROUTING_DEPS,
)

target_cc_library(
krnlmon_cc_library(
name = "switch_port_int",
hdrs = ["switch_port_int.h"],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_rif",
hdrs = ["switch_rif.h"],
deps = [
Expand All @@ -214,7 +214,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_rif_int",
hdrs = ["switch_rif_int.h"],
deps = [
Expand All @@ -224,7 +224,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_rmac",
hdrs = ["switch_rmac.h"],
deps = [
Expand All @@ -233,7 +233,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_rmac_int",
hdrs = ["switch_rmac_int.h"],
deps = [
Expand All @@ -243,15 +243,15 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_status",
hdrs = ["switch_status.h"],
deps = [
":switch_base_types",
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_table",
hdrs = ["switch_table.h"],
deps = [
Expand All @@ -260,12 +260,12 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_tdi",
hdrs = ["switch_tdi.h"],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_tunnel",
hdrs = ["switch_tunnel.h"],
deps = [
Expand All @@ -276,7 +276,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_types_int",
hdrs = ["switch_types_int.h"],
deps = [
Expand All @@ -285,7 +285,7 @@ target_cc_library(
],
)

target_cc_library(
krnlmon_cc_library(
name = "switch_vrf",
hdrs = ["switch_vrf.h"],
deps = [
Expand Down
Loading

0 comments on commit 2ad8d83

Please sign in to comment.