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

Add DAWN_USE_WINDOWS_UI option for Zig & MinGW compilers #6

Closed
wants to merge 1 commit into from

Conversation

slimsag
Copy link
Contributor

@slimsag slimsag commented Feb 18, 2022

This is a pending CL being sent upstream to dawn.googlesource.com.

Status:

Helps hexops/mach#86


In Mach engine, we're compiling Dawn using Zig as a C/C++ compiler. Zig provides it's own libc implementation, build system, and system headers.

Dawn today makes use of newer windows.ui.*.h headers introduced in more recent Windows versions. However, Zig relies on MinGW for it's system headers and it is not straightforward/desirable to use the official Windows SDK headers: Zig does not have these headers today.

Since Dawn does not truly require these headers, we are using a preprocessor directive DAWN_USE_WINDOWS_UI to disable this functionality and enable compilation of Dawn with Zig/MinGW compilers.

I have based the implementation on the existing DAWN_USE_X11 and DAWN_USE_WAYLAND build configuration approaches.

Signed-off-by: Stephen Gutekanst stephen@hexops.com

@slimsag slimsag changed the base branch from main to upstream February 18, 2022 20:35
@slimsag slimsag force-pushed the sg/dawn-no-windows-ui branch 2 times, most recently from abcfaa3 to bcfcbd9 Compare April 20, 2022 06:36
@slimsag slimsag changed the title Add DAWN_NO_WINDOWS_UI option for Zig & MinGW compilers Add DAWN_USE_WINDOWS_UI option for Zig & MinGW compilers Jul 10, 2022
@slimsag slimsag force-pushed the sg/dawn-no-windows-ui branch 2 times, most recently from a65b0b1 to 5711e19 Compare August 7, 2022 01:20
@slimsag slimsag force-pushed the sg/dawn-no-windows-ui branch 2 times, most recently from 38627e7 to 48e5dc5 Compare December 30, 2022 20:59
In Mach engine, we're compiling Dawn using Zig as a C/C++
compiler. Zig provides it's own libc implementation, build
system, and system headers.

Dawn today makes use of newer `windows.ui.*.h` headers introduced in
more recent Windows versions. However, Zig relies on MinGW for it's
system headers and it is not straightforward/desirable to use the
official Windows SDK headers: Zig does not have these headers today.

Since Dawn does not truly require these headers, we are using a
preprocessor directive `DAWN_USE_WINDOWS_UI` to disable this functionality
and enable compilation of Dawn with Zig/MinGW compilers.

I have based the implementation on the existing `DAWN_USE_X11` and
`DAWN_USE_WAYLAND` build configuration approaches.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Change-Id: If41cafb95666946115b58567fef753df3fbe940a
@slimsag
Copy link
Contributor Author

slimsag commented Jul 4, 2023

Merged upstream

@slimsag slimsag closed this Jul 4, 2023
@slimsag slimsag deleted the sg/dawn-no-windows-ui branch July 4, 2023 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant