Skip to content

Commit b81289d

Browse files
DinoVmeta-codesync[bot]
authored andcommitted
Small windows exclusions
Summary: Some other random Windows cleanups that we need to disable odds and ends. Reviewed By: jbower-fb Differential Revision: D91526694 fbshipit-source-id: 0eae4c1a1ff5d00de8da8a22ad3ebac0d8a165cd
1 parent e1f0fd3 commit b81289d

5 files changed

Lines changed: 14 additions & 2 deletions

File tree

cinderx/Common/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ constexpr int kKiB = 1024;
133133
constexpr int kMiB = kKiB * kKiB;
134134
constexpr int kGiB = kKiB * kKiB * kKiB;
135135

136-
#if defined(__x86_64__) || defined(__aarch64__)
136+
#if defined(__x86_64__) || defined(__aarch64__) || defined(_M_AMD64)
137137
constexpr int kPageSize = 4 * kKiB;
138138
#else
139139
#error Please define kPageSize for the current architecture

cinderx/Jit/context.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
#include "cinderx/Common/log.h"
66
#include "cinderx/Jit/elf/reader.h"
77

8+
#ifndef WIN32
89
#include <dlfcn.h>
10+
#endif
911

1012
namespace jit {
1113

@@ -115,6 +117,7 @@ CompiledFunction* Context::addCompiledFunction(
115117
return pair.first->second.get();
116118
}
117119

120+
#ifndef WIN32
118121
void AotContext::init(void* bundle_handle) {
119122
JIT_CHECK(
120123
bundle_handle_ == nullptr,
@@ -173,5 +176,6 @@ const AotContext::FuncState* AotContext::lookupFuncState(
173176
auto it = funcs_.find(name);
174177
return it != funcs_.end() ? &it->second : nullptr;
175178
}
179+
#endif
176180

177181
} // namespace jit

cinderx/Jit/elf/writer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <ostream>
1010
#include <sstream>
1111

12+
#ifndef WIN32
13+
1214
namespace jit::elf {
1315

1416
namespace {
@@ -467,3 +469,5 @@ void writeEntries(std::ostream& os, const std::vector<CodeEntry>& entries) {
467469
}
468470

469471
} // namespace jit::elf
472+
473+
#endif

cinderx/Jit/symbolizer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
#include "cinderx/Jit/symbolizer_iface.h"
77

88
#include <fcntl.h>
9+
#ifndef WIN32
910
#include <sys/mman.h>
11+
#include <unistd.h>
12+
#endif
1013
#include <sys/stat.h>
1114
#include <sys/types.h>
12-
#include <unistd.h>
1315

1416
#include <optional>
1517
#include <string>

cinderx/_cinderx-lib.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
#include "internal/pycore_modsupport.h"
5656
#endif
5757

58+
#ifndef WIN32
5859
#include <dlfcn.h>
60+
#endif
5961

6062
namespace {
6163

0 commit comments

Comments
 (0)