CMakeLists.txt 5.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#
#
set(IGC_BUILD__PROJ__Compiler       "${IGC_BUILD__PROJ_NAME_PREFIX}Compiler")
set(IGC_BUILD__PROJ__Compiler       "${IGC_BUILD__PROJ__Compiler}" PARENT_SCOPE)
set(IGC_BUILD__PROJ_LABEL__Compiler "${IGC_BUILD__PROJ__Compiler}")

include_directories("${CMAKE_CURRENT_SOURCE_DIR}")


add_subdirectory(CISACodeGen)
igc_sg_define(Compiler__CISACodeGen)

add_subdirectory(DebugInfo)
igc_sg_define(Compiler__DebugInfo)

add_subdirectory(Legalizer)
igc_sg_define(Compiler__Legalizer)

add_subdirectory(MetaDataApi)
igc_sg_define(Compiler__MetaDataApi)

add_subdirectory(Optimizer)
igc_sg_define(Compiler__Optimizer)

set(IGC_BUILD__SRC__Compiler
26
    "${CMAKE_CURRENT_SOURCE_DIR}/CodeGenContext.cpp"
27 28 29 30 31
    "${CMAKE_CURRENT_SOURCE_DIR}/CodeGenContextWrapper.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/compiler_caps.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomSafeOptPass.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomUnsafeOptPass.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomLoopOpt.cpp"
sys_hudsonse's avatar
sys_hudsonse committed
32
    "${CMAKE_CURRENT_SOURCE_DIR}/BlendToDiscard.cpp"
33 34 35 36 37 38 39 40 41 42 43 44
    "${CMAKE_CURRENT_SOURCE_DIR}/PromoteResourceToDirectAS.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/GenTTI.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/FixResourcePtr.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/HandleLoadStoreInstructions.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/igc_workaround.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/LegalizationPass.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/LinkOpt.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/LowPrecisionOptPass.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/MetaDataUtilsWrapper.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/MetaDataUtilsWrapperInitializer.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/SampleCmpToDiscard.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/SPIRMetaDataTranslation.cpp"
tbujewsk's avatar
tbujewsk committed
45
    "${CMAKE_CURRENT_SOURCE_DIR}/ACLPrintfTranslation.cpp"
46 47 48 49 50
    "${CMAKE_CURRENT_SOURCE_DIR}/WorkaroundAnalysisPass.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/ThreadCombining.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/GenUpdateCB.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/ConvertMSAAPayloadTo16Bit.cpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/FindInterestingConstants.cpp"
51
    "${CMAKE_CURRENT_SOURCE_DIR}/DynamicTextureFolding.cpp"
djwoo's avatar
djwoo committed
52
    "${CMAKE_CURRENT_SOURCE_DIR}/WaveIntrinsicWAPass.cpp"
53
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ibdw_wa.c"
54
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ichv_wa.c"
55 56 57 58 59 60
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ibxt_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iCnl_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iskl_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ikbl_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/icfl_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iglk_wa.c"
61 62 63
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iglv_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iicl_hw_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iicl_sw_wa.c"
64
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iicl_lp_hw_wa.c"
65 66 67 68 69
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/iicl_lp_sw_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ilkf_hw_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ilkf_sw_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ijsl_hw_wa.c"
    "${IGC_BUILD__GFX_DEV_SRC_DIR}/skuwa/ijsl_sw_wa.c"
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
    ${IGC_BUILD__SRC__Compiler_CISACodeGen}
    ${IGC_BUILD__SRC__Compiler_DebugInfo}
    ${IGC_BUILD__SRC__Compiler_Legalizer}
    ${IGC_BUILD__SRC__Compiler_MetaDataApi}
    ${IGC_BUILD__SRC__Compiler_Optimizer}
  )
if(NOT ANDROID)
  set(IGC_BUILD__SRC_Win_Lin_Dar__Compiler
      "${CMAKE_CURRENT_SOURCE_DIR}/VerificationPass.cpp"
    )
endif()

set(IGC_BUILD__HDR__Compiler
    "${CMAKE_CURRENT_SOURCE_DIR}/CodeGenContextWrapper.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CodeGenPublic.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/CodeGenPublicEnums.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/compiler_caps.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomSafeOptPass.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomUnsafeOptPass.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/CustomLoopOpt.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/PromoteResourceToDirectAS.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/GenTTI.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/FixResourcePtr.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/HandleLoadStoreInstructions.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/IGC_IR_spec.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/igc_workaround.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/IGCPassSupport.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/InitializePasses.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/LegalizationPass.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/LinkOpt.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/LowPrecisionOptPass.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/MetaDataUtilsWrapper.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/MetaDataUtilsWrapperInitializer.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/SampleCmpToDiscard.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/SPIRMetaDataTranslation.h"
tbujewsk's avatar
tbujewsk committed
105
    "${CMAKE_CURRENT_SOURCE_DIR}/ACLPrintfTranslation.h"
106 107 108 109 110
    "${CMAKE_CURRENT_SOURCE_DIR}/ThreadCombining.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/GenUpdateCB.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/ConvertMSAAPayloadTo16Bit.hpp"
    "${CMAKE_CURRENT_SOURCE_DIR}/WorkaroundAnalysisPass.h"
    "${CMAKE_CURRENT_SOURCE_DIR}/FindInterestingConstants.h"
111
    "${CMAKE_CURRENT_SOURCE_DIR}/DynamicTextureFolding.h"
djwoo's avatar
djwoo committed
112
    "${CMAKE_CURRENT_SOURCE_DIR}/WaveIntrinsicWAPass.h"
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
    ${IGC_BUILD__HDR__Compiler_CISACodeGen}
    ${IGC_BUILD__HDR__Compiler_DebugInfo}
    ${IGC_BUILD__HDR__Compiler_Legalizer}
    ${IGC_BUILD__HDR__Compiler_MetaDataApi}
    ${IGC_BUILD__HDR__Compiler_Optimizer}
  )
if(NOT ANDROID)
  set(IGC_BUILD__HDR_Win_Lin_Dar__Compiler
      "${CMAKE_CURRENT_SOURCE_DIR}/VerificationPass.hpp"
    )
endif()

add_library("${IGC_BUILD__PROJ__Compiler}" STATIC
    ${IGC_BUILD__SRC__Compiler}
    ${IGC_BUILD__SRC_Win_Lin_Dar__Compiler}
    ${IGC_BUILD__HDR__Compiler}
    ${IGC_BUILD__HDR_Win_Lin_Dar__Compiler}
  )
set_property(TARGET "${IGC_BUILD__PROJ__Compiler}" PROPERTY PROJECT_LABEL "${IGC_BUILD__PROJ_LABEL__Compiler}")

add_dependencies("${IGC_BUILD__PROJ__Compiler}" "${IGC_BUILD__PROJ__GenISAIntrinsics}")

win_static_runtime()