[libomptarget] Drop assert.h, use freestanding for amdgcn devicertl

[libomptarget] Drop assert.h, use freestanding for amdgcn devicertl

Promotes the runtime assert to a link time error for the unimplemented
fallback functions. Enables amdgcn to build with only clang provided
headers, which makes it less likely to break other builds when enabled.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D98649

GitOrigin-RevId: f675b3df4848bae5a8203c2508b721b41086471f
diff --git a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
index 2c278f7..f1ec822 100644
--- a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -101,6 +101,7 @@
     -xc++
     -c
     -std=c++14
+    -ffreestanding
     -target amdgcn
     -emit-llvm
     -Xclang -aux-triple -Xclang x86_64-unknown-linux-gnu # see nvptx
diff --git a/libomptarget/deviceRTLs/common/include/target/shuffle.h b/libomptarget/deviceRTLs/common/include/target/shuffle.h
index e61c379..e05315c 100644
--- a/libomptarget/deviceRTLs/common/include/target/shuffle.h
+++ b/libomptarget/deviceRTLs/common/include/target/shuffle.h
@@ -15,7 +15,6 @@
 #ifndef LIBOMPTARGET_DEVICERTL_SHUFFLE_H
 #define LIBOMPTARGET_DEVICERTL_SHUFFLE_H
 
-#include <assert.h>
 #include <stdint.h>
 
 #pragma omp declare target
@@ -41,20 +40,14 @@
 ///}
 
 /// Fallback implementations of the shuffle sync idiom.
+/// Unavailable at present (would error at link time if used).
 ///
 ///{
 
-inline int32_t __kmpc_impl_shfl_sync(uint64_t Mask, int32_t Var,
-                                     int32_t SrcLane) {
-  assert(false &&
-         "Fallback version of __kmpc_impl_shfl_sync is not available!");
-}
+int32_t __kmpc_impl_shfl_sync(uint64_t Mask, int32_t Var, int32_t SrcLane);
 
-inline int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var,
-                                          uint32_t Delta, int32_t Width) {
-  assert(false &&
-         "Fallback version of __kmpc_impl_shfl_down_sync is not available!");
-}
+int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var, uint32_t Delta,
+                                   int32_t Width);
 
 ///}