Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Unifying Windows vs Linux build steps #256

Description

@gwihlidal

It may be a bit early for this, but it seems like a brief discussion around unifying the build steps between Windows and Linux would be nice.

Personally, I really dislike how the Windows version of DXC is configured and built - it deviates heavily from standard LLVM build practices, and even how cmake should be invoked. The Linux porting work makes building DXC (for Linux and OSX) much cleaner and obvious, and allowing for the Windows build to be configured and compiled in the same manner (i.e. cmake, ninja, etc..) would be fantastic.

Currently, trying to invoke a build on Windows using the Linux instructions results in the following:

PS H:\Repositories\dxc_test1\DirectXShaderCompiler\build> cmake ../ -GNinja -DCMAKE_BUILD_TYPE=Release $(cat ../utils/cmake-predefined-
config-params)
-- The C compiler identification is Clang 6.0.0
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/CMakeDetermineCompilerId.cmake:771 (message):
  The Clang compiler tool

    "C:/Program Files/LLVM/bin/clang.exe"

  targets the MSVC ABI but has a GNU-like command-line interface.  This is
  not supported.  Use 'clang-cl' instead, e.g.  by setting 'CC=clang-cl' in
  the environment.  Furthermore, use the MSVC command-line environment.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:113 (CMAKE_DIAGNOSE_UNSUPPORTED_CLANG)
  CMakeLists.txt:28 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "H:/Repositories/dxc_test1/DirectXShaderCompiler/build/CMakeFiles/CMakeOutput.log".

Is there any idea (or previous discussion) on the effort or feasibility of allowing the Windows compilation to work the same as Linux/OSX? This would also be very helpful when bootstrapping FFI bindings to DXC from other languages.

Thank you!
Graham

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions