================
@@ -0,0 +1,71 @@
+//===-- Implementation of crt for amdgpu 
----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "config/gpu/app.h"
+#include "src/__support/GPU/utils.h"
+#include "src/__support/RPC/rpc_client.h"
+#include "src/__support/macros/config.h"
+#include "src/stdlib/atexit.h"
+#include "src/stdlib/exit.h"
+
+extern "C" int main(int argc, char **argv, char **envp);
+extern "C" void __cxa_finalize(void *dso);
+
+namespace LIBC_NAMESPACE_DECL {
+
+// FIXME: Touch this symbol to force this to be linked in statically.
+volatile void *dummy = &LIBC_NAMESPACE::rpc::client;
+
+DataEnvironment app;
+
+extern "C" uintptr_t __init_array_start[];
----------------
jhuber6 wrote:

I doubt this works with SPIR-V, this is linker magic which will need to be 
looked at separately. In the future I'll probably move this to use the 
LLVM/Offload infra, so might be better to separately get global constructors 
working on SPIR-V there. This is used for testing so we should just be able to 
omit it for now.

https://github.com/llvm/llvm-project/pull/181049
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to