Can we do Windows builds with clang? #124

Closed
opened 2023-09-17 19:21:09 +00:00 by bvisness · 6 comments
Owner

We already ask people to install clang in order to build samples, and the distinction between runtime builds and sample builds is not so clear. Furthermore, MSVC sucks across the board, what with late adoption of C features and terrible command-line setups with vcvarsall and whatnot.

Could we just build the runtime with clang on Windows instead? Then it's one less major dependency to install and probably much less pain and suffering by users.

We already ask people to install clang in order to build samples, and the distinction between runtime builds and sample builds is not so clear. Furthermore, MSVC sucks across the board, what with late adoption of C features and terrible command-line setups with vcvarsall and whatnot. Could we just build the runtime with clang on Windows instead? Then it's one less major dependency to install and probably much less pain and suffering by users.
bvisness added the
windows
label 2023-09-17 19:21:09 +00:00
Author
Owner

Unfortunately, throwing clang-cl at it did not work. @MartinFouilleul, this is probably something you'll need to look at since I'm not actually that familiar with everything Orca is using.

Unfortunately, throwing clang-cl at it did not work. @MartinFouilleul, this is probably something you'll need to look at since I'm not actually that familiar with everything Orca is using.
Collaborator

One complication is that if we want to use DirectX, MSVC has better support for it than other compilers. It's interfaces are all C++, and thanks to the unstable C++ ABI, other compilers can't use it directly afaik. We could probably try using it with #define CINTERFACE, but the DXC shader compiler doesn't support that yet: https://github.com/microsoft/DirectXShaderCompiler/issues/3162.

One complication is that if we want to use DirectX, MSVC has better support for it than other compilers. It's interfaces are all C++, and thanks to the unstable C++ ABI, other compilers can't use it directly afaik. We could probably try using it with `#define CINTERFACE`, but the DXC shader compiler doesn't support that yet: https://github.com/microsoft/DirectXShaderCompiler/issues/3162.
Author
Owner

Hm. Maybe I should just get CI working and sidestep the issue then.

Hm. Maybe I should just get CI working and sidestep the issue then.
Collaborator

Wouldn't we compile shaders offline for the (future) D3D canvas backend?

Wouldn't we compile shaders offline for the (future) D3D canvas backend?
Collaborator

Yeah that makes sense, I guess we could have a dev-only project whose job it is to build the shaders.

Yeah that makes sense, I guess we could have a dev-only project whose job it is to build the shaders.
Author
Owner

I'm gonna close this since CI will just resolve all this.

I'm gonna close this since CI will just resolve all this.
Sign in to join this conversation.
No Label
macOS
windows
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/orca#124
No description provided.