0xf005ba11 / bazel_example_project

Example bazel project using the EWDK toolchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 git@github.com: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

License:MIT License


Languages

Language:Starlark 65.2%Language:C++ 17.1%Language:Assembly 9.6%Language:C 8.1%