From a31d6b2e6d00585e7a4a3f50e77a404ce4965dcf Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 22 Feb 2018 13:07:08 -0500
Subject: [PATCH] P4 to Git Change 1518310 by msearles@zuni-1666 on 2018/02/22
13:02:34
SWDEV-102733 - Update some CMakeLists.txt files:
- when setting CMAKE_CXX_FLAGS, append to it rather than overwriting it.
- some linker flags, -Wl,--unresolved-symbols=report-all being one of them, requires -shared-libasan if using -fsanitize=address.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#5 edit
---
rocclr/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt | 2 +-
rocclr/runtime/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rocclr/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt b/rocclr/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt
index 8a6d3e6ef1..d5460180e6 100644
--- a/rocclr/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt
+++ b/rocclr/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(CMAKE_CXX_FLAGS "-std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common)
diff --git a/rocclr/runtime/CMakeLists.txt b/rocclr/runtime/CMakeLists.txt
index b08d2fc835..69b1e70a84 100644
--- a/rocclr/runtime/CMakeLists.txt
+++ b/rocclr/runtime/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(CMAKE_CXX_FLAGS "-std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
option(GENERIC_IS_ZERO "Teach LLVM/Clang that generic address space IS address space 0 for AMDGPU target" OFF)
if (GENERIC_IS_ZERO)