Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix es2k bazel build #125

Closed
wants to merge 4 commits into from
Closed

Fix es2k bazel build #125

wants to merge 4 commits into from

Conversation

ffoulkes
Copy link
Contributor

@ffoulkes ffoulkes commented Apr 14, 2024

This Draft PR combines the following CLs:

with additional changes to:

  • Repair the breakage done when support for Linux Networking V3 was implemented.
  • Implement a new --//flags:lnw_version command-line flag to specify whether to build for LNW version 2 or version 3.

It will be replaced by a smaller PR (consisting only of the additional changes) once PRs #121, #122, #123, and #124 have been merged.

- Implemented a --//flags:lnw_version command-line flag that
  defines the configuration setting //flags:lnw_v2 or
  //flags:lnw_v3 if the lnw_version is 2 or 3 and the target
  is ES2K.

- Modified krnlmon_cc_library() to define the preprocessor symbol
  LNW_V2 or LNW_V3 if the corresponding configuration setting
  is enabled.

Signed-off-by: Derek G Foster <[email protected]>
- Combined the LNW_V2 and LNW_V3 versions of switch_pd_routing.h
  into a single conditionalized file.

  Subjectively, this is a little neater. Objectively, it solves a
  problem in adding Bazel support.

Signed-off-by: Derek G Foster <[email protected]>
- Created switchapi/es2k/switch_pd_lag.h to act as a proxy for
  the version-specific switch_pd_lag.h files. It encapsulates
  the knowledge that there is more than one version of the
  header file.

Signed-off-by: Derek G Foster <[email protected]>
- Revised the codebase and Bazel buildsystem to allow krnlmon to
  be built for ES2K with support for Linux Networking V2 or V3.
  A new --//flags:lnw_version command-line flag specifies the
  version to be enabled.

Signed-off-by: Derek G Foster <[email protected]>
@ffoulkes ffoulkes added the bazel Affects Bazel build system label Apr 14, 2024
@ffoulkes ffoulkes closed this Apr 16, 2024
@ffoulkes ffoulkes deleted the fix-es2k-bazel-build branch April 16, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel Affects Bazel build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant