Skip to content

Commit

Permalink
Merge pull request #9 from archonitelabs/ewdk-support
Browse files Browse the repository at this point in the history
EWDK support
  • Loading branch information
jxy-s authored Apr 28, 2024
2 parents e32b683 + 91554a7 commit a835d4f
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 80 deletions.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ Please read the [Code of Conduct](CODE_OF_CONDUCT.md).
* Run the tests: `rad test`.
* Check out `rad --help` for more information. 😎 🎉

### Windows

If you're working on ARM64 Windows, you should use the Bazel binary directly.
There is a [bug in bazilisk](https://github.com/bazelbuild/bazelisk/issues/572)
that ends up using the x64 version on Bazel on ARM64 systems. To work around
this it is recommended to use the Bazel binary directly.

Building with a normal Visual Studio install is possible, but
[Bazel has bugs](https://github.com/bazelbuild/bazel/issues/22164) in their
default toolchain resolution that may cause issues when cross compiling
architectures. To work around this we recommend using the
[EWDK toolchain](https://github.com/0xf005ba11/bazel_ewdk_cc/) instead. It is
already configured as a bzlmod developer dependency for the project.

1. Download and [Windows EWDK][microsoft.ewdk] and mount the ISO.
2. Set `EWDKDIR` environment variable to the EWDK directory.
3. You're all set! You might have to `rad clean --expunge`.

## Pull Requests

* After opening a pull request you will be required to sign the
Expand All @@ -59,3 +77,4 @@ Please read the [Code of Conduct](CODE_OF_CONDUCT.md).
[bazel.install]: https://docs.bazel.build/versions/main/install.html
[bazel.bazelisk]: https://bazel.build/install/bazelisk
[python.install]: https://www.python.org/downloads/
[microsoft.ewdk]: https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-for-ewdk-enterprise-wdk-ewdk
8 changes: 8 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ git_override(
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
commit = "a14ad3a64e7bf398ab48105aaa0348e032ac87f8",
)

# Windows - allows building with the EWDK, must set EWDKDIR environment variable
bazel_dep(name = "ewdk_cc_toolchain", dev_dependency = True)
git_override(
module_name = "ewdk_cc_toolchain",
remote = "https://github.com/0xf005ba11/bazel_ewdk_cc.git",
commit = "9b9b721f9bb73794bd376b8235a2decc6dea827c",
)
118 changes: 97 additions & 21 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a835d4f

Please sign in to comment.