[PATCH] D148825: [BOLT] Robustify compile-time config check
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 09:38:22 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1c3653df0841: [BOLT] Robustify compile-time config check (authored by urnathan).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148825/new/
https://reviews.llvm.org/D148825
Files:
bolt/runtime/common.h
Index: bolt/runtime/common.h
===================================================================
--- bolt/runtime/common.h
+++ bolt/runtime/common.h
@@ -6,7 +6,11 @@
//
//===----------------------------------------------------------------------===//
-#if !defined(__APPLE__)
+#if !defined(__x86_64__)
+#error "For x86_64 only"
+#endif
+
+#if defined(__linux__)
#include <cstddef>
#include <cstdint>
@@ -17,7 +21,7 @@
#include <elf.h>
#endif
-#else
+#elif defined(__APPLE__)
typedef __SIZE_TYPE__ size_t;
#define __SSIZE_TYPE__ \
@@ -36,6 +40,8 @@
typedef long long int64_t;
typedef int int32_t;
+#else
+#error "For Linux or MacOS only"
#endif
// Save all registers while keeping 16B stack alignment
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148825.515798.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230421/3d79b20e/attachment.bin>
More information about the llvm-commits
mailing list