[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-10 Thread Pushpinder Singh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc711aa0f6f9d: [amdgpu-arch] Guard hsa.h with __has_include (authored by pdhaliwal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102067/new/ https://review

[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-07 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. A thought - we need to keep return 0 for success, but could return a different integer for each failure mode. That would be useful when guessing why it failed. Orthogonal to this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-07 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield accepted this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. LGTM, thanks. I think this leaves us totally sure the clang build will succeed with a best effort chance of having a working amdgpu ident tool afterwards. Repository: rG L

[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-07 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 343668. pdhaliwal added a comment. Added fallback in case __has_include is not defined or header is not found anywhere. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102067/new/ https://reviews.llvm.org/D102

[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-07 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Logic doesn't look quite right to me. If the compiler supports has_include, but neither of those headers exist, we fall through to main() which won't compile. How about: #if defined(__has_include) #if __has_include("hsa.h") #define HSA_FOUND 1 // nam

[PATCH] D102067: [amdgpu-arch] Guard hsa.h with __has_include

2021-05-07 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal created this revision. pdhaliwal added reviewers: jdoerfert, JonChesterfield, ronlieb, davezarzycki. Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl. pdhaliwal requested review of this revision. Herald added subscribers: cfe-commits, wdng. He