[linux-port] Final update to cmake files for cross-platform compilation. (#1376)
This change disables the build targets that are not supported on Unix platforms when compiling on those platforms. We were also ignoring DXCompiler.cpp when compilation in the past. We can now bring it back. We have also added cmake-predefined-config-params which contains all the cmake configurations needed to build on Unix platforms. It will make it easy for developers to build.
This commit is contained in:
Родитель
29a058b75c
Коммит
01e5e240fa
|
@ -17,7 +17,13 @@ endif()
|
|||
# add_llvm_tool_subdirectory(llvm-as) # HLSL Change
|
||||
# add_llvm_tool_subdirectory(llvm-dis) # HLSL Change
|
||||
# add_llvm_tool_subdirectory(llvm-mc) # HLSL Change
|
||||
add_llvm_tool_subdirectory(dxexp) # HLSL Change
|
||||
|
||||
# HLSL Change Begins
|
||||
if (WIN32)
|
||||
# This target can currently only be built on Windows.
|
||||
add_llvm_tool_subdirectory(dxexp)
|
||||
endif (WIN32)
|
||||
# HLSL Change ends
|
||||
|
||||
# add_llvm_tool_subdirectory(llc) # HLSL Change
|
||||
# add_llvm_tool_subdirectory(llvm-ar) # HLSL Change
|
||||
|
|
|
@ -23,16 +23,19 @@ endif()
|
|||
add_llvm_external_project(clang-tools-extra extra)
|
||||
|
||||
# HLSL Change Starts
|
||||
add_subdirectory(d3dcomp)
|
||||
add_subdirectory(dxcompiler)
|
||||
add_subdirectory(dxa)
|
||||
add_subdirectory(dxc)
|
||||
|
||||
# These targets can currently only be built on Windows.
|
||||
if (WIN32)
|
||||
add_subdirectory(d3dcomp)
|
||||
add_subdirectory(dxa)
|
||||
add_subdirectory(dxopt)
|
||||
add_subdirectory(dxl)
|
||||
add_subdirectory(dxr)
|
||||
add_subdirectory(dxv)
|
||||
if (WIN32) # UI powered by .NET
|
||||
add_subdirectory(dotnetc)
|
||||
endif (WIN32)
|
||||
add_subdirectory(dxlib-sample)
|
||||
# UI powered by .NET.
|
||||
add_subdirectory(dotnetc)
|
||||
endif (WIN32)
|
||||
# HLSL Change Ends
|
||||
|
|
|
@ -64,6 +64,7 @@ set(SOURCES
|
|||
dxcassembler.cpp
|
||||
dxclibrary.cpp
|
||||
dxcompilerobj.cpp
|
||||
DXCompiler.cpp
|
||||
dxcfilesystem.cpp
|
||||
dxcontainerbuilder.cpp
|
||||
dxcutil.cpp
|
||||
|
@ -73,9 +74,6 @@ set(SOURCES
|
|||
)
|
||||
set (HLSL_IGNORE_SOURCES
|
||||
dxcdia.cpp
|
||||
DXCompiler.cpp
|
||||
DXCompiler.rc
|
||||
DXCompiler.def
|
||||
dxclinker.cpp
|
||||
)
|
||||
endif(WIN32)
|
||||
|
|
|
@ -39,8 +39,8 @@ if (HLSL_INCLUDE_TESTS)
|
|||
if (WIN32) # These tests require MS specific TAEF and DIA SDK
|
||||
add_subdirectory(HLSL)
|
||||
add_subdirectory(HLSLHost)
|
||||
add_subdirectory(dxc_batch)
|
||||
endif (WIN32)
|
||||
add_subdirectory(dxc_batch)
|
||||
endif (HLSL_INCLUDE_TESTS)
|
||||
|
||||
# HLSL Change Ends
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON -DLLVM_APPEND_VC_REV:BOOL=ON -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=dxil-ms-dx -DLLVM_ENABLE_EH:BOOL=ON -DLLVM_ENABLE_RTTI:BOOL=ON -DLLVM_INCLUDE_DOCS:BOOL=OFF -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF -DLLVM_INCLUDE_TESTS:BOOL=OFF -DLLVM_OPTIMIZED_TABLEGEN:BOOL=OFF -DLLVM_REQUIRES_EH:BOOL=ON -DLLVM_REQUIRES_RTTI:BOOL=ON -DLLVM_TARGETS_TO_BUILD:STRING=None -DLIBCLANG_BUILD_STATIC:BOOL=ON -DCLANG_BUILD_EXAMPLES:BOOL=OFF -DCLANG_CL:BOOL=OFF -DCLANG_ENABLE_ARCMT:BOOL=OFF -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=OFF -DCLANG_INCLUDE_TESTS:BOOL=OFF -DHLSL_INCLUDE_TESTS:BOOL=ON -DENABLE_SPIRV_CODEGEN:BOOL=ON
|
Загрузка…
Ссылка в новой задаче