Skip to content

0xf005ba11/bazel_example_project

Repository files navigation

Example bazel project using the EWDK toolchain

Project using various bazel features and also building a windows driver using the EWDK toolchain.

Quick Start

  1. Make sure bazelisk is installed and in your path (hint: name the binary bazel.exe). You may also need to install Microsoft's C++ redistributable as well.
  2. Make sure git for windows is installed and in your path.
  3. Make sure bazel buildifier is installed in your path if you plan to use the vscode bazel extension.
  4. Download the latest Enterprise WDK (EWDK) and place somewhere (mounting the ISO should also work in theory).
  5. Set the EWDKDIR environment variable to the location of the EWDK. For example, if mounted to the E drive then EWDKDIR=E:\.
  6. Clone this repository and perform an initial build:
git clone [email protected]:0xf005ba11/bazel_example_project.git
cd bazel_example_project
bazel build //...
bazel run //exe
bazel test --test_output=all //...

Specifying dbg (debug) or opt (optimized) builds

bazel build --compilation_mode=dbg
bazel build --compilation_mode=opt

The default mode is "fastbuild" and is equivalent to a debug build.

Specifying other architectures

bazel build --platforms=:windows_x86
bazel build --platforms=:windows_x64
bazel build --platforms=:windows_arm
bazel build --platforms=:windows_arm64

Note: --platforms and --compilation_mode apply to other commands as well such as run and test.

Intellisense setup (on windows)

copy "$(bazel info output_base)/external/ewdk_cc_configured_toolchain/c_cpp_properties.json" "./.vscode/c_cpp_properties.json"

About

Example bazel project using the EWDK toolchain

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published