From 74cd6e11973d77d74a10bca8129dbbc5a88b6ab2 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Wed, 15 Jan 2020 18:51:54 -0800 Subject: [PATCH] Fix a build error when compiling with clang Check __clang__ before __GNUC__ as clang defines both. Change-Id: I9963f8e0665efb4cb08bd3886fb38fee42dd9861 [ROCm/ROCR-Runtime commit: 19e1fb3a4ed53555d8c82d722b92d72e0e2268da] --- .../rocr-runtime/runtime/hsa-runtime/loader/executable.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp index 20619ba332..0ec868cbc9 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp @@ -62,9 +62,7 @@ using namespace amd::hsa; using namespace amd::hsa::common; -#ifdef __GNUC__ -#define NONOPTIMIZE __attribute__((noinline, optimize(0))) -#elif defined __clang__ +#if defined __clang__ #define NONOPTIMIZE __attribute__((noinline, optnone)) #else #define NONOPTIMIZE __attribute__((noinline, optimize(0)))