[MLIR] Fix build when NVPTX is not enabled
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Thu, 28 May 2020 20:50:32 +0000 (13:50 -0700)
committerStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Thu, 28 May 2020 21:07:55 +0000 (14:07 -0700)
In this case, neither target is selected, but there is still a dependence
on the MC library (through the TargetOptions.h include)

mlir/lib/Conversion/GPUCommon/CMakeLists.txt

index 91c281614214b9f8c4c05a121e772a3beb7aaaad..2b85c237731b2f4ed2300ea4aefc8be52451f4ea 100644 (file)
@@ -1,6 +1,5 @@
 if (MLIR_CUDA_CONVERSIONS_ENABLED)
   set(NVPTX_LIBS
-    MC
     NVPTXCodeGen
     NVPTXDesc
     NVPTXInfo
@@ -9,7 +8,6 @@ endif()
 
 if (MLIR_ROCM_CONVERSIONS_ENABLED)
   set(AMDGPU_LIBS
-    MC
     AMDGPUCodeGen
     AMDGPUDesc
     AMDGPUInfo
@@ -26,6 +24,7 @@ add_mlir_conversion_library(MLIRGPUtoGPURuntimeTransforms
 
   LINK_COMPONENTS
   Core
+  MC
   ${AMDGPU_LIBS}
   ${NVPTX_LIBS}