[Openmp-commits] [openmp] [Libomptarget] Allow the CPU targets to be built without libffi (PR #77495)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 9 10:55:53 PST 2024
================
@@ -0,0 +1,102 @@
+//===--- generic-elf-64bit/dynamic_ffi/ffi.cpp -------------------- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Provides a mirror to the parts of the FFI interface that the plugins require.
+//
+// libffi
+// - Copyright (c) 2011, 2014, 2019, 2021, 2022 Anthony Green
+// - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef DYNAMIC_FFI_FFI_H
+#define DYNAMIC_FFI_FFI_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#define USES_DYNAMIC_FFI
+
+uint32_t ffi_init();
+
+typedef struct _ffi_type {
+ size_t size;
+ unsigned short alignment;
+ unsigned short type;
+ struct _ffi_type **elements;
+} ffi_type;
+
+typedef enum {
+ FFI_OK = 0,
+ FFI_BAD_TYPEDEF,
+ FFI_BAD_ABI,
+ FFI_BAD_ARGTYPE
+} ffi_status;
+
+#ifndef X86_64
+#define X86_64
+#endif
----------------
jhuber6 wrote:
Forgot to delete that, thanks for catching.
https://github.com/llvm/llvm-project/pull/77495
More information about the Openmp-commits
mailing list