https://github.com/RadeonOpenCompute/ROCm-OpenCL-Driver/pull/88

From f49ad81e246f1c196cf86f40cf44dfedec0675f1 Mon Sep 17 00:00:00 2001
From: Mike Lothain <mike@fireburn.co.uk>
Date: Tue, 27 Aug 2019 11:32:47 +0100
Subject: [PATCH] Include more link libraries

This is required to get dev-libs/rocm-opencl-driver-2.7.0 compiling for me on Gentoo

I think it might be related to using -Wl,--as-needed in my link flags globally
---
 src/driver/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/driver/CMakeLists.txt b/src/driver/CMakeLists.txt
index 55ed13f..b93356d 100644
--- a/src/driver/CMakeLists.txt
+++ b/src/driver/CMakeLists.txt
@@ -60,9 +60,13 @@ llvm_map_components_to_libnames(llvm_libs
   AllTargetsDescs
   AllTargetsDisassemblers
   AllTargetsInfos
+  BitWriter
   CodeGen
+  IRReader
+  Linker
   MC
   MCDisassembler
+  MCParser
   Object
   Symbolize
   Core
@@ -83,6 +87,7 @@ target_link_libraries(opencl_driver
   clangLex
   clangBasic
   clangCodeGen
+  clangSerialization
   lldELF
   lldCore
   LLVMDebugInfoDWARF
